With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
Discuss & improve the game engine.

Moderators: Tequila, sparcdr, torhu

Postby sparcdr » Sat Mar 14, 2009 7:30 am

I wouldn't know. Problem is, we'd lose OpenAL support for Linux users if we went back, but if you like I can hunt for the old archive. I wasn't around when the original patches were integrated into 2.2, so whatever hika has on svn was what was upgraded more or less.
sparcdr
SG Team
 
Posts: 334
Joined: Wed Jun 13, 2007 3:41 pm



Postby torhu » Sat May 09, 2009 11:09 pm

I just tested r173 of the 1.1 branch, and the lag is still there. :( Maybe I can find time to test older revisions later.
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1111
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby Tequila » Sat May 23, 2009 5:00 am

Just find something interesting about that bug I think. On Santa Fe Express map, with the latest 1.1 engine built (r227), I can see "errorcode" at regular time step after have activated "cg_showmiss"... Torhu can you try that ? Have you the feeling we obtain bad events from the game server ?
Btw that can not be related :roll:
User avatar
Tequila
SG Team
 
Posts: 1090
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Postby torhu » Sat May 23, 2009 6:01 am

Bad events? I've noticed the taunt sound being played randomly when testing at train.

Usually that means cgame and game modules are not the same version, but I was testing with the 1.0 release pk3's, so something funny is going on. Since I've only seen this in my testing and not while playing on a regular server, I suppose it's not related.
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1111
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby Tequila » Thu Jun 11, 2009 11:02 am

Then I committed in r234 & r235 a fix for what I noticed in dm_train.

I give here the resulting patch as it contains my comment about the bug:
Code: Select all
Index: code/game/g_mover.c
===================================================================
--- code/game/g_mover.c   (revision 233)
+++ code/game/g_mover.c   (revision 235)
@@ -2032,6 +2032,20 @@
    length = VectorLength( move );
 
    ent->s.pos.trDuration = length * 1000 / speed;
+#ifdef SMOKINGUNS
+   if(ent->s.pos.trDuration<1) {
+      // Tequila comment: As trDuration is used later in a division, we need to avoid that case now
+      // I think the major side effect is the lag problem in dm_train as very high speed are
+      // used to cycle the landscape rocks with a func_train mover. With null trDuration,
+      // the calculated rocks bounding box becomes infinite and the engine think for a short time
+      // any entity is riding that mover but not the world entity... In rare case, I found it
+      // can also stuck every map entities after funct_door are used.
+      // The desired effect with very very big speed is to have instant move, so any not null duration
+      // lower than a frame duration should be sufficient.
+      // Afaik, the negative case don't have to be supported.
+      ent->s.pos.trDuration=1;
+   }
+#endif
 
    // looping sound
    ent->s.loopSound = next->soundLoop;


dm_train is the only released map with very high speed set to func_train entities (set speed is 9999999999999999999999999999999). So I don't think this fix is related to all freeze/lag cases, but I hope it completly fix the dm_train one.

Btw other cases will have to be confirmed.

Volunteers needed !!

8)
User avatar
Tequila
SG Team
 
Posts: 1090
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Postby torhu » Fri Jun 12, 2009 12:25 am

Nice work!

I did some quick testing of DLL builds of r233 and r235, using the 1.0 engine. The lag is there in r233, but seems to be completely gone in r235. :)

But with r235 I see a new bug. To test, I start on the roof of the car closest to the locomotive, then jump onto the roof of the second, then the third car. When I do that, I often see something that looks like some brown squares above the train. It's just for a fraction of a second.
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1111
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby Tequila » Fri Jun 12, 2009 5:04 am

Thanks torhu for the testing.

I've not noticed that bug, but now I can see it. Btw I don't see it at each time I'm jumping between roofs, I just need to stand up toward the end of the train even without moving and sometime I can see that "brown squares". I can see them also in spectator mode.

What I guess about that side effect: in fact, the "train" entities are the rocks around and the train station. And they come back quickly to the front of the train after they go outside your field of vision... before that patch the engine didn't handled correctly the "infinite" speed and you got that freeze/lag because the rocks entity got an infinite boundingbox... Now the speed is less infinite but you get sometime a frame showing you a flying rock...

For that bug, I would prefer a map side fix, but I will eventually try to figure out in code.

So L3th4l, do you think you can change the way the rocks train is handled when they come back to front ? Can you try to add 2 more corner paths to make them going under the floor ? So they come back in front by an invisible place...
User avatar
Tequila
SG Team
 
Posts: 1090
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Postby Tequila » Wed Sep 09, 2009 11:36 pm

Finally I got a good work-around to fix that last "flying brown squares". The work-around was committed few days ago in SG 1.1 branch, reveision 271.

My solution was to not send the "mover entity" which is moving too fast through the network, so the client won't have the chance to show it flying in case it is visible for some reason...

So I'm proud to announce dm_train is fully supported without major/visible bug by the 1.1 branch engine.

Until anyone found one another of course :D
8)
User avatar
Tequila
SG Team
 
Posts: 1090
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Postby ReD NeCKersoN » Thu Sep 10, 2009 12:03 am

WOOT! That's great news! :D
Image
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Postby Sucalakafufu » Thu Sep 10, 2009 1:55 am

nice! good job Tequila! :D
SG Name: Sucalakafufu
Clan: [CWNN] - Clan With No Name
User avatar
Sucalakafufu
Gunslinger
 
Posts: 239
Joined: Thu Apr 16, 2009 8:59 am



Postby sparcdr » Thu Sep 10, 2009 6:24 am

I'll get around to making some official respins otherwise I'm essentially a corpse.
sparcdr
SG Team
 
Posts: 334
Joined: Wed Jun 13, 2007 3:41 pm



Previous

Return to Code

Show Sidebar
Show Sidebar

User Control Panel