Message Boards

Topic: clock running too fast  (Read 9504 times)

Offline prfunky

  • Posts: 3
    • View Profile
clock running too fast
« on: May 06, 2014, 11:41:16 »
Hello,

Pardon me for this as I am EXTREMELY new to Odamex;
I have issue with a private server (wanted to test before making a public one ~ glad I did!) having the game clock moving too fast. The server I set up has monsters enabled who travel extremely fast. When I'm dead, and looking at the scoreboard screen, I noticed the seconds on the clock ticking away fast too. From the server command window, I calculate that a 15-minute timelimit game is happening in 3 minute and 50 seconds. See:
[11:30:39]                         DEATHMATCH
[11:30:39] -----------------------------------------------------------
[11:30:39] Fraglimit: 30
[11:30:39] Timelimit: 15
[11:30:39] ID  Address          Name            Frags Deaths  K/D Time
[11:30:39] -----------------------------------------------------------
[11:30:39]
[11:30:44] --- MAP01: "entryway" ---
[11:34:29]
[11:34:29]                         DEATHMATCH
[11:34:29] -----------------------------------------------------------
[11:34:29] Fraglimit: 30
[11:34:29] Timelimit: 15
[11:34:29] ID  Address          Name            Frags Deaths  K/D Time
[11:34:29] -----------------------------------------------------------
[11:34:29]

Have I completely F'd up the cfg file for running a game?

The system I'm running the server on is of dual-core Athlon variety. Do you think this has anything to do with the problem?

Since I'm new, I posted this in technical support rather than in bug tracker as it may very well be that I'M source of this bug.

Thank you in advance for any input into this.

Offline Dr. Sean

  • Developer
  • Posts: 69
  • G'd up from tha feet up
    • View Profile
    • Odamex - Helping middle-aged men relive their teen years
Re: clock running too fast
« Reply #1 on: May 07, 2014, 09:58:24 »
There are several engine functions to return the number of milliseconds since the game began execution. Which operating system are you running this server on?
Odamex Development Team Member

Offline prfunky

  • Posts: 3
    • View Profile
Re: Which operating system are you running this server on
« Reply #2 on: May 07, 2014, 11:50:36 »
Thanks for that quick response! Hopefully this information helps:

System information for \\WINFAST:
Uptime:                    0 days 17 hours 29 minutes 46 seconds
Kernel version:            Microsoft Windows XP, Multiprocessor Free
Product type:              Professional
Product version:           5.1
Service pack:              3
Kernel build number:       2600
IE version:                8.0000
Processors:                2
Processor speed:           2.0 GHz
Processor type:            AMD Athlon(tm) 64 X2 Dual Core Processor 3800+
Physical memory:           896 MB
Video driver:              NVIDIA GeForce 6150SE

Offline Dr. Sean

  • Developer
  • Posts: 69
  • G'd up from tha feet up
    • View Profile
    • Odamex - Helping middle-aged men relive their teen years
Re: clock running too fast
« Reply #3 on: May 12, 2014, 12:44:08 »
I am fairly certain that this is an issue related to Odamex and Odasrv using the Windows API QueryPerformanceCounter to provide timing functionality.

The following article gives a brief overview of using that API for games: http://msdn.microsoft.com/en-us/library/windows/desktop/ee417693%28v=vs.85%29.aspx

Of particular note, the article provides links to two additional articles detailing issues with AMD dual-core CPUs and Windows XP. You can try the work-arounds provided in those links. Alternatively, we can look into using an alternative timing function in a special binary for you (if possible).
Odamex Development Team Member

Offline prfunky

  • Posts: 3
    • View Profile
Re: clock running too fast
« Reply #4 on: May 12, 2014, 22:09:53 »
Thanks again Dr. Sean!

From the article you posted there, it looks like there might be a way to fix this by setting affinity to use only one processor. But that looks like a programming issue or quite simply, me recompiling Odamex this way for use. Though I might try this at some point when I have time, I really don't have much of an interest in it. Primarily, I'm a level designer and have been researching alternate source-ports to gauge the compatibility of my maps to those ports. At this point, I'll have to lump Odamex into the camp of incompatible along with Vavoom and Risen3d. For me, it's really no big deal as all of my maps so far are quite compatible with ZDoom/GZDoom, ZDaemon (with minor deficiencies I've already worked around) and Zandronum. In fact, Odamex may still be compatible with my levels when run without monsters but I'll have to get one of my friends to join me in a little testing to verify.

One last question, just out of curiousity: why isn't timelimit value for a game not based on the system's real-time clock? I have done some video game programming in the past and was taught by the books I read about the RTC.

Only curious, not complaining,

John