the skin-o-flage isn't effective in winter

Published March 12, 2009
Advertisement
shambabamba
this is an older image, showing a squad hunting down some indivdual units. the code has since been optimized so that I can have two squads fight while keeping a smooth 60 fps.


Not to long ago I tweaked the hitboxes for bullets a bit so that I could have the bullets move about twice as fast as they used to (currently 30 meters/second). In response to this I changed a variable in the class for the MP40 submachine gun so that its bullets moved at 30 me/s. However I forgot to update the other main weapon, the Kar98k battle rifle.

One of the first things I did today was change the definition for the basic german squad to include 4 soldiers with kar98k rifles and 1 soldier with a Mp40. To keep things competitive, I upped the russian squad size to 4 soldiers carrying Mp40s (no russian weapons in game yet). I was expecting the german squad to win, because their rifles have approximately twice the range of the submachine guns, so the russian squad will have to advance under fire before they can shoot back. However, I was suprised to find that the russian squad was consistently decimating the german squad.

After a bit of debugging, I realized that the problem was the Kar98k's were still using the old 15 meter/second bullet speed, and as all bullets die after 4 seconds of flight time, they could not shoot as far as the mp40's, and therefore the germans had a range disadvantage, as well as a damage per second disadvantage (a rifle can put far less lead in the air then a mp40).

After updating the Kar98k file, I also changed bullet lifetime to 10 seconds to allow a bullet to travel the full engagement range for the kar, which is currently set at 300 meters. Although a real life kar98k has an effective range upwards of 800 meters, 300 meters is probably the most common range that a target could be accurately engaged with iron sights. I set the mp40 at 100 meters, because I can't imagine those tiny 9mm bullets being lethal anywhere past that range.
Previous Entry that time again?
Next Entry Untitled
0 likes 2 comments

Comments

Butterman
You do realize, that bullets move 330m/s, you should be casting rays and checking them against the boxes.
March 21, 2009 07:11 AM
nordwindranger
yeah...

I decided to model each bullet instead of using rays because I wanted to leave myself the option of using actual physics to determine bullet paths.

I guess the tradeoff is realistic bullets versus realistic bullet speeds.

I think modelling the bullets gives a simulation a more realistic feel, and the bullet speed itself isn't as important, as long as it is still pretty fast. Red Orchestra takes this approach, and I would definitely consider it an influence on my project
March 25, 2009 03:13 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement