Suppose I have a dot in a 2D cartesian plane, placed randomly. [Dot.x=2, Dot.y=3].It moves in a straight line with a constant speed/velocity.[const int speed = 5 ;// meters /seconds]
I'm imagining the game loop would look like this :
delete the dot;
redraw the dot;
I dont understand how exactly is the dot's animation done.At the second 0 the dot is in (2,3) and the second 2 it immediatly jumps at (7,3).Isnt that motion kind of unnatural?Its like, one moment he's here and the next moment he's suddenly far away, without me seeing how he actually "goes".
To help you understand better what I'm trying to say, l sketched the first and second iteration [or, how I think they should be ] :
I hope you understand.
So how can the game loop be altered to achieve that animation ?
Does it have something to do with the frame-rate ? I dont know much about this concept except that in one second, the user seex 40-60 frames.
The only background I have in game programming is simple console games and replicates after popular games [like snake, breakout, collapse, ].So this is a new territory for me .
Edited by cold_heats_.--., 20 June 2012 - 10:50 AM.