The open-source game engine and graphics engine for multiplayer, cross-platform, real-time 3D action

It is currently 2014-04-24, 23:49

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Shot lag?
PostPosted: 2011-03-24, 09:42 
Offline

Joined: 2011-03-17, 23:57
Posts: 31
I was wondering if anyone else is getting a firing "lag". Like it's taking a long time to compute a ray trace or something. It seems the further away the shot is fired, the more the lag time. Anyone?


Top
 Profile  
 
 Post subject: Re: Shot lag?
PostPosted: 2011-03-24, 11:43 
Offline
Site Admin
User avatar

Joined: 2004-08-19, 13:46
Posts: 1903
Location: Germany
drwbns wrote:
I was wondering if anyone else is getting a firing "lag". Like it's taking a long time to compute a ray trace or something. It seems the further away the shot is fired, the more the lag time. Anyone?

To the best of my knowledge, at least the ray tracing should not cause any delay: It's implementation is very fast, and the engine runs dozens of ray traces at any frame anyway.

When you try the same shot a second time, is the second shot equally delayed as the first? If not so, it's possibly a matter of initializing additional resources like sounds and textures. (Most textures including sprites are loaded in advance though, so maybe it's the sound driver that needs extra time to initialize a new sound before it's first played.)

_________________
Best regards,
Carsten


Top
 Profile  
 
 Post subject: Re: Shot lag?
PostPosted: 2011-03-24, 14:59 
Offline

Joined: 2011-03-17, 23:57
Posts: 31
It's delayed every shot by at least a slight amount, some delay more than others, most delay in outdoor area of techdemo map. I'm uploading a video to youtube so you can see it.


Top
 Profile  
 
 Post subject: Re: Shot lag?
PostPosted: 2011-03-24, 15:19 
Offline

Joined: 2011-03-17, 23:57
Posts: 31
http://www.youtube.com/watch?v=WFY5d9XL5pQ


Top
 Profile  
 
 Post subject: Re: Shot lag?
PostPosted: 2011-03-24, 20:44 
Offline
Site Admin
User avatar

Joined: 2004-08-19, 13:46
Posts: 1903
Location: Germany
Ok, thanks for the movie.
Unfortunately, it's difficult to tell what causes the lag, but it still looks to me like some kind of resource bottleneck.

When you continue to run around in the TechDemo island, does the lag still occur?
Does it also occur when you leave the building and enter the open space without firing a shot?

Then, what system specs do you have? (Type and Speed of CPU, main RAM, GPU RAM, ...)
This really looks like some kind of RAM was depleted and the system resorted to swapping things around, e.g. from GPU RAM to main RAM, or main RAM to hard-disk, etc. (you can tell the latter if a lot of hard-disk activity is involved at the same time, or much better of course, if you use perfmon).

_________________
Best regards,
Carsten


Top
 Profile  
 
 Post subject: Re: Shot lag?
PostPosted: 2011-03-25, 08:55 
Offline

Joined: 2011-03-17, 23:57
Posts: 31
Yeah, it's really strange, I don't really have this problem in other games when shooting. And the framerates are smooth when I don't shoot, only right after I click the mouse, it freezes for a split second then continues the frames. I'm on a intel dual core 2.6 with 4Gb ram


Top
 Profile  
 
 Post subject: Re: Shot lag?
PostPosted: 2011-03-25, 15:48 
Offline
Site Admin
User avatar

Joined: 2004-08-19, 13:46
Posts: 1903
Location: Germany
drwbns wrote:
Yeah, it's really strange

Yes, indeed. The problem is that I cannot see the problem here (even on the low-spec systems that I regularly use), so the helpl that I can give you is very limited.
But if you're interested enough, it's certainly possible to isolate or narrow the problem down by running various tests, e.g. does it happen also with the "Null" sound system?, does it also happen in smaller maps?, etc.

_________________
Best regards,
Carsten


Top
 Profile  
 
 Post subject: Re: Shot lag?
PostPosted: 2011-03-26, 09:35 
Offline

Joined: 2011-03-17, 23:57
Posts: 31
Sorry, but what is the null soundsystem? To answer your question about whether or not it happens when running around the map, the answer is a definite no. It's totally smooth as long as I don't fire. Also, I have startup errors in the console when running the game from a build. How do I output the console?

screenshots here -

http://img823.imageshack.us/i/pic0001a.jpg/

http://img28.imageshack.us/i/pic0002gc.jpg/


Top
 Profile  
 
 Post subject: Re: Shot lag?
PostPosted: 2011-03-26, 10:25 
Offline

Joined: 2011-03-17, 23:57
Posts: 31
I wanted to add that this "pause" also happens when resolution is set to 800 x 600 and it also happens with the Pulse rifle (every shot lags).


Top
 Profile  
 
 Post subject: Re: Shot lag?
PostPosted: 2011-03-27, 11:26 
Offline
Site Admin
User avatar

Joined: 2004-08-19, 13:46
Posts: 1903
Location: Germany
You can log the console messages to a file by running Cafu with -log:logfile.txt parameter.
The ones that you've shown though are not a problem.

If you're using a self-compiled edition of Cafu, try running it with parameter -clSoundSystem:
Code:
build\win32\vc10\x86\debug\Ca3DE\Cafu.exe -clSoundSystem:Libs\build\win32\vc10\x86\debug\SoundSystem\SoundSysNull.dll

Note that you possibly have to edit the path details (build\win32\...) for your system, and that the same changes must be made both for the ...\Cafu.exe part as well as the Libs\...\SoundSystem\SoundSysNull.dll part.

This will turn off the sound system. If the shot delay is then gone, it was likely caused by the sound system. Otherwise we should have another look at the graphics resources.

Run Cafu with parameter --help to see additional available command-line options.

_________________
Best regards,
Carsten


Top
 Profile  
 
 Post subject: Re: Shot lag?
PostPosted: 2011-03-27, 19:27 
Offline

Joined: 2011-03-17, 23:57
Posts: 31
ok I'll get back to you Carsten. Thanks for all the help!


Top
 Profile  
 
 Post subject: Re: Shot lag?
PostPosted: 2011-03-28, 13:51 
Offline
Site Admin
User avatar

Joined: 2004-08-19, 13:46
Posts: 1903
Location: Germany
I just found that in fact I can reproduce this here!
Sorry for the earlier confusion.

I'll look into it.

_________________
Best regards,
Carsten


Top
 Profile  
 
 Post subject: Re: Shot lag?
PostPosted: 2011-03-28, 16:56 
Offline

Joined: 2011-03-17, 23:57
Posts: 31
I verified this also happens with the null soundsystem.


Top
 Profile  
 
 Post subject: Re: Shot lag?
PostPosted: 2011-10-01, 21:13 
Offline

Joined: 2011-05-31, 07:37
Posts: 95
I get the same problem with the 2009 and 2010 and 2011... a deadly bug that's been around for 3 years.


Top
 Profile  
 
 Post subject: Re: Shot lag?
PostPosted: 2011-10-02, 23:21 
Offline
Site Admin
User avatar

Joined: 2004-08-19, 13:46
Posts: 1903
Location: Germany
HWGuy wrote:
I get the same problem with the 2009 and 2010 and 2011... a deadly bug that's been around for 3 years.


Ok, thanks for the feedback!
I guess this is a performance issue with tracing a rays against the terrain...

I've recorded this issue in Ticket #74 to make sure that it is not forgotten, and will look into it as soon as possible.
(Any help is welcome though! :up: )

_________________
Best regards,
Carsten


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group