Weird timing issues

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

Weird timing issues

Postby GreEn`mArine » Thu Jan 22, 2009 10:57 pm

Hiho,

I've found out a weird glitch in the DP engine, it is server-specific. Keep in mind, I am not saying "FIX IT NOW DWARFS" or anything like that, I'm just asking whether this is known and whether/how it could be fixed

The time variable (of SSQC) does behave weird. Have a look at this screenshot. The first few lines show the normal output of time which I added into the SSQC code, so that time is printed each frame. In the first few lines it behaves as expected (slowmo is set to 1 at this point). But then, when I enter slowmo 0.001, things get weird. time does not continously increase anymore, but increases in steps. Also, the period at which the time value changes appears to be random. Furthermore, if you set self.nexthink inside a Think-funciton of an entity, the value of self.nextthink stays the same (it has the value of time) even though a small number, 0.0001 was added to time (self.nextthink = time + 0.0001, after value was assigned, self.nextthink is equal to time).

Please note that what I just explained only happens if the server was running a map for a long time already. It can be simulated by disabling the timelimit and use slowmo 1000 for a few seconds. Set slowmo to 1 again, let the time be printed each frame and then set slowmo to 0.0001

You won't experience this glitch if the server just loaded a new map, because in this case time will continously increase just fine.

The effect of this glitch appears in the Nexuiz sv_timeout feature, it goes to a point that the timeout feature is just broken (and the timeout is too short) once the map is running for a longer time.

I hope somebody cares to answer. I am aware that most people who are able to answer this question are actively ignoring me, but maybe they could be friendly and help at least once.
IRC quote:
[kojn] I've been coming a bit more recently
[kojn] she took it the dirty way
GreEn`mArine
Forum addon
 
Posts: 1509
Joined: Tue Feb 28, 2006 9:33 pm
Location: Germany

Postby mand1nga » Fri Jan 23, 2009 7:20 am

I'm sure you'll get more feedback @ http://inside3d.com/ , this stuff is extremely technical :)
mand1nga
Alien trapper
 
Posts: 321
Joined: Mon May 12, 2008 12:19 am

Postby GreEn`mArine » Fri Jan 23, 2009 8:45 am

done. Thx for the hint.
IRC quote:
[kojn] I've been coming a bit more recently
[kojn] she took it the dirty way
GreEn`mArine
Forum addon
 
Posts: 1509
Joined: Tue Feb 28, 2006 9:33 pm
Location: Germany

Postby divVerent » Fri Jan 23, 2009 11:14 am

This is unfixable, because it comes from time being a variable of type float, and that can't have more accuracy. The values between the time values you are showing on your screenshot simply cannot be represented in a float!

Instead, you should fix the timeout feature to not depend on slowmo. Possibly you'll have to make an engine extension to temporarily stop everything from moving, but that's the only thing you can do.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby GreEn`mArine » Fri Jan 23, 2009 11:55 am

So I assume that once time is already big (because the map was run for a long time) too big parts of the float are used for the integer-value (left side) and too little accuracy is left for the decimal point value?

About implementing slowmo differently:
A week ago I tried understanding what "pause" does, as this is basically the feature I need because it pauses the game as well and seems to work somewhat OK. Anyways, I'm not really proficient (yet) to understand, or even find or understand the engine code that deals with pause :(
IRC quote:
[kojn] I've been coming a bit more recently
[kojn] she took it the dirty way
GreEn`mArine
Forum addon
 
Posts: 1509
Joined: Tue Feb 28, 2006 9:33 pm
Location: Germany

Postby Alien » Fri Jan 23, 2009 11:51 pm

Number of bits for significand and exponent are fixed. You simply reach first integer which can't be represented because of too small significand.
Alien
Forum addon
 
Posts: 1212
Joined: Tue Apr 22, 2008 7:12 am

Postby GreEn`mArine » Sat Jan 24, 2009 9:08 am

In this thread ( http://forums.inside3d.com/viewtopic.php?t=1404 ) you can see my progress of thoughts.

Once my exams are over, and no1 else did it already, I'm gonna redo the timeout feature the way described there.
IRC quote:
[kojn] I've been coming a bit more recently
[kojn] she took it the dirty way
GreEn`mArine
Forum addon
 
Posts: 1509
Joined: Tue Feb 28, 2006 9:33 pm
Location: Germany


Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron