Author Topic: Physics Vehicles:Can they be optimized? +More  (Read 1763 times)

No, eventually you'll hit some limitation because of the networking or lag or something.

I started lagging badly after around 60-70 I think.

I'm sensing the picture is photoshopped. Make one row of cars, picture. moe the row aside, picture, keep doing that, then with all the pictures put them ontop of eachother in layers, and erase the space of land that's over the jeeps.
after all that you should have this picture.
to do that, you'd need to do two rows at once, then shift by one row so that you get the shadows correct

Highly advised you don't use this
function servercmdjeep(%cl)
{
%position = %cl.player.getPosition();
   %posX = getword(%position, 0);
   %posY = getword(%position, 1);
   %posZ = getword(%position, 2) + 10;
   %rot = getWords(%position, 3, 8);
%newcar = new WheeledVehicle()
   {
   
      dataBlock = Jeepvehicle;
      client = %cl;
      initialPosition = %posX @ " " @ %posY @ " " @ %posZ;
   };
   MissionCleanup.add(%newcar);
%newcar.setTransform(%posX @ " " @ %posY @ " " @ %posZ @ " " @ %rot

tested and working
although, you can not clear them with /clearvehicles, this will spawn you a jeep when you type /jeep
this will FORCE a jeep to be spawned.
Also, if too many jeeps are spawned, you guessed it, you lag alot
don't have too much fun);
}

« Last Edit: December 04, 2012, 01:25:26 AM by MARBLE MAN »



Highly advised you don't use this
function servercmdjeep(%cl)
{
%position = %cl.player.getPosition();
   %posX = getword(%position, 0);
   %posY = getword(%position, 1);
   %posZ = getword(%position, 2) + 10;
   %rot = getWords(%position, 3, 8);
%newcar = new WheeledVehicle()
   {
   
      dataBlock = Jeepvehicle;
      client = %cl;
      initialPosition = %posX @ " " @ %posY @ " " @ %posZ;
   };
   MissionCleanup.add(%newcar);
%newcar.setTransform(%posX @ " " @ %posY @ " " @ %posZ @ " " @ %rot

tested and working
although, you can not clear them with /clearvehicles, this will spawn you a jeep when you type /jeep
this will FORCE a jeep to be spawned.
Also, if too many jeeps are spawned, you guessed it, you lag alot
don't have too much fun);
}


I had 12 fps with 400 jeeps and max shaders
Also, do this:
Code: [Select]
new SimGroup(UselessJeeps){};




UselessJeeps.add(%newvehicle);
I can't remember whether you need the {}, sorry

Edit: Your code is horrible btw
« Last Edit: December 05, 2012, 01:19:17 PM by Blocki »

Your code is horrible btw
it works though
and what part of it is horrible?

what part of it is horrible?
why are you getting the XYZ vectors separately if you're using them all together anyway?
what's with all the %var @ " " @ %tar
and it's generally just badly written