Timer
- Posted by Chris Saik <csaik2002 at yahoo.com> Oct 01, 2002
- 456 views
Hello all, I am writing a text-based game in DOS32 and am trying to determine the best way to simulate real time. For instance, in my game each action that the character does takes a specified amount of time -- walking (ft per second), firing a weapon (number of shots per second, reload time), etc, for added realism. I am considering using a global timing procedure that will execute commands entered by the user (currently via keyboard) and display the results of those commands every tick of the clock, if applicable. If the user sits there and does nothing, then time will continue to pass allowing opponents within the game to reposition themselves, take cover, reload, etc. My question is, what in your opinion is the best way to accomplish the timing procedure?