Advertisement

shooting bullets ?

Started by November 11, 2000 01:01 PM
3 comments, last by djsteffey 24 years ago
I am currently in the middle of writing my multi-player space shooter (actually just about done). I was wondering when I should send information that a bullet has been fired by one of the players. Right now I am sending position and orientation infor about 10 times per second (this is being designed for a T3 connection between me and my friends, so data size and speed is not really an issue). Each player has a max firing rate of somewhere between 6 and 7 bullets per second. right now when a bullet is fired, I send a new packet. This is independant of the position packets being sent 10 times per second. So actually, there could be somewhere around 16 or 17 packets per second. Does anyone have a better qay to do this ? "Now go away or I shall taunt you a second time" - Monty Python and the Holy Grail themGames Productions
.

"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions

Advertisement
Do you send 1 packet per bullet, or keep sending updates on the bullets position?

Did you use any dead-reckoning (extrapolation) on the positions?
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
i send one packet for each bullet just once when it is fired......
i send its starting position and x-y velocities. Since they travel in a straight line, I just interpolate their position on each computer from then on.
Is this a good method ?


"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions

Your best bet is to time your bullets so that they fall on or close to a regular update packet. Each bullet is sent with a timestamp and initial vector, so that the trajectory can be predicted no matter if it is on time or a bit late.

At worst, you can get away with only 2 or 3 extra packets. (That said, I would strong suggest that you don''t send more than 10 packets per second, no matter how good your link is).

Matt Slot / Bitwise Operator / Ambrosia Software, Inc.

This topic is closed to new replies.

Advertisement