The completed system
There are a couple of bonus lessons attached to the tutorial to give some more complex extensions, but you have a pretty solid weapons system already, and everything’s in place to extend it. Right now, you shoot plasma pellets that move in a straight line, cause damage on impact, and can explode. But you have all the base classes you need to extend the system further.
Extension ideas
We provide some ideas here to whet your appetite. We’d like to see what extensions you provide to the system in the community tab. Even better would be to submit your extensions as pull requests to our official demo repository so other people can learn from it!
Emitters
- A projectile that doesn’t disappear on impact and keeps going (piercing or bouncing)
- Missile
- Swarm of space locusts
- Sticky bombs
- Gravitation wave
- A hit scan sniper cannon (a weapon that immediately hits anything it is pointing at)
- Melee weapons
Motions
- Move in a circle
- Move in a chaotic, random pattern
- Boomerang away from and then back to the emitter
- Bounce off of surfaces
- A force field wall
- A motion that uses a lock-on input ability on the player to go after a specific target, instead of homing to the nearest one
- Complex pathfinding that tries to go around the first target it finds and attack it from behind
- A motion that avoids obstacles but tries to stay traveling in the same direction it used to
Events
- Spawn a temporary projectile emitter with its own weapons system (cluster bomb)
- Knock enemies back from the point of impact
- Pull enemies into the point of impact
- Spawn drones that melee attack nearby enemies
- Cause a damage-over-time effect (like acid) on nearby enemies
Weapons System extensions
You can extend the system itself, too!
- Emitter modifiers (example: a moving turret that tracks enemies, rotates in circles, or follows the mouse)
- Input modifiers (examples: the ability to hold down the fire button to charge up a more powerful projectile)
- Ability to shoot more than one emitter type at the same time (example: laser and plasma)
- Ability to assign different emitters to different slots (example: 1 laser in front and two plasma bolts on either side)
- Assign different motions, events, and modifiers per slot
- Damage modifiers (examples: fire damage, ion damage, electric, status effects)
- Base state modifiers (examples: increasing lifetime, projectile movement speed, projectile size)