"Ballistics" in video games


I’d like to start a discussion about “ballistics” in video games.

(I tried to post the same message on RelicNews forums first, but my message has seemingly been swallowed by moderation…)

First, what games have them?

Well, as you know there’s Homeworld 1 and Homeworld : Cataclysm.

Then there’s distant Homeworld “relatives” Sword of the Stars 1 & 2 (as well as Treasure Planet : Battle of Procyon).
You can seen a very nice example of projectiles from SotS1 firing here, some of which are applying force on impact :
(EDIT : New, working again, link : ) https://youtu.be/3L8kB6Brlqc
Of interest are the line of direct-fire torpedoes (the large purple ones in this video) which don’t lead their target and so tend to perform very poorly against destroyers (the smallest ship class, here you see the biggest - dreadnaughts against medium - cruisers).
Another example, with smaller mass driver weapons and tractor beams :

There’s also the line of Total Annihilation games, starting from the original :
https://youtu.be/jH2Px61f1NE?t=3m56s (admittedly hard to see, since even if the game is actually 3D, everything is displayed in 2D)
Then with Spring engine games, Supreme Commander (1 only?) and Planetary Annihilation.
You can see some examples of ballistic weapons in this video (including throwing units with repulsor beams) :

Ballistic mechanics are IMO rewarding because they allow for combat that feels more realistic (since we’ve all played some form of ball-throwing game or a game like pool where you have to hit balls).
It also sometimes allows for memorable situations like this one :
(sorry for the bad quality video)

(If you’re aware of other games where ballistics/bullet tracking/physic simulations actually impacting combat are widely used, please list them too.)

The price is potential lag, most of the games mentioned before suffer from it when there are too many units on the screen firing. This gets especially noticeable in SotS1/2 when one of the players start packing stormers or rapid-fire rockets that fire 10 submunitions per barrel… and as you have about 15 barrels per cruiser and about 13 cruiser-equivalents in the end-game fleets in SotS1 and about 25 in SotS2… 101513=1950 shots every 8 seconds… this goes up quick! (and you can have up to 8 players per battle…)

Now, there’s a new game coming up, Ashes Of The Singularity, and Stardock is saying that “every shot fired has its own targeting solution and ballistics model” scaled to “literally thousands of units” :
They’re saying that’s possible because of the new Nitrous Engine in combination with AMD’s Mantle (and/or DirectX12? There’s also “Vulcan”…)

What I don’t get is, I have been assuming for quite a while that this kind of processing couldn’t be parallelized due to synchronization issues between cores (which would only get only worse in multiplayer), but now they are saying they supposedly have found a way to do that? Or is that, as some commenters on RPS said, “bulls#!t”?

There are people right now that are comparing HW1 “ballistic” model to HW2 “RNG” one. If I’m not mistaken, most (?) ballistic models in games ALSO use a RNG system to simulate targeting inaccuracy : the shots are fired within a cone, with a RNG determining the actual angle. So if “ballistic” models are better, it’s because they allow for more complex, “realistic” and emergent gameplay, not because there’s no RNG involved.


Massively parallel physics simulations do happen. I imagine there are a number of ways to solve this particular problem, but the one that comes to mind is…

  1. Have a snapshot of every object on a given frame, their velocities and all the forces acting on them
  2. Calculate the positions for the next frame. You can break this up over any number of processors, since they’re all happening simultaneously.
  3. Check for any collisions due to the frame’s motion.
  4. The next frame is now the current frame! Do it all again.

HW2 RNG wouldn’t be so bad if the engine didn’t try so hard to make a hit happen even in impossible situations. Most games that use RNG use it in conjunction with some sort of projectile model or an instant hit animation even 2D RTS games like the C&Cs, but HW2 on the other hand uses an odd mix of RNG and non instant hit animation, and we all know how this ends, a method very close to this one is used on C&C Generals for the infantry and other low caliber ammunition, but bigger units use at least a basic ballistic model without targeting prediction.

We would be pretty happy if we could get an improved RNG model that could be less strict, or have a properly optimized version of the unguided rocket model, with that last one there is a lot of overhead happening with each bullet fired, because they are not dumb bullets, but live missiles, or even maybe a mix of the two that would help a lot.

