• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

How are the ballistics calculated?

Quick, simple question: How are the ballistics in-game calculated? Is the path of each round individually calculated on the fly? Or what?

This includes bouncing tank shells and MG fire. How does that work?

I can't attest to the bouncing stuff right now (CBA to look it up), but with the other projectiles they are assigned a Speed and a Ballistic Coefficient, and I believe that the engine does the rest of the flight path stuff. Gravity of course is a engine-wide constant.

I have no reason to believe that anything like windage or gyroscopic drift is factored in.

small-arm Tracers do in fact have their own BCs/Speeds associated with them. I think in most instances the ranges in RO aren't long enough to really see the differences though.
 
Upvote 0
the bullets dont fly, I think that when you press fire, there is some kind of invisible laser line created that stops at the first object that touches.

you may ask then whats that thing about leading the target?... that depends your ping and not on the flight time, there is no flight time, the higher it is the more you have to lead, notice that in practice mode, no matter how far away from the bots you are, they are insta kills

at least thats my theory, if anyone has a better explanation for this, i would like to read it
 
Upvote 0
the bullets dont fly, I think that when you press fire, there is some kind of invisible laser line created that stops at the first object that touches.

you may ask then whats that thing about leading the target?... that depends your ping and not on the flight time, there is no flight time, the higher it is the more you have to lead, notice that in practice mode, no matter how far away from the bots you are, they are insta kills

at least thats my theory, if anyone has a better explanation for this, i would like to read it
This is not correct. Some games use hitscan, but ROO does not. The trajectory is in fact calculated (its really not that hard all you need is the vector with the muzzle velocity of the gun and the direction which can be parsed directly from the core.player info) and then there is a very sophisticated system of hitboxes (2 or 3 layers even?) that the server will check for if the trajectory passes through them. It shouldnt be too much slower than a laser, a quick searching algorythm could find any hitbox along the trajectory, or an upper bound, lower bound and average laser could be used to get the x coordinate of the hitboxes and then just look up the y from the trajectory. Those all seem slow to me, I'm sure Ramm used something faster.

EDIT: definitely no bouncing, all tracers bounce because they are done client side.
 
Last edited:
Upvote 0
This is not correct. Some games use hitscan, but ROO does not. The trajectory is in fact calculated (its really not that hard all you need is the vector with the muzzle velocity of the gun and the direction which can be parsed directly from the core.player info) and then there is a very sophisticated system of hitboxes (2 or 3 layers even?) that the server will check for if the trajectory passes through them. It shouldnt be too much slower than a laser, a quick searching algorythm could find any hitbox along the trajectory, or an upper bound, lower bound and average laser could be used to get the x coordinate of the hitboxes and then just look up the y from the trajectory. Those all seem slow to me, I'm sure Ramm used something faster.

EDIT: definitely no bouncing, all tracers bounce because they are done client side.

my point was not to say that it wasn't calculated, but was that there wasn't any traveling projectile
 
Upvote 0
Lasers (if we are talking about pure light, not some plasma bolt) are not affected by gravity. Why, then, the need to aim ABOVE your target on REALLY LONG ranges?
Weapons ballistics has been a big selling point, or at least a marketing anchor, for RO, I imagine.

light IS affected by gravity =P

but again I failed to express my point, I didnt say the laser analogy to describe a straight line, but to describe something that is instantaneous
 
Last edited:
Upvote 0
I know Ramm did a detailed post about this crap around the release time of RO if anybody cares to use search to dig it up. Or maybe he'll pop in here and post. But from what I understand there is a projectile (physics, ballistics and what not) with a minor bit of hitscan (deviation from the pure caculated route) to simulate the accuracy of the weapon. Don't hold me to that however. Once again this is a Ramm question (and since search doesn't want to take me past mid 2007 on Ramm only posts this might be hard to find).
 
Upvote 0
Yup, the game spawns a projectile for each bullet, as I recall, from the tip of the weapon, in the direction it is pointing. There is a ballistics algorithm that figures out distance travelled and drop between each tick, so that the round travels along a series of points that closely approximates the actual curve - watch a tank round in flight and you it will seem to fly on a nice curve at long ranges.

If I remember right (and as Yoshi says, Ramm is the guru wot built the system) the engine does checks each tick on where it would travel in a direct straight line - we had issues in testing with high-velocity tank rounds being one side of a tank one tick and the other side next tick, so appearing to pass right through without hitting.

Anyway - in answer to the bsaic question: all projectiles (bullets, tank rounds, rocketry) are individually calculated and follow a correct ballistic path (assuming we have the correct MV and BC data for each round, which can be a little tricky to calc!). For the mad detail, hunt for Ramm's detail post somewhere back in the mists of time!
 
Upvote 0
Try sniping across Barashka and you will in fact see a delay of impact.

Oh I know, I remember sniping on one of the Klin_Outer_Ring betas, and I saw a Soviet squad leader trying to sight in some arty, just at the edge of the view distance. I took a guess, aimed a good deal above his head, and fired. It seemed like it traveled for at least a second.

To everyone who answered the question, thanks. I was having a discussion over in the Insurgency (the Half-Life 2 mod) forums and people were telling me that it was impossible for computers to calculate ballistics in online FPSs without overloading the processors. I knew they were full of it, just wanted to get an example of how it's done. ;)

So, bounced tank rounds are done client side though? How do bounced rounds kill other tanks and infantry then?
 
Upvote 0
Since RO does do balistics it is one of the heaviest loads on the server. That is why we had to test to see how many machine and sub machine guns we could get going before servers started to crawl during early alpha testing. This was one of the main reasons TWI never did the oft wanted penitration. Strange things happen when servers get overloaded. Believe bounced tank rounds are still server side, however bouncing tracers are client side (I think) and won't do damage.
 
Upvote 0
Bounced tank rounds are definitely server side; I remember once seeing a tank kill itself by firing on an enemy at very close range and having it come bounce back.

The ballistics calculations also account for the occasional occurrence of two players killing each other at long distances; the bullets pass each other in flight.
 
Upvote 0
watch a tank round in flight and you it will seem to fly on a nice curve at long ranges.

Yeah, on Krivoi Rog, I once destroyed a stug which was behind a hill, 1200meters away, on which I couldn't have a visual with the gun sight, but could see its top through the binocs. THen as the explosion gave no kill report, I surmised the driver had abandonned the stug just before the last hit, and sprayed the area with MG fire at random, and killed him.

Bounced tank rounds are definitely server side; I remember once seeing a tank kill itself by firing on an enemy at very close range and having it come bounce back.
I once destroyed a pzIV in arad by shooting at the panther that was alongside it. Ricochet on the panther, side hit on the IV, kaboom.
Another game, I fired at another panther, ricochet, the shell bounced in an high arc, and fell right on a friendly sapper who had spent the last 20 seconds patiently crawling toward the camping Panther.

Can you experience those kind of gameplay moments in any other only FPS ? :D
 
Last edited:
Upvote 0
...Another game, I fired at another panther, ricochet, the shell bounced in an high arc, and fell right on a friendly sapper who had spent the last 20 seconds patiently crawling toward the camping Panther....

I have been killed by friendly ricochets a couple of times over the years, actually rather amusing and I always have a good laugh :p
 
Upvote 0