Answers for "integer can put float value"

C#
1

float and int need help

It, again, depends on your game. For more complex games, like RPGs, where
a lot of complex calculations are involved, like armor, resistances, 
different damage types, multipliers, crits and so on, you will want to use 
floats. If you have something like health regeneration over time, you 
will want to use floats as well since it makes it easier to add a fraction 
of a whole number per frame. For more simple games where you dont intend 
to go between full values (think games where the HP is represented
by hearts for example, and where you collect health as drops),
you can easily go with integers.

But, I would go with floats most of the time. It makes your life easier.
But in the end it depends on the design of your game.
Posted by: Guest on April-05-2021
0

a int and float python

a_int = 24 
#this is a int

a_float = 3.2883
#this is a float. you can see that it has a difference. it has a . :)
Posted by: Guest on February-08-2022

Code answers related to "integer can put float value"

C# Answers by Framework

Browse Popular Code Answers by Language