I somewhat don’t understand what’s so rewarding about them, when it takes cheap tricks to make them work and it’s not as “real” as you think.

I long for the day that we can do gameplay physics and hit detection on the GPU. :confused:

What @Krnt_13 said is more the issue. The RNG in HW2 is just bad. It doesn’t account for [enough] probability.
If it did, you would assume it was really realistic ballistics since you’d rarely see bullets bend much if at all for impossible hits.

To add more to that, there’s things that can be done where yes it rolls the hit the moment it fires and it’s chance based, but the bullet can shoot off within the cone of fire of the muzzle to where the target be (which you get simply from velocity, the two vectors, and the distance).
This way the bullet is going to hit with little/no apparent bending. It would just bend a tiny amount if the target changes course from the predicted spot by the time the bullet gets there.
It ends up looking like it was just a bullet flying out and do to lucky/good aim and lucky conefire spread it hit the target.
With a better algorithm for the hit chancing, this would appear like physical ballistics to the point that you could just get away with lying and saying they are. Not that I would, just for argument’s sake.
Add to that, you could “deregister” the hit if the target does change direction too much between the time the bullet fired and it was expected to hit, to further ensure that the only “bullet bending” is the slightest amount that no one would ever notice.


The issue with your proposal is that it doesn’t allow for the emerging gameplay of what happens during the travel time of the projectile.
You could have the ship fire, and account for target’s speed (and even acceleration), but what if the target suddenly changes course to evade? Or if another ship (enemy or not) passes on the trajectory of the bullet ? (important for long time firing beams too) Or if the ship isn’t just one hitbox with hitpoints, but where you hit the ship matters : you might not hit the same part of it you thought you were going to…
Also, this proposal works even less if bullets can bounce off ships (and eventually hit other ships) with the angle of impact playing a major role on whether it even bounces or not and where it goes after bouncing.

IMO it is a really mixed bag. I love physics sims and make them often. But they also can react “strangely” due to scale, preserved scale, using a range of “real” physics to very basic.
This shines when plotting ballistic curves for artillery. less so for direct fire using simplistic physics. The ballistic system still needs a “giggle” factor as no real targeting system is 100% accurate (windage, range, shooter motion, etc)

A good RNG system can simulate allot of this and look good. (even simulate windage, range, shooter motion accuracy loss), Again it is how it is portrayed and the main problem people have here are the wildly “guided” shots. With a RNG system RTS balancing is much much easier. DPS can be figured directly. With any physics model it has to be simulated in each case and situation. A slight change and it the results can change radically. Total Annihilation games suffered some what from this somewhat, though this was mitigated that allot of the projectiles moved very fast or if slow had AOE.
Space battles in HW would be rather booring if the ships never missed as the ships are VERY VERY close to each other and very slow, missing is really not going to happen even with todays weapon targeting with ballistics, let alone with hypervelocity rail guns or energy weapons. Strike craft would be annihilated since the relative speeds are so close to the cap ships not the 20-50x faster as are naval fighters. Energy weapons could still have 100% accuracy 100x + the range. totally different ball game.
People’s perception of possible space battles is so completely wrong it is not even funny - scale is the biggest offender - lack of friction, relative speeds and engagement envelopes , how ships and weapon operate in a vacuum, etc. All coming down to stand off battles at extreme ranges (mark1 eyeball useless), getting hit the instant you get the warning that something was fired (ie you can’t dodge a energy weapon you can’t see till it hits you) Erratic motion = life and in space the most costly motion there is in space. and so on. Not “FUN” for most people. (except people like me :stuck_out_tongue_winking_eye: )

So in short, this is all a game and bend is to make it look good and play good and I am cool with that. It is currently set up to play like a 2d+1 naval warfare. . so again am in for whatever makes the game look, play fun, and good and easy to MOD since this can never be a “simulator”. What system you use has more to do with what you want to DO with it as every system has good and bad points.

