Game Development Community

Vehicle explosions and packet rate

by Jesse Liles · in Torque Game Engine · 06/11/2009 (4:41 pm) · 1 replies

I've run into an issue where I'm using flyingVehicle and aiFlyingVehicle from the flightGameExample and vehicle explosions aren't always occuring when the vehicle is destroyed. After doing some testing, I've discovered that ShapeBase::blowUp() is not always being called when the vehicle is entering the Destroyed state. blowUp() is called from ShapeBase::unpackUpdate() and just as a test I raised the packet rate to client up to 32 from the default of 10, and the packet size to 450. This has resulted in blowUp() being called much more frequently but not every time.

So my question is, is there some way to ensure that blowUp() is called on each client every single time any vehicle is destroyed in the game? I don't like the idea of leaving the packet rate set so high as it seems like that will cause problems for players in a high latency situation, as well as problems on the server if there are many clients connected.

#1
06/11/2009 (8:40 pm)
I may have fixed the problem, it looks like I was deleting the vehicle objects as soon as they were destroyed due to not setting $VehicleTimeoutValue. The delete call was being scheduled for 0 milliseconds after the onDestroyed call. I guess that's what I get for not checking the obvious first ;)