Yes is global.
But i think i drop the idea of precalculated arrays of x&y coords.
What can i do when the object on-screen are many-many more then one?
I can't make precalculated table for every object...it's a lot of work!
Another question(sorry if i bother you...):with the modern pc (from p2 350 to athlon 3000 ecc ecc)is better make calculation on the fly or storing info in memory and read after the calculation???
Example:i make 30 alien for a shoot-em-up....is better that every alien calculate the route when is onscreen or is better that every alien read the data stored in array when onscreen??
(It's simplier to make my code work on the fly rather than pracalculate everything....).
One last question (alleluja!):i have read many times that is better divide the game logic in 2 trunks (or more)
load time
calculation time
display time
Actually i made only 3 trunks but in this manner
1)load time
2)object creation (types and arrays)
3)display and route calculation
Maybe my speed-down of the program is related to this method??
But i think i drop the idea of precalculated arrays of x&y coords.
What can i do when the object on-screen are many-many more then one?
I can't make precalculated table for every object...it's a lot of work!
Another question(sorry if i bother you...):with the modern pc (from p2 350 to athlon 3000 ecc ecc)is better make calculation on the fly or storing info in memory and read after the calculation???
Example:i make 30 alien for a shoot-em-up....is better that every alien calculate the route when is onscreen or is better that every alien read the data stored in array when onscreen??
(It's simplier to make my code work on the fly rather than pracalculate everything....).
One last question (alleluja!):i have read many times that is better divide the game logic in 2 trunks (or more)
load time
calculation time
display time
Actually i made only 3 trunks but in this manner
1)load time
2)object creation (types and arrays)
3)display and route calculation
Maybe my speed-down of the program is related to this method??