I’m not using “realistic” in the sense of simulating a real combat between spaceships (I’m going to put quotes around that, since it was misunderstood). We can’t do that anyway since there was never any spaceship battle (known to us), so anything like that would be just extrapolation… and even then, as you said, probably wouldn’t make for a fun game.

As I already said, it’s “realistic” in the sense that we have an immediate experience of how objects behave when thrown (that is actually wired in our brain on a much more fundamental level than our culture). Which doesn’t account for most of the windage, range, shooter motion, accuracy loss… either or people wouldn’t have to be trained to become snipers.

I don’t see how balancing a game on DPS alone would be a good idea, considering that all the other properties of the unit come into play too.
I haven’t seen any of these chaotic issues you speak of in Zero-K balancing discussions. For instance this recent one. Note how the randomness issue is first brought up about a mechanic that uses an additional RNG (to determine which units to set on fire), a second time by a player that wants to add even more randomness to an already imprecise artillery weapon, then another player complains about bombers because he can’t dodge their bombs. In any case, chaotic balance issues can appear even in games that don’t use any RNG whatsoever, if say, a unit A has its healthpoints slightly lowered that allows for a unit B to now kill it with a single shot.

[quote=“ta_erog, post:6, topic:143178”]the main problem people have here are the wildly “guided” shots
What makes you think that? I don’t think I’ve even heard (or saw) this “guided shots” and “bullet bending” issues you mention before you brought it up. I thought the main issues were these three (linked) ones?

Sure I understand you where not talking about “realistic” but is always comes up in these discussions. . . ones I have been having for over a decade btw. so I headed it off at the pass per say.
But your statement about a innate understanding of ballistics is only partly correct. We understand it in our limited frame of reference. we can learn it over time on a slightly larger frame of reference. But out side that we have no innate understanding and our common sense of how it “should” work breaks down completely. At high energies and speeds things behave very differently. The math explains it though and most can’t get there head around it. No biggy normally most of the time on earth but we are talking a space battle all this applies.

not sure what you mean here. I never said DPS alone so will not defend that statement. I said it was easy to calculate DPS for any given set of attacks as it is based on a formula. This makes balancing easier as it calculates a important variable. This is not easily done on a physics model as hit probability is not controlled.

I cant comment on that since I have not worked on Zero-K but I expect they side step it a similar way with fast projectiles, short distances for the more direct fire and AOE for long. I have no idea if they put other factors in other then a sort of gravity.

Strangely this is my point? I have a feeling you misunderstood what I was saying. RNG is more controllable and less chaotic because you control the statistics.

Um have to been here long? or when HW2 came out?? this IS the main problem people have with HW2s RNG system.?!
Seriously there are 100s of posts on this new forum let alone relics.

1 Like

Zero-K also has a unit AI where the units “micro themselves” so to speak, dodging shots etc.

In HW2 usits can dodge shots but it is less exploited due to the use of RNG, which made it unnecessary, also a weird use of maneuvers in vanilla HW2 and the Remaster.

Strangely enough they do dodge in that game, I rather like that. though again dodging at that short of range is a bit much for mechs and tanks with future tech targeting. But since it is a game and you want to see all your units rather nice.
HW does have dodging, HW2 with ballistics mod also does some nice dodging.
Though again it irks me that energy weapons miss at the ludicrously close ranges but I have to keep thinking that we want to see the battle not ICONS fighting.
Some food for thought, with numbers
20mm rounds travel at ~1030 m/s 1 km range (effective) travel time to max range ~1s
5" deck gun ~808 m/s / 57mm deck gun ~1,035 m/s 9-24km for naval guns (effective) 11s to 23s
f14 travel at ~250-690 m/s 1 km / 9 km / 190 km ranges (Missiles are guided) 1361 m/s to 1701 m/s
common large war ships ~12-20 m/s (above) missile ~160 km ship to ship, ~185-370km ship to air
All in the correct ball park

Modern proto rail gun 2000–3500 m/s 161 km range (projected to 5833 to 10000 m/s very doable)
New missile speeds ~3402.9 m/s

In game (simulated m/s)
kinetic weapons go from 1500 m/s to 6000 m/s (normally large to small) 1.2to 1.6 km for small and ~6km for large. TTT 1 sec
Missiles go from 220 to 600 m/s (range is similar to guns) <=6km range
Strike craft 215 to 480 m/s
supercap ships 20-69 m/s

See more or less modern naval with VERY VERY compressed distance and less and painfully slow missiles. Again for game play so I am not nocking it - just highlighting it)
Though you would expect the exact opposite since misses can keep accelerating without air resistance to slow them, can coast at tremendous speed and use a terminal burn to maneuver for final attack etc. effectively suicide drones.
Projectiles can have ultimate range only limited by aim and time to target (TTT). TTT of 1 sec for game ships are at 1.5km and 6 km ranges .
Energy weapons really can’t miss at normal ranges and you can’t dodge them. (TTT is crazy at 1 sec is 299 792km ) no information in the universe can’t get to you before it hits at any range.

A walk in space combat (just for fun - not this game)
Projectiles can have ultimate range only limited by aim and time to target. if target is moving in a predicable manor (say orbit or transit) just about any range is possible even interplanetary. Though any random change in motion reduces the accuracy 1000s fold and you must rely on time to target to insure hits. ie distance to target / speed of projectile = TTT, TTT*target delta V in new direction < size of target / 2 . . . you can get a hit regardless of the maneuver (well a ball - kept the math simple) ie a 30m ship can dodge a projectile at 1 sec TTT with a 3g random maneuver. but can’t doge at all at 1/2 a sec TTT. TTT of 1 sec for game ships are at 1.5km and 6 km ranges and since hw strike craft are very large 20-40m they would be annihilated at .75-3km and in bad shape to 6km since this is expecting the best case for the strike craft (ie just missed from a random dodge at the moment of weapon launch, any lag in detecting weapon launch, or staying in one direction for more then 1/2s of random 3g moves and it is dead.)
Worse for cap ships as they can’t do constant high g maneuvers so you are taking 25x the range of no miss for a smaller cap ship.
Energy weapons will be at 299792km at 1 sec no chance. Here is problem is not and never dodging but ultimate accuracy. the more accurate the farther the range. Since sats can tight beam laser information to each other over 10000s of km this is going to be a long range weapon. (focus and absorption loss over distance is not a real big issue in space being a vacuum)
Fun stuff I could go on. I love doing sims of these real physics models for kicks. (not really for most games though)

I believe that some of the “Battlefield” games (not commenting on the gameplay) use a bit of both: Weapon “accuracy” is I think determined slightly randomly and can be increased or decreased in different situations, but the individual projectiles I believe are all objects with speed, acceleration, et cetera.

Doesn’t it, though?..

Sorry did not meant to add all that as a response to you. just the first paragraph.

I agree with that.

A few things I want to mention here is that HW1 and HW2 strikecraft accelerations are around 10 to 30g in base ship specs, and HW2 maneuvers have 4x multipliers for acceleration in most cases. HW2 weapons try to keep always a 1s TTT while HW1 projectiles speeds are closer to old naval projectile speeds with a range less that 2Km.

Yet still, if a Hiigaran Destroyer used simulated projectiles, since its kinetic cannons have railgun speeds, it becames a strikecraft killer if target leading is activated for those weapons. In HW1 energy weapons like Ion cannons had a perfect accuracy if the target was in the firing cone, no matter which one was, the only thing is that they had very low damage so they had to keep on target to be able to kill a strikecraft, which was very difficult for their narrow firing cone.

Interesting note about emery weapons ie Lasers/ particle beams. Is that a long continuous beam is often less useful then a much shorter pulse. With a long beam you have issues with tracking, vaporized material shielding burn through and sustained power draw. With short pulses you can dump the same or more energy in such a short time that the pulse tends to act as a explosive on impact. (the energy is dumped so fast that explosive vaporization happens causing a shock wave in the material and buckling) No issues with tracking as this is not a long slow melt through. Also smaller craft could sport more powerful weapons but with longer charge time. (massive capacitor charge vs continuous feed) So even hear things get interesting.

