This week I have mostly been… working on enemy AI.

Enemy packs and aggro

I’ve improved the enemy spawning system so it can handle spawning enemies as packs. They still behave as individual enemies but can also have group specific stuff attached to them – they all know they belong to a pack and can trigger/react to events as a group.

I initially added this so I could make entire packs aggro (become aware to) the player if you alert any one of the enemies in a pack. Previously, if you got near enough to one enemy it would start attacking you and all his buddies would still ignore you until you got close enough to those too. This looked pretty stupid, so now the entire pack gets alerted and tries to kill you. :)

What looked even more stupid was shooting at an enemy and it still ignoring you until you flew into his alert radius. I fixed this and now if you shoot at something, it gets angry – along with the rest of his pack buddies

All of this means that you can no longer stay just out of range and attack and kill massive groups of stuff while they just sit there ignoring you. Oops.

Here’s a vid showing an entire pack being aggro’d when I shoot one of the dudes:

Once I added the pack functionality, I realised I could use this for other stuff too. For example, I’ve now added event triggers so you can award extra XP or extra item drops when you’ve slaughtered an entire pack. I’ve also made it play nicely with the mission system, so a mission could require you to kill a pack of enemies and it’ll complete when they’re all dead. I plan to look into a combo points system too, so I could use this to award extra bonus XP for faster/better killing.

Shot leading

I made enemies better at shooting you.

They can now be flagged to lead their shots, which means they’ll take into account the player’s current direction and speed, along with how fast their own bullets can move, and attempt to fire in front of your ship for a better chance of hitting you. This seems to work best, from a gameplay point, when some enemies have it enabled and other’s dont. Kinda mixes things up.

Here’s how it looks in action. The top enemy is set to lead his shots while they bottom one is stupid and hasn’t been to Flight School yet:

Enemy movement

I’ve started working on adding some variety to enemy movement. It’s super basic and super rough at the moment, but it’s better than everything just charging directly at you.

Again, I’ve added it as a flag, so you can toggle it on or off for different enemies, or you can set it to random and let it decide it’self how to be behave. I’m trying to make as much stuff as possible customisable/random so each time you play the game it’ll feel different in as many was as possible.

Anyway, the first modifier I’ve made simply picks a new point close to the player every X amount of time and starts moving there instead of directly at the player. The amount of distance from the player and how often it picks a new location can be changed to give more subtle or really erratic movement behaviours.

I still need to smooth some bits of it out and make it look nicer and more natural and generally better, though.


I added Medic enemies. They look the same as all the other enemies in the game because I’ve only got about two models, but imagine them as Ambulances with wings, in space.

They will heal any injured enemies around them, currently by about 50% of their total health per second. They can’t heal themselves though, so they should be a priority target when you encounter them in a pack.

I added some magic-healing-beams coming from them to show which enemies are being healed, and a green circle around the Medic itself, for now, so you can identify them in a pack.

I’m gonna keep adding new enemy types like this as they really mix the gameplay up and add some strategy in terms of target choice and priority.

Player weapons

Each of the three classes can equip one, unique, main weapon ability. This is a basic attack and is free (in terms of energy) to fire. It’ll never stop firing and it’ll never run out, but it’s not the best.

Until yesterday, the rate of fire for the main weapon was pre-determined on a class by class basis and couldn’t be changed in-game. I realised this was a bit shit, so I changed the way the main weapons works.

Now they’re proper items, like everything else in the game. Weapon items now have a reload/rate of fire stat. This is cool as you can now choose to use a slower, more damaging gun or a faster, weaker gun. They will always fire the same thing though – your primary weapon ability. You will be able to choose from class-specific primary abilities though, so you still won’t be stuck with one.

The weapon itself just changes the damage and how fast it fires. I don’t want your items to change your abilities, that’s the whole point of having different abilities to pick from. Your gear should just boost how effective you are.

I prefer the new system… and it kinda just makes more sense.

Here’s a video of me firing a couple of different weapons, one slow and deadly, one fast and weak, incase you can’t imagine what two weapons firing at different speeds might look like:

Minimap arrows

This isn’t quite finished yet, as it’s the last thing I’ve been working on this week, but I’ve started adding arrow indicators to the minimap in the corner of the screen. They show you the rough direction to any mission objectives you have. Objectives can be set to show an indicator or not, so you can have some easy to find missions and others that require some exploration.

I still need to fix a few things and make it look a bit nicer.

Unity – class_select.unity – Riftlight – PC, Mac & Linux Standalone*

Next week

– Finish Minimap arrows
– Extend the ability selection UI to allow runtime mapping of abilities to keys/buyttons
– More enemies
– More abilities