Urban Terror Forums: [Bug Report and Fix] Funstuff must be pre-loaded before gameplay to avoid other gamers from freezing your FPS when they join - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

[Bug Report and Fix] Funstuff must be pre-loaded before gameplay to avoid other gamers from freezing your FPS when they join Rate Topic: -----

#1 User is offline   mitsubishi Icon

  • Account: mitsubishi
  • Country:
  • Joined: 28-February 10
  • Posts: 13,481

Posted 30 December 2009 - 10:49 PM

(Related:[Bug report and Fix] Audio files in need of Pre-Caching to avoid their playback freezing rendering occasionally)

This is similar to the radio and a few other audio files having to be pre-cached (that can freeze rendering for an instant the first time they are played) but manifests itself differently: When someone with funstuff that isn't already seen in the game enters the match, only then the game attempts to read the .md3s from the disk. This again can freeze rendering for an instant (shown with blank gaps on lag meter) because of fread()ing the disk at that time. I timed the event of File Reads for md3s at those instances and at points the delay reached 400msec. 400msec is enough to be a very noticeable/irritating freeze (various were up to 50msec which was still noticeable).

According to Timbo, an ioq3 dev, asset loading [and hence disk access] should not be done during gameplay


a blunt workaround on my sig's .exe (similar to a radio audio precaching workaround) attempts to cache all funstuff .md3s each renderer restart (with RE_RegisterModel()), not sure if it works fine yet. edit: it does, it's fine.



All such effects are more apparent on certain systems and usually only after a boot/1st run of the game. OS caching may prevent freezing from happening for the same asset unless one returns from hibernate, waits a lot, etc.


fs_debug can also show directly what is being read for the 1st time.

This post has been edited by mitsubishi: 23 May 2010 - 04:34 PM


#2 User is offline   MaJ Icon

  •   verified user   
  • Account: maj
  • Country:
  • Joined: 07-May 09
  • Posts: 189

Posted 31 December 2009 - 02:56 AM

View Postmitsubishi, on 30 December 2009 - 10:49 PM, said:

This is similar to the radio and a few other audio files having to be pre-cached (that can freeze rendering for an instant the first time they are played) but manifests itself differently: When someone with funstuff that isn't already seen in the game enters the match, only then the game attempts to read the .md3s from the disk. This again can freeze rendering for an instant because of fread()ing the disk at that time. I timed the event of File Reads for md3s at those instances and at points the delay reached 400msec. 400msec is enough to be a very noticeable/irritating freeze (various were up to 50msec which was still noticeable).

According to Timbo, an ioq3 dev, asset loading should not be done during gameplay


a blunt workaround on my sig's .exe (similar to a radio audio precaching workaround) attempts to cache all funstuff .md3s each renderer restart (with RE_RegisterModel()), not sure if it works fine yet.



All such effects are more apparent on certain systems and usually only after a boot/1st run of the game. OS caching may prevent freezing from happening for the same asset unless one returns from hibernate, waits a lot, etc.


The way q3a dealt with this issue of hitching on player models (since many more models could be chosen in q3a than UrT) was with a cvar "cg_deferPlayers". When set to 1, models of players that connect after you join are loaded only when the scoreboard is shown (by pressing tab or dying). Setting it to 0 would load their model when they connect. This way, you can't lag in the heat of battle. The development team may want to consider a new cvar of r_deferFunstuff to deal with this issue.

#3 User is offline   mitsubishi Icon

  • Account: mitsubishi
  • Country:
  • Joined: 28-February 10
  • Posts: 13,481

Posted 31 December 2009 - 03:33 AM

yes, definitely an elegant solution is required.

btw, the blunt workaround appears to be working. I played for some time after a hibernation (so that OS cache is cleared to get fresh fread()s) and there was no freeze. I rotated through all of them on purpose, still no freeze.

This post has been edited by mitsubishi: 31 December 2009 - 03:34 AM


#4 User is offline   mitsubishi Icon

  • Account: mitsubishi
  • Country:
  • Joined: 28-February 10
  • Posts: 13,481

Posted 31 December 2009 - 03:18 PM

I have to add that both of these pre-caching issues may be affected by the system but it occurred to me it may be very related to the technology of the hard drive. Seek Times, Sleep to save Energy, stuff like that may be very related.

#5 User is offline   mitsubishi Icon

  • Account: mitsubishi
  • Country:
  • Joined: 28-February 10
  • Posts: 13,481

Posted 02 January 2010 - 01:59 PM

Addition: The effect may be also reproduced if someone changes funstuff on the fly; if the funstuff hasn't been seen in the game it will attempt to access the disk.

nasty thing is, that someone, may be someone else.

This post has been edited by mitsubishi: 02 January 2010 - 02:06 PM


bullet_loaderAdvertisement

#6 User is offline   mitsubishi Icon

  • Account: mitsubishi
  • Country:
  • Joined: 28-February 10
  • Posts: 13,481

Posted 03 January 2010 - 05:57 PM

deleted double post.

This post has been edited by mitsubishi: 04 January 2010 - 10:35 PM


#7 User is offline   Dark-knight Icon

  • Account: darkknight
  • Country:
  • Joined: 28-February 10
  • Posts: 1,753

Posted 06 January 2010 - 01:26 AM

Q-Q-Q-Q-Q-QUADRUPLE POST!!!!!!!!!!!

View PostbeautifulNihilist, on 09 September 2015 - 08:50 PM, said:

there are no flaws in Urban Terror, only features.

#8 User is offline   mitsubishi Icon

  • Account: mitsubishi
  • Country:
  • Joined: 28-February 10
  • Posts: 13,481

Posted 06 January 2010 - 01:40 AM

yes, it's a bug report, not a chat.

#9 User is offline   mitsubishi Icon

  • Account: mitsubishi
  • Country:
  • Joined: 28-February 10
  • Posts: 13,481

Posted 27 February 2010 - 12:31 AM

I wonder if quirks such as this affect servers.

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942