Weapon Pickups

September 2, 2009

I made less progress than I was hoping for yesterday. My major accomplishment was getting weapon pick-ups working.

The weapon pick-up object tracks the hero and does a nice subtle alpha blend as the hero approaches. Once the hero gets within 32 pixels of the pick-up object, the object calls a changeWeapon() function in the engine and passes a few variables:

  • String: The name of the new weapon
  • Int: Ammo qty of the new weapon
  • Int: Heat generation of the new weapon
  • Int: Delay between shots for the new weapon

My fireBullet() function does a switch/case to determine the firing pattern based on the weapon string.

During my run yesterday I further crystallized the design goals of this project. It’s extremely simple so I’m hoping to have something to share soon.

ProjectZScreen2

Hero is far from the shotgun pick-up

ProjectZScreen3

Hero is close to the weapon pick-up object

Hero is shooting the shotgun firing pattern after weapon pick-up

Hero is shooting the shotgun firing pattern after weapon pick-up

Leave a Comment

Previous post:

Next post: