Friday 9 January 2015

Sprint Update 09.01.2015



Happy New Year! We extended our last sprint to run into January so that we could tidy up a few tasks at our leisure over the break and so that means it’s time for our latest Sprint Update!



Why open a door when you can just walk through it?

After changing the door/lock mechanisms in the last sprint, our guards decided to start walking through security gates instead of opening them…

A good half a day of code debugging later it turned out that our AI code had instructions for guards to stop & open the door when they have a high enough access level, but no instructions for what to do if they don’t have the required level. In this event they just continued with whatever task they were doing and if they hit an off mesh link it would allow the AI to use it. (An Off Mesh Link is a target for transitioning AI over terrain it can’t path find on, or through objects that have variable states of passage allowance such as doors). In this instance it made for the AI walking straight through the door instead of opening it first, unless they had a working security card, then they would be polite and use it ;D



An easy thing to fix, just giving the guards high enough access levels to match the level changes we did previously was enough to get them to open the doors again. And of course the AI now also has proper instructions for the guards to find another route, or at least stop instead of waking through the door.

Debugging & maintenance

Our character controller now uses two different input curves for gamepad input, one for horizontal and one for vertical movement. And while making that change, we also tweaked horizontal movement to be a bit smoother, and to have a larger dead zone to make it easier to run a straight line and make smaller adjustments of direction.

We also finally figured out an old issue our sound team has had trying to play the game on their macs. It seems like one of the camera effects (a tonemapping script used with HDR mode) in Unity has some issues with OpenGL. That’s up to the Unity guys to fix, but for now we added an option to disable HDR rendering together with the offending script. At least the game is now playable on OpenGL systems.

And to keep things running smoothly, we upgraded our version control cloud server to run Ubuntu 14.04. That should keep it running until 2019 before we need to upgrade the OS again…

Personality generated text messages



We’ve been working on some code for NPC’s to be able to procedurally generate messages that relate to their individual personality data, and then tweet or text them at random intervals. This is a pretty interesting thing to be prototyping and testing, not least because it will fill each level with data points that are interesting rather than placeholder, but also it opens up the possibility of level and mission design relating to social engineering and personal data leaks. It’s certainly not an easy task and isn’t implemented properly yet but it’s also a high payoff for relatively little input. We’ll tell you more about it as this feature develops, but here’s a clue, next is encrypting and decrypting!

Researching new AI

Our friend Danny Goodayle (@dgoodayle) had pointed us in the direction of GOAP Goal Oriented Action Planning) previously, which is based on the F.E.A.R. tools developed for the game of the same title and documented by developer Jeff Orkin, on his MITlab pages here .

Danny implemented a version of this in the Unity game engine for his recent release ‘Light’ we’ve chatted through his implementation with him previously and been begging him to get on and finish up up a blog post on it, but at time of writing I think its still in his backlog.

Luckily, over the Break we stumbled across a great example of setting up basic GOAP in Unity, and so the last part of this sprint was dedicated to researching and testing GOAP using this starting point. @Sploreg’s lovely little breakdown of how basic Goal Oriented Action Planning can be set up using C#, can be found here and if you are interested in AI and haven’t used GOAP then this is a great primer.

This is quite a different way of doing AI compared to our current behavior tree-based setup, but after a bit of tweaking we got a system capable of running most of our existing AI tasks, and things are definitely nicer to work with (and hopefully also easier to extend). So more than likely after next sprint we ’ll have fully converted things over to new AI, and possibly added a nice feature or two while we’re at it!

'Til the next time!

No comments: