Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Ghhetto

Similar when game programming?

This topic is 5478 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!