Absolute Territory Dev Diary June 2019

This months dev diary covers asteroid fields and a proof of concept for a mission creator for players to create their own custom missions. This was originally posted over on Itci.io.

Asteroid Fields

One feature I’ve always wanted to implement: asteroid fields.  Vast fields of rocks that can span across huge distances.  

The problem: performance degradation from updating a large number of bodies.  

The solution: use a smaller number of bodies, local to the player position, which are updated and displayed when in defined asteroid field areas.  Perform updates using the Unity Job System for improved performance.  

The first videos show the result of an infinite asteroid field.  A clipping distance is used, hence asteroids will pop in and out of view at the boundary.

Infinite asteroid field

How it works: asteroids are initially spawned around the players local position as far as the defined viewing clipping radius.  Each asteroid is checked to determine if it falls within a defined asteroid field area.  If it is, then show it, otherwise we hide it from view.  We then move each asteroid based on the players velocity.  When an asteroid goes past the boundary of the clipping area we re-spawn at another random position at the boundary edge.

This works well and performance is improved using the Job System over a single threaded process.  These asteroid fields demos were run within the Unity editor so performance would be improved in the build without the editor overhead.  One problem I will have is figuring out a balance for lower end systems as access to such a system is currently out of picture right now.  I will be using Unity Analytics to help, once a playable build is made available, I will be able to compare performance across a range of systems as players engage with the game.

Currently, on my dev build performance starts to drop when 7500 bodies are visible.  This was not the huge performance boost I was expecting using the Job System, so I may have to also experiment with the Entity Component System.

The asteroid field is not finished, I’d like to add further improvements to the aesthetic and also make them feel more dangerous than they currently are.  In the version two video, below, there are now asteroid debris and dust clouds.

Asteroid field with debris and dust

Flying through an infinite asteroid field with dust clouds and debris gave me a sense of claustrophobia that I had never had before. I just wanted to get out yet there was no end…

Mission Editor

Have you ever wanted to create you own missions and test the limit of your combat skills by creating your own adversities to over come?  Or is it just me?  Below is a short video showing a proof of concept on this idea. Simply click and place enemies to fight inside an area, click launch and go to battle.  

Mission Creator

It’s pretty simple, the only rule set currently is to destroy all enemies within the area.  I’d like to expand this so the player can create simple sets of rules for spawning additional enemies along with other success and failure conditions, and configure ship loadouts.

You can updates showing the development of Absolute Territory @ https://twitter.com/abs_territory

ABSOLUTE TERRITORY DEV DIARY MAY 2019

Whilst perusing the Unity Asset store for spaceship ideas I came across an interesting asset pack. The Ultimate Spaceships Creator. A large collection of spaceships with modular components. Meaning I can customise quality models to my hearts content and “build an infinite number of spaceships!”. I really like it. Therefore I dumped my old models in favour of these.

Click to watch: Shelton Slide – Indie DB

One draw back to this is that this particular asset pack does not have any cockpits. The good news: the same creators of USC are working on a modular asset pack that includes cockpits which I will be looking to add upon release.

I always liked the idea of dying spaceships spinning out of control before exploding. And now they do! Once your target hull buckles it will randomly spin out of control before disappearing in a glorious explosion.

I’ve added a third person camera. I really liked that perspective in certain space games. I think it really opens up the view and of course you can see your own glorious looking spaceship getting shot up.

A new heads up display was needed this 3rd person view. A lot of work went in to it and its now fully functional. I just need to add some new indicators to the cockpit view (for the new slide and speed match functionality). Of course all the graphics are still considered place holder until they are firmly set, then I’ll add appropriate improvements.

Plenty of other features and changes have been gone in over the last month, here are some off the top of my head:

  • Improved indicators for target bracket, hits and leading shots.
  • Lead targeting on ship components.
  • New missile models (blink and you will miss them)
  • Shelton slide
  • Match speed – with 3 range modes (long, medium and short)
  • Refactoring code for hot deployment (still needs plenty of work) which will allow me to make code changes while the game is running.
  • Numerous bug fixes!