Home   Help Search Login Register  

Author Topic: may sound weird but what cause 's lag ??  (Read 1103 times)

0 Members and 1 Guest are viewing this topic.

fenster

  • Guest
may sound weird but what cause 's lag ??
« on: 23 Jul 2003, 14:05:11 »
well  i have played flash for some time and im wondering  if someone  could explain  what   cause  lag on mp games   now i  know you will  say  " dumb ass " but what   i mean is   if you take  for  instance a  good  example  the  "bas  mission " where  you take the airport  has  helicopter  armour and well  over 60  guys  on the  map  

  but  when  i seem   to make  mission   with half that amount on  it   seem's to lag   so   the question  i am  asking is  
   
   1.   do  the model   you use   ie : bas delta , lsr spetnaz   and the island   chetyna have a  effect on lag or   not
   2.   do    user mad  island have any effect  or  not   the  same  goes for user made  vech

   what  is the secret in making a smooth  mission  

the  mision  i  had  was a set  of  players   verus  ai   and a human element   to add  to  diffculty   please   enlighten me  if you can  please   no  insulting  posts as  it si  very  easy to offer   critism but harder to offer  help

Rubble_Maker

  • Guest
Re:may sound weird but what cause 's lag ??
« Reply #1 on: 23 Jul 2003, 14:40:31 »
1. Yes different models use different texture resolutions, and different amount of custom sound effects, which determines how many memory they take up. Once all available RAM is taken up, the virtual memory manager starts purging blocks of memory and writes them to the HDD to free some RAM. Once the purges memory is needed again (for example, it could contain parts of the landscape model data), ofp has to load it from the HDD. The problem is that the HDD is one million times slower than the RAM, so thats why you get horrible lag once you're out of RAM.

2. Yes, for example, Nogova is significantly more resource-hungry than Malden. The reason is that it uses high-res textures, and has much higher geometry resolution (i.e. more vertices).

The secret in making a smooth mission: Use as many units as you like, but as few unit types as possible! For example, adding 40 Abrams tanks to a map will cause only a fraction of the lag that you will get when you add, say, 10 Abrams, 10 T-80, 10 T-72, and 10 BMP. The reason is that for the 40 Abrams tanks, ofp loads the model,texture and sound data only once, whereas the different tanks all have their own sound, model and texture data, which needs to be loaded.

Use the "setViewDistance" command to reduce the view distance; it also helps a bit to reduce lag.

If you have the necessary scripting knowledge, handle your units dynamically, i.e. use "createVehicle" and "DeleteVehicle" to add units only where they're needed, and delete them from the map once they're dead and the player is far away from them. In an average mission, the player will probably not see more than maybe 5% of all units at a time, so handling the units dynamically bears a great potential for optimization.