Friday 21 December 2018

Sprint Round Up - 21.12.18 - The LAST Sprint of 2018


Twas the last sprint before Christmas, when all through slack
there were messages pinging, of snow in Finland
tasks have been completed on Jira with care
with hopes of increased wishlists for the new year


...we're not poets and we know it, but all in good cheer!   Pontus has decamped to his native Finland and the snow is plentiful!  There's a few us of here in merry ol England that are snow jealous.

Finland = Winter Wonderland

In this sprint, there were lots of tweaks and updates as we prepped the roll out of the FIRST ACCESS programme for our Kickstarter backers, as well as plenty of essential documentation and tasks. So without further ado, here's the last Sprint Update of 2018:

App System


•  Apps can define cost per action, and any continuously-running actions can apply cost over time.
•  Updated App scripting wiki page to match with the recent App system changes and to better explain all the features

AI

• Added generic actions to AI definitions (to perform tasks, change state, without the need of an InterestPoint)
•  Added stats to AI definitions (to track various attributes in a data driven fashion)
•  AI documentation

LevelKit

•  Built the "Semaeopus Testing Facility" level in LevelKit as an example for modders, and as easy place to test new modded content and features
•  Changed the LevelKit Tool to have a dropdown menu of different Districts for the mission so people don't need to check the options from wiki and type it in
•  Did a complete review of all the props and models in LevelKit:

  •  Made sure Models are not importing new Materials
  •  Gave a box collider to things big enough to need one
  • Created a Prefab of everything  
  • Added everything to Collections, cleaned up and re-sorted Collections
Organising materials in LevelKit

FIRST ACCESS

• Sent FIRST ACCESS keys to relevant backers
• Fresh build of OFF GRID with LevelKit tools for FIRST ACCESS users
• Created public Trello board for modders and FIRST ACCESS players to request features and report bugs

The best NDA return e-mail we received!  :D

Character Controls

• design and planning for improving character control

Bug Fixing

•  Fixed game crash in Map screen.

Other

•  Final itch.io build, and then added back all features & content that was disabled for it.
•  Explored documentation generation
• Loads of improvement and additions to the documentation on the wiki
• planning and research on offering a slacker backer option for people to be able to get into FIRST ACCESS post-Kickstarter (more news coming soon!)
•  A team holiday party at Beef & Brew that left us all bursting!  No worries, we took the leftovers home.  Waste not, want not, folks!

A note on FIRST ACCESS: 
 If  you are eligible for FIRST ACCESS, you will have
 a) backed OFF GRID at the PENTESTER level or above on Kickstarter and
 b) already received an e-mail with instructions on how to join!

If you find that e-mail and you have time to dig into things over the holiday season, please do!  Sign and return your NDA, and we'll endeavor to send over your Steam key in return as soon as we can. 


...and that's that!   We're still going through the holidays, but taking it a little easier than usual to enjoy the time with families and friends.

Thanks everyone.  We wish you all the happiest of holidays!

The OFF GRID Team 

p.s.  There's a HOLIDAY GIVEAWAY planned!  We've chatted about it in our discord - and it's soon to be announced.  Sign up to the newsletter to get the details first!



If you haven’t already - be sure to wishlist Off Grid on Steam - each wishlist makes a big difference to us, and we really appreciate your support!

Tuesday 11 December 2018

Improving AI Performance

Hi all, Steve here!  Here's a look into what I've been working on recently: 

There's been some monstrous performance spikes in our AI, and I've spent time over the last month working to mitigate this issue.  Two significant changes have been made to improve this:

1 - the addition of a pool of Dictionaries to store states, and
2 - making each state item immutable

This vastly reduces object creation, which is slow, and reduces the number of objects in existence, which helps reduce memory fragmentation (another Bad Thing) - which, being C#, is harder to control than in C++.


Dictionary Pool

So what's a Dictionary Pool, you may ask! Well, at its simplest (which this is), it's a big list of pre-made Dictionaries, each with a flag on to indicate if it's being used.

When we want a Dictionary, we grab one from the pool, put it in a list of 'in-use' Dictionaries, and mark it as being used. When the object using it is destroyed, we mark it as free, and put it back in the pool for someone else to use. The key here is to be very strict on who is using your object! It's critical that nobody is using it when it's marked as free, or the whole concept breaks down.

Immutability

And immutable states?  Immutability is another weird software-engineer-y word. In english, it means something that never changes. But that's perhaps misleading when it comes to thinking about objects in Unity - what use is an object you cannot alter?

The answer is that while you can't change the object, you can create a new one to reflect this change. This means you have precisely one instance of any particular combination of object.  For us, this means that instead of creating hundreds of thousands (no exaggeration) of states, all duplicates of one another, we create... about seventy. The overhead of querying a Dictionary for the instance of the state we want is much, much less than creating a tiny object, then destroying it, repeatedly.



These two changes weren't trivial, as such, but were fairly self contained, and only produced a handful of super frustrating bugs that I had to then work against for a week or two.

Back within 60fps, but still a lot of garbage to deal with!

But the good news is that performance improved drastically!  We are now back to 60fps within the editor on my machine, mostly. Which was a relief because I feared for a moment or two that I'd accidentally extended the AI system in such a way that it would never be useful in a finished game, which would have been embarrassing.

-Steve

If you haven’t already - be sure to wishlist Off Grid on Steam - each wishlist makes a big difference to us, and we really appreciate your support!