Space Pillage dev update – modular gun / weapon system for enemies

This post covers my first Space Pillage dev update. It will do a quick run through of the design and thought behind the customisable / modular weapon system I have created for enemies found in the game. The customisable weapon system package is actually something I created a while back for this game. I decided at the time to submit it to the Unity asset store (you can get it off the asset store here).

My goal was to integrate it with my custom enemy and enemy wave specification files for levels. Basically, every enemy wave has a definition in XML. This means that a player (or myself as someone who designs level for my game), is able to define what enemy waves consist of (enemy count, the way enemies fly in patterns, health points, XP, rotation, speed, and many other properties), as well as the order in which they arrive in the level.

The system I built this week allows me to now define enemy weapons. Each enemy “template” in the game has a specified number of gun placement points. When you define an enemy for a wave, you are now able to also define the weapon systems that get placed on each gun placement point in XML. When the game loads a level, enemies are then generated using these entries, which means that you, as a modder, level designer, or player are able to make custom weapons for enemies – fast shooting, arc firing, shotgun-like, multiple bullets, chain guns, just about any kind of weapon is able to be created by giving each gun placement point a definition.

Here is an infographic / design I put together to illustrate how this works.

gun-placement-config2

 

Here is how this particular enemy looks where I have made 4 x configurations – 1 that shoots two bullets at a time in a fast fire rate, arcing pattern, and 3 that fire single shots at a reduced fire rate. I set the bullet colour to yellow too.

A typical gun specification looks like this in XML:

xml-def

Well, I hope that was an interesting update for those of you who enjoy design / inner-working type posts 🙂 Please do give the game a watch here on IndieDB – I’ll be posting more stuff like this, as well as updated screenshots, videos and hopefully even a playable demo in the near future! Please don’t forget to watch/follow the game on IndieDB:

Space Pillage

Leave a Comment