]> git.itanic.dy.fi Git - sdl-planets/commit
main loop: Separate simulation time from true time
authorTimo Kokkonen <kaapeli@itanic.dy.fi>
Wed, 31 Mar 2010 16:54:29 +0000 (19:54 +0300)
committerTimo Kokkonen <kaapeli@itanic.dy.fi>
Wed, 31 Mar 2010 16:54:29 +0000 (19:54 +0300)
commit457c225f5ccaa25d88c8bf9f6ac617721987809f
tree2e75f15c71650daa5518052a63f5f2044ccd9b77
parenta671b000111a310cbb34aa77c0eed6243cb8bb99
main loop: Separate simulation time from true time

This allows simulation and other actions, such as camera movements, to
use different time steps. Now camera will move the same speed
regardless of the simulation time (eg. very low fps scenarios).

Furthermore, the maximum time step value is always respected and won't
be exceeded even though user adjusts the simulation speed to higher.

Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
main.c