Re: time
"Brett Bibby" <[email protected]>
| Newsgroups | gmane.games.devel.general |
|---|---|
| Organization | GameBrains |
| Message-ID | <[email protected]> |
That's a great document and covers pretty much everything we discussed internally, nice reference! The doc's discussion of different resolutions combined with independent running (some time keeps running even when paused) is something I hadn't thought of and I will look into that. Meanwhile, anybody doing an online game care to comment how you handle time? As a player of MMORPG I always am wondering how they timestamp and integrate time into their engines, and if feasible I would like to make sure we can support arbitrary lengths of time too. Brett ----- Original Message ----- From: "Tom Spilman" <[email protected]> To: <[email protected]> Sent: Saturday, February 21, 2004 11:14 AM Subject: RE: [GD-General] time > > http://www.dallasigda.org/notes.htm > > You'll see a document called "Time in games" which are notes on a > presentation done by Squirrel Eiserloh. It covers a lot about time in > Win32 and the different methods he's used to tackle it. People may find > it helpful. > > Tom > > > > -----Original Message----- > > From: [email protected] > > [mailto:[email protected]] On > > Behalf Of Brett Bibby > > Sent: Friday, February 20, 2004 8:59 PM > > To: [email protected] > > Subject: [GD-General] time > > > > > > Howdy, > > I have been wrestling with time in my engine for some time > > now (no pun intended). I wondered how other people are > > handling time? Our game engine is specifically designed for > > PS2/Gcn, but it runs under Windows too. Specifically... > > > > What are the different components that people are using? We > > currently have a single 32-bit time variable initialized to > > zero at startup and that's it. Each frame we either count > > v-blanks, use system ticks/timers or OS facilities custom for > > each platform to increment the global time value, usually > > stored in microseconds and rounded up to millisecond > > resolution for use in the engine. Works well and I have done > > this for every game engine I have developed so far. > > > > Feels like a change may be warranted though as online gaming > > becomes more popular, since if the game was to run for many > > days it would overflow and timestamping may be problematic. > > So now I'm thinking of adding a time struct (different from > > ANSI C though) whereby we store the year, month, day, hour > > and minute, and second and also a conversion struct that says > > how many mins->hour->day->month->year so we can convert > > "real" time into game time. I can pack this into 64-bits, but > > then again a simple 64-bit timer using the old way to simply > > count ticks would also eliminate the overflow problem anyway > > and so I'm questioning the right thing to do. Also, I hoping > > to be able to use absolute time for certain things where we > > used to use delta times. What are people using for timestamps > > for online games? Does each game session reset the server > > session time to prevent eventual overflow? Or is a more > > robust timing mechanism used? Are people using microseconds? > > milliseconds? > > > > Thanks, > > Brett > > > > > > ------------------------------------------------------- > > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > > Build and deploy apps & Web services for Linux with > > a free DVD software kit from IBM. Click Now! > > http://ads.osdn.com/?ad_id56&alloc_id438> &op=ick > > > > _______________________________________________ > > > > Gamedevlists-general mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > > Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU7 > > > > > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id56&alloc_id438&opÌk > _______________________________________________ > Gamedevlists-general mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU7 ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id56&alloc_id438&op=click _______________________________________________ Gamedevlists-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gamedevlists-general Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU7