Rapid-fire weapon projectile problems
by Mark Harmon · in Torque Game Engine · 06/23/2003 (2:58 am) · 4 replies
Sometimes when I shoot a weapon, the projectile and/or it's explosion doesn't render. Other times the projectile renders, but it looks like it is emitting from a point about 5 meters in front of my player. It looks bad when autofiring due to the fact that many of the projectiles and their explosion never show up.
btw, the weapon's muzzle velocity is 400.
I searched the forums for the word "projectile" and found a few related posts, but nothing that really helps.
I understand that the projectile has to be sent through the server before it will render and that is why there is a lag. And that when rapid-firing the weapon, it will create a large amount of network traffic.
I need some advice on how to lower the bandwidth and also how to get ALL of the projectiles to render.
btw, the weapon's muzzle velocity is 400.
I searched the forums for the word "projectile" and found a few related posts, but nothing that really helps.
I understand that the projectile has to be sent through the server before it will render and that is why there is a lag. And that when rapid-firing the weapon, it will create a large amount of network traffic.
I need some advice on how to lower the bandwidth and also how to get ALL of the projectiles to render.
#2
- Cow
06/23/2003 (8:52 am)
Also consider that as your muzzle velocity rises higher, you may want to consider using ray casting to reduce bandwidth. If the projectile is moving fast enough, there isn't any need to render an image and track it on the net. People will usually buy it when hit with an "instant hit" weapon if presented properly. However, if you implement ray casting for slow moving weapons they won't. Your muzzle velocity (400 m/s) sounds high enough already to warrant a change like that.- Cow
#3
I found one problem with my projectile's datablock that fixed some of the flakiness. The lifetime was too low and the projectile was dying before the client received the packet.
06/25/2003 (1:16 am)
This is a blaster weapon and the projectile needs to be rendered so raycasting is not an option.I found one problem with my projectile's datablock that fixed some of the flakiness. The lifetime was too low and the projectile was dying before the client received the packet.
#4
One reason for suggesting warping is that there are examples in the code base. For instance, the Item class uses warping.
06/25/2003 (8:58 am)
The Projectile class has no warping. I'd suggest transmitting the muzzle position or initial position (in addition to the current position) for the Projectile instance with the initial update and warp the client to the server-side position. If you do that, might as well add the warping to the bounce update as well. The downside is that it involves adding overhead to the network to transmit the additional position vector.One reason for suggesting warping is that there are examples in the code base. For instance, the Item class uses warping.
Associate Kyle Carter