Defining Awesome — Simulating weaponry
  • Status Updates

  • Simulating weaponry

    Written by . Posted at 3:39 am on August 17th, 2010

    I’ve been since always dreaming about a different approach to game programming in terms of guns. I wanted to simulate the whole soldier and his weaponry. So a gun would not just have a variable ‘ammo’ but it would have an object attached to it called ‘clip’. Furthermore ‘clip’ would have bullets attached to it. All the aspects of a gun would be objects that could be manipulated and moved around. This isn’t so hard to do but it requires a lot more memory and a lot more network bandwidth. Because instead of requiring 2 bytes for ammo count, just to hold the ammo in the gun you would need 4 bytes for a pointer to the clip + at least 1 byte for each bullet inside the clip. Seems bad but the benefits are enourmous:

    – the soldier actually carries the clips with him, so you can render them hanging on his ammo belt and render how he grabs the clip and puts in the gun (awesome!)
    – different kinds of clips, different sizes, different gunclip types
    – each clip can have different kinds of bullets
    – you could possibly micromanage the clip load with whatever bullets you want

    Furthermore the bullet is not something created by the gun when fired it is an object too that sits in the clip. And when the gun fires the bullet object just flies out of the muzzle. You could possibly even modify each bullet by changing the tip of the bullet to make a dum-dum bullet, make it more narrow for a more piercing effect or manipulate the gun powder – replace the gunpowder with a different mixture or decrease the amount of powder so the bullet is more quiet when shot.
    This has been a dream of mine for a long time and I am moving towards this with Link-Dead. Clips and grenades are already managed like this but I want to try the bullets idea too…

    Be Sociable, Share!

    12 comments.

    1. I can tell this game is bout to get real realistic. Game ideas sound awesome!

      Will the character hold onto the clip if its not fully used? or will the character discard the unused ammo making for realistic but faster ammo depletion?


    2. Trompadon

      Awesome. 😀


    3. Makron666

      Very nice, sound extremely expensive though, im sure you’ll work something out.


    4. This would be awesome for sure!


    5. Guns dont kill people, logical fallacies regarding videogames do.

      Sounds pretty nice, Cortex Command for example has, in pseudo-code mod script:

      AddClip = SMGClip
      Bullet = SMG Bullet Particle

      AddWeapon = SMG
      Clip = SMGClip


    6. Will the character hold onto the clip if its not fully used? or will the character discard the unused ammo making for realistic but faster ammo depletion?

      Excellent idea. It should be upto the player whether to discard the ammo or not. I think double tapping reload button should make the soldier discard the ammo for faster reload. Later you can pickup the clip again (if you’re still alive).

      FinDude: seems pretty much like what I’m upto.


    7. Blacksheepboy

      Picking up clips? I’m all for this.


    8. For what on earth do you need 2 bytes for ammo count? :)


    9. Marc McMillon

      Sound like a good idea.


    10. will u be able to carry bags with the ammo intended?


    11. This is starting to sound like X-Com in 2D. Not that I’m complaining.


    12. For what on earth do you need 2 bytes for ammo count?

      Some guns do have over 255 ammo.


    Post a comment.

    Links