State of the Game #59 : Back end Overhaul

Hey everyone, I have been hard at work this week overhauling the procedural generation systems used by the AI.

Sadly, it took longer then I wanted and I was not able to get to a stable state for this weeks build, so I am not going to have an update for this week.

Here is what I have been doing all week:

Tech Talk

The current procedural M.A.V. builder is quite inefficient, sometimes taking over 1 sec to build a M.A.V..

While this might seem fast, in the world of games, it’s painfully slow. It will also only get slower as more parts are added and more options are added to the mix. At the current rate, it could end up taking the AI over 10 mins to build a M.A.V. (and that’s if the game doesn’t crash first!).

In addition to the time, the current system had some other drawbacks. Since it was having to spawn and delete a bunch of parts, it took a LOT of memory every time it ran. It could also potentially overload the physics system, causing everything to temporarily loose their ability to collide with other objects. It also cause out of sync issues when a multiplayer server would get tied up generating AI MAV’s.

So, the solution!

I took on the task of recreating my own data objects to replace the default Unity3d game objects. This allows me to not have to spawn any objects, and build up a MAV completely on the fly, doing collision checks (a custom physics solution was needed), manipulating the attach points, and then saving it all out to pass back to the Unity systems. This also allows me to make the whole system multi-threaded.

So far, this has gotten me a significant reduction in the generation times, down to less then a tenth of a second (running in the editor, so it’s even faster in game). I also was able to do things in more constant time, so adding new parts should not cause the system to slow down either. This coupled with multi-threading, will allow me to create an AI MAV, in the background, with an approximate 1 frame delay. Plus it removes all the secondary bugs from the old system!

I felt this was the best time to tackle this problem, as I plan to be adding quite a few parts in the near future and I wanted to be able to isolate out the bugs being caused by the old system so I can focus on the ‘real’ bugs.

Art Talk

Now that I have all that Tech talk out of the way, let me talk about art! I have commissioned Eliott Lilly, a great artist I have worked with in the past, to create the first official piece of concept art. I have been working with him a lot this week, doing video calls and establishing an art direction for the game. He has made some great progress and I can’t wait to show you the final piece! It’s very exciting to me to be able to reveal the ‘look’ that the MAV’s will have.
Thanks for reading and check back next week!

Leave a Reply