🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

shooting bullets ?

Started by
3 comments, last by djsteffey 23 years, 7 months 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
Advertisement
.

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

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