Skip to main content

Questions tagged [floating-point]

Floating point numbers are approximations of real numbers that use a form of scientific notation to store significant figures and an exponent. Use this tag for questions that pertain to the use of floating point numbers in games.

0 votes
1 answer
178 views

I'm making a game (shocker) in pygame and had issues with tile-based collision detection. There are 5 different non-empty tile types (pictured below) which can be rotated in increments of 90 degrees ...
Sad Robot's user avatar
0 votes
2 answers
257 views

The game development library SFML has a Vector2 class template (and a Vector3 for that matter), which can use any arithmetic ...
JensB's user avatar
  • 157
0 votes
2 answers
211 views

So an object has a position, velocity, and is affected by gravity. ...
CPlus's user avatar
  • 153
0 votes
1 answer
916 views

There's solutions to convert float to RGBA but I would like to encode a float depth value in RGB format and save the three components in three separated unused alpha channels and recompose when needed....
philB's user avatar
  • 331
6 votes
3 answers
4k views

I'm working on a game, and my intent is to avoid use of floating point for unit positions. To that end, I'm using 32-bit integers for all positions, with a millimeter scale. However, for rendering, I ...
Nairou's user avatar
  • 634
1 vote
6 answers
816 views

I'm working on a browser MMORPG in PHP and MySQL and today got a bug report about int32 overflow, due to the player having too much money. When I was designing the core system, I completely forgot ...
matronator's user avatar
52 votes
6 answers
19k views

I'm creating a physics game involving rigid bodies in which players move pieces and parts to solve a puzzle/map. A hugely important aspect of the game is that when players start a simulation, it runs ...
jvn91173's user avatar
  • 624
2 votes
1 answer
244 views

I've noticed that games like Diep.io are using floating decimal points for thin stroke lines on the grid. I have even tried this myself, by adding 0.5 to all of the ...
Jacob Gunther's user avatar

15 30 50 per page
1
2 3 4 5