But your statement about a innate understanding of ballistics is only partly correct. We understand it in our limited frame of reference. we can learn it over time on a slightly larger frame of reference. But out side that we have no innate understanding and our common sense of how it “should” work breaks down completely. At high energies and speeds things behave very differently. The math explains it though and most can’t get there head around it. No biggy normally most of the time on earth but we are talking a space battle all this applies.

Again, it doesn’t matter how real ballistics behave at higher energies and speeds. And while I do like theorycrafting about space battle physics, they are offtopic here, this discussion is supposed to be about the technical side of video games and gameplay, NOT realistic space battles.

not sure what you mean here. I never said DPS alone so will not defend that statement. I said it was easy to calculate DPS for any given set of attacks as it is based on a formula. This makes balancing easier as it calculates a important variable. This is not easily done on a physics model as hit probability is not controlled.

And what calculating DPS actually brings? It’s helpful for balancing only for units that behave in the same ways (and all of them can’t behave in the same ways or you’ll have a boring game). If you have a more complex game however, you’ll have a lot more variables you can play with that give your units interesting strengths/weaknesses, like how fast a projectile travels (and can be avoided) or a turret turns (so a unit can stay out of its cone of fire :

Um have to been here long? or when HW2 came out?? this IS the main problem people have with HW2s RNG system.?!
Seriously there are 100s of posts on this new forum let alone relics.

I’m new here, I’ve read some post on relicnews forums, but I mostly read reviews of the game :
I don’t think any of them even mentioned “guided shots”/“bullet bending”…

Well, I can’t really think of an example where you would obtain such kind of a gameplay without getting close in computational complexity of what you have with a “ballistic” simulation.

What I meant by that is that you didn’t read the post. I hoped that would prompt you to reread it.

But the problem is that once people start talking ballistics it is to enhance “realism” in a game and more often that not this has a bad effect on gameplay.

It is the basis of most video games and all table top games. You can have very simplistic models or very complex ones but in the end having a statistical based game system is best for balancing hands down. Add more complexity and you hide the fact it is not a simulation. This is not just a opinion but a industry standard. Physics simulators in games are most often very simplified models with common seeds so that the same simulation can be run at different times (or location) and get the same result.
Again what people want in a multiplayer game is balance and the most cost effective way to do this is RNG.
Also emergent gameplay is not something that is useful from a devs standpoint in a MP game. it turns into a wack-a-mole game trying to keep those behaviors from unbalancing the game. Been there done that professionally.

This was a big issue both when hw2 came out and currently as the hw1 side of the remaster is now in hw2’s engine. The first 2-3 weeks of release this was one of the largest gripes. I guess you missed it. (and you will not see it in a review)

1 Like

If you want it to be able to hit something else than the target or make it miss because target’s acceleration (and the following time derivatives) changed (since you took only velocity into account), how would you do it simpler than using a “ballistic” model?

I disagree, what people want in a game (multiplayer or not) is to have fun. Sure, for a minority of people that fun comes from competitive multiplayer and they want it to be extremely well balanced, but there’s only a handful of games that really need that : the “e-sports”. And even then, my impression is that when the game settles too much in its balance it’s when it actually dies (because there are no new strategies for people to figure out). I suspect that why Blizzard has decided to try such drastic changes for the next StarCraft 2 expansion (well, drastic for Blizzard).

This wack-a-mole you’re speaking about is the price of making a game that is fun for the players (instead of one where some of them will derive DPS statistics themselves, and use them to be better at the game, instead of learning it by playing it)

Statistical models can only go so far : for instance how would you balance HW2 bombers against a Ion Cannon frigate? Sure, you can probably include the time that the bombers take to do the strafe runs against the ICF, but then if you have to do complex statistics like that, you might as well make them for a ballistic model!

I wonder if this desire of wanting multiplayer at all costs is what prompted Gearbox to remake HW1 in HW2’s engine. I feel however that this hasn’t been a very good choice because they seem to want to balance HW1R and HW2R both for their respective campaigns and at the same time for multiplayer, which is likely to end in failure (lone strike craft vs strike craft squadrons, no upgrades vs upgrades…).