Ballistic Project

This article contain specific terms, I will try to be as clear as possible and I’ll not dive into the details, but if you want to know some more about that topic:
http://en.wikipedia.org/wiki/Rifleman’s_rule — About zeroing a rifle
http://en.wikipedia.org/wiki/External_ballistics – Was very interesting for the drag resistance part

Introduction:

I was playing Battlefield 3 during a week end, and after unlocking scopes for sniper rifles I’ve tried to play and understand the physics of the bullets for very long range shots. I’ve always liked the fact that there are always some players who just want to snipe people from very far, and because of that some duels between snipers from each team begin. Of course a lot of players don’t like that kind of behavior because while sniping they are not taking the main objectives of the game, but in every multiplayer FPS game with snipers you will see that kind of player. Some players just like doing so, just because it feels great to hit something from a very long range! I think that’s the main reason of the x40 scope, range indicator and the adjusting zero in Battlefield 4, to make that kind of play a real choice and to make it easier. By « real choice » I mean that playing with the x40 scope while running around and getting objectives is much more complicated than with a lower magnification.

Even when I was young, I enjoyed doing the sniper vs sniper game on Unreal Tournament 2004 Face Classic map.

Why not making a game just about that?

So I’ve decided to take a look at external ballistics for very long range rifles. I’ve read a lot of documentation about rifles and bullets, as well as reticles and zeroing, in order to make a prototype.

2 days prototype:

After 2 days I had my first prototype, with a rifle with the characteristics of the Barrett M82 with .50 BMG bullets.
In order to visualize the trajectory of the bullets, I’ve decided to draw lines with different colors in function of the kinetic energy of the bullet (which is given by 1/2 * mass * velocity^2).

The two other lines are the angle of the rifle and the angle of the scope (4000m length).

The bullet start to drop a lot after 2000-2500m which is pretty normal, the maximum effective range for this kind of weapon is around 1500-1800m.

1 week prototype:

Work all the week on the reticle and zeroing. I’ve tried to get the exact equation of the curve of the bullet in order to make an automatic zeroing for every kind of rifle/bullet, but unfortunately I wasn’t able to do so, even without the air resistance. I had perfect results from mathematical point of view, but there was a difference with the result in Unity. I think that issue is due to maybe one or two frame after the creation of the bullet where the velocity and the gravity are not properly calculated. For 100 meters it’s not a big problem but from 500 to 3000 meters the difference is too important to be neglected.

I’ve finally decided to make zeroing possible only for few distances and I’ve calculated the angle for each distance and each kind of rifles, by testing and observing results.

In this prototype you can shoot at cans from different distances, and adjust zeroing pressing « V ». You can see the trajectories by pressing « K » or « L » (just different colors, K is for kinetic energy and L is related of the velocity (supersonic, transonic and subsonic).
And you can press R to restart the prototype.

You can play it here: http://www.sylvainbrillet.com/works/unity/Ballistic_0.html

2 week prototype:

My objective for the second week was to get a multiplayer prototype.

Lot of tests, build, tests, build, debug, in order to get the network done.

Nothing very interesting, I’ve worked on the synchronization of data (which was a part of my work on my graduation project), and all the network stuff. I’ve also decided that each kill are recorded so that players know how many time they’ve killed and have been killed by a specific opponent, in order to push the « duel » way of playing.

I’ve also think about some data tracking, but I’ve decided not to work too much on this and focus on making a network so that I could have a working prototype at the end of the week.

The fifth/six day I’ve worked a little on the Level Design. Just a little, so I’ve made a tower on Sketchup then I’ve made a map like the Unreal Tournament 2004 Face Classic: only two towers.

You can crouch with « X » and crawl with « Z », higher and lower the zero with « V » and « B », and F4 to suicide to choose another rifle or get ammunition.
It can be played here: http://www.sylvainbrillet.com/works/unity/Ballistic_Multi_01.html
Or you can download it.

Conclusion/What’s next?:

I’m pretty happy to see that I can still get a working prototype on a few amount of time. I’ve also learn a lot about ballistic, rifles and bullets, and I’ve seen some physic and mathematical stuff which reminds me my high school years (got a diploma in Sciences).

On the ballistic part I may take a look at terminal ballistic, in order to make the bullet physic a bit more interesting on the prototype, with some walls, boxes, etc.

On the gameplay part I’m thinking of making more « sniping challenges » so that players get something else to do than killing each other. Some challenges can be linked to the ammunition. Maybe adding also some bots like in Titanfall to add some « life » to the map. Why not making the bots getting some objectives, the same way as the minions in MOBAs like Dota or League of Legends.