Similar when game programming?

Started by
3 comments, last by Ghhetto 20 years, 10 months ago
Hello, I work for a software company that specializes in business process simulation. We model hospitals, manufacturing processes, banks, call centers, etc. As part of our library, we have a "TimeTable" and "TimeTableEvent". Basically, when we start the program, the program is at time zero. As things happen, future TimeTableEvents are put in the TimeTable. The TimeTable basically just progresses through its list of events, updating the current time and executing the event. Do games use something similar? Using a TimeTable, the program can jump large amounts of time when no events occur. Games need to move consistently. I could see having to iterate over most (perhaps all?) objects every iteration of time to insure all objects are in the same time? Any thoughts on the use of a TimeTable with future events? Could this be used for some typical game objects? Thanks, Dan
Advertisement
this seems to be much more used to simulate something... but in games you want the user to interact with the game... so its not really a simulation... things will happen depending on the user input but not depending on the time since you start the game...

at least for the way i understand what you said... i dont see it beeing really applicable to games in general

altho one thing that could be done is have a time table with a series of event that you want to make happen once the user made something...

Yann L PWNS Carmack
»Yann''s engine shots
»Yann''s game concept
Stéphane RossGame Gurus Entertainment
that would probably be too slow for a game loop, since you have to get it cycling fast enough to look nice and feel responsive... but it would work nicely for, say, an event queue in an RPG.
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
Something simmilar is sometimes used in the AI sections of games. The only place I''ve seen it so far is in quake 1. In the scripting language, you can do something like
monster->nextthink = Time() + 5.0;
monster->thinkg = somefunction;
(not exact code just the general idea) and it will call somefunction in 5 seconds with a global variable ''self'' set to the monster.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
In general, the concept would work. But Win32 already has some functions like that, and the May 2003 issue of Windows Development Magazine has an article on this. However, this could help wityh timing game events and real time programs.

Scott Simontis
Engineer in Training
Have a nice day!
Scott SimontisMy political blog

This topic is closed to new replies.

Advertisement