Design choice to render bullets?

Started by abstauber, Tue 27/04/2010 20:08:46

Previous topic - Next topic

Monsieur OUXX

Quote from: abstauber on Fri 30/04/2010 14:45:38
Next time I'll only listen to Monsieur OUXX, when I understand what I write.  :-[

Yeah, if you wanted to use integers all the way you'd have needed to have calculated "speedx" and "speedy" from the very beginning (using floats), and stored their approximate values as integers. Then, when you move your sprite, you'd just need to add speedx to x and speedy to y.
You can't mix integers and floats (or you have to be careful), because if you do it too soon or too late, it screws the accuracy of the results and produces random values.

But still, your code is good! Nice script.
Damn, I'm dying to write fun things like that, when instead I've broken the "interval red-black binary trees" of AGSH again :-/  
 

SMF spam blocked by CleanTalk