PDA

View Full Version : Dealing with multiple projectiles


SniperSteve
2012-04-25, 02:01 PM
So the images of the TR weapons with their presumably crazy fast fire rate got me thinking. If there are a few Galaxy gunships with these quad barrel miniguns on them, how on earth are they going to do projectile physics on all of those individual bullets when there is already a battle raging on below?

I came to the conclusion that either Forgelight is magic, or they will do some sort of projectile clustering.

What I mean by projectile clustering is (for the case of the quad minigun) that every time you click the fire button it shoots 4 rounds, one from each barrel. However, there is only one projectile calculated and would have the damage potential of 4 bullets. Of course, It would appear/feel/sound like four bullets were fired.

What do you guys think? Would this seem to be an appropriate solution for optimizing the weapons to get better performance?

kaffis
2012-04-25, 02:14 PM
What do you guys think? Would this seem to be an appropriate solution for optimizing the weapons to get better performance?
More likely is that four projectiles will fire simultaneously, and rather than doing four physical calculations, one physical calculation will be performed, and then the other 3 will be simple euclidean transformations (basically, a graphical/hit detection copy/paste) on top of that.

What that would equate to is that all 4 bullets would have the same bullet drop, the same "inaccuracy" based on recoil/cone of fire/whatever you want to call the current mechanic, etc.

Whether they're actually doing that or not, I couldn't tell you.

Pozidriv
2012-04-25, 02:17 PM
Alot of games handle weapons with implied ridiculous fire rates more or less like you described. If i recall correctly the Frostbite engine has somewhere around 1200 (or was it 2000) RPM cap before the engine can't keep up.

Rbstr
2012-04-25, 02:23 PM
It's not like simple gravity is complex math. I don't see why it would be much harder than bullets that travel straight.
Even if it is, I would think simple bullet drop calculations would pale in comparison to hit detection anyway.
So, if they were to do clustering it'd probably be on that consideration, not the physics.

Eyeklops
2012-04-25, 02:32 PM
Black Magic and Demon script.

Lonehunter
2012-04-25, 02:35 PM
Forgelight is magic
Exactly, and I think T-Ray would back me up on this

onwee
2012-04-25, 02:36 PM
Bah, I doubt it's hard to potentially track millions of bullets and missiles, and sync that with thousands of clients in a secure manner.

They probably just used a game maker add-on or something.

Trolltaxi
2012-04-25, 02:47 PM
That part is programmed by Vanu himself. Nuff said, human!

NCLynx
2012-04-25, 02:50 PM
Bah, I doubt it's hard to potentially track millions of bullets and missiles, and sync that with thousands of clients in a secure manner.

They probably just used a game maker add-on or something.

Nah they programmed PS2 in Notepad, Forgelight is just a codename.

kaffis
2012-04-25, 03:22 PM
Nah they programmed PS2 in Notepad, Forgelight is just a codename.
You could play a flight sim in Excel '97, and Pinball in Word '97...

Neurotoxin
2012-04-25, 04:07 PM
I can't see any reason why each projectile can't be tracked separately and have full functional physics. There will be a lot of them, but they also die / disappear rather quickly.

It may be a fun Closed Beta exercise, to get everyone in a group together and all fire shots in the air, in order to see if 2000 people with full-auto weapons can make the servers chug unreasonably hard.

Ailos
2012-04-25, 05:42 PM
I think you're underestimating the processing capabilities of modern computers. I don't see any problems with calculating several million projectiles as long as each one is "just" a projectile (i.e. low-polygon model with minimal texturing). I mean, they're not going to treat each projectile as a fully-engineered elastic object, it's just a light-source with mass that obeys gravity, and that's a pretty simple algebraic calculation.

Collisions would be a different story, especially elastic ones (but I don't think they're doing that either). If everything is a rigid body, why the hell not?

headcrab13
2012-04-26, 04:40 AM
Since a quad-cannon with a high rate of fire could kick out hundreds of bullets a second, they'll probably draw a handful of tracers to represent the massive amount of lead, without actually rendering most of it.

Destroyeron
2012-04-26, 11:03 AM
As long as I get my bullets idc.

basti
2012-04-26, 11:30 AM
I think you're underestimating the processing capabilities of modern computers. I don't see any problems with calculating several million projectiles as long as each one is "just" a projectile (i.e. low-polygon model with minimal texturing). I mean, they're not going to treat each projectile as a fully-engineered elastic object, it's just a light-source with mass that obeys gravity, and that's a pretty simple algebraic calculation.

Collisions would be a different story, especially elastic ones (but I don't think they're doing that either). If everything is a rigid body, why the hell not?

What are you talking about? Clearly not the same stuff as we do.
You talk about rendering the stuff. Thats no issue, and wont ever be, because if it gets 2 much, you simply skip a few. Less bullets on screen = more fps.

But we talk about calculating all those hits etc. Thats a whole different topic, and lots of tricks are used to manage a lot of bullets. Would like to know how they manage the stuff in forge light. :)

Geist
2012-04-26, 12:17 PM
Forgelight is magic. 5 year old computers playing with 2000 players and thousands of bullets being fired simultaneously? Not only that, but 666v666v666 us obviously part of some demonic ritual.

TerminatorUK
2012-04-26, 02:06 PM
As the devs stated previously, the engine will use a combination of Client Side and Server Side hit detection.

I would speculate this is one of the elements where the client would calculate and send the 'hits' to the server with the graphical representation in the game world being a blur of tracer fire rather than tracking the rounds individually.

Ailos
2012-04-26, 04:07 PM
What are you talking about? Clearly not the same stuff as we do.
You talk about rendering the stuff. Thats no issue, and wont ever be, because if it gets 2 much, you simply skip a few. Less bullets on screen = more fps.

But we talk about calculating all those hits etc. Thats a whole different topic, and lots of tricks are used to manage a lot of bullets. Would like to know how they manage the stuff in forge light. :)

I was just saying that even if you render each individual bullet, I don't see that being a problem (well, maybe on 5 year old hardware, in which case, like you said, just skip a few, as long as the damage is the same).