Sunteți pe pagina 1din 1

To animate things smoothly, its important to know how much time has

elapsed
between frames. This time can then be used to keep animation independent
of
the frame-rate. Games should run the same speed on all computers; a game
character shouldnt suddenly be able to run faster if the computer is faster!
Timing in computer games is very important. The time between frames must
be accurate and of a high resolution or the game will appear to be jerky. To
get
the best timing functions, some C code needs to be used. This is less
daunting as
weve already used InterOp to peek at Windows messages. The time
between
frames is often called elapsedTimeor the delta time, sometimes dtfor
short,
and its measured in fractions of a second.

S-ar putea să vă placă și