Wednesday, 8 December 2021

Off Grid Development Update - November 2021

 Once again it's time for a new Off Grid development update, and we certainly have a bunch of interesting changes to the game to talk about this time!

Tuesday, 24 August 2021

Sprint Roundup : Intelligiable Artificial Intelligence

Hello Folks,

If you've been following along on the devblog for a while you will know that OFF GRID's NPC A.I. is quite extensible, moddable and able to create interesting dynamic behaviours, we've been continuing to refine and polish this of recent, and this blog will dig into a few of those changes.

One of the things those of you who are players in our First-Access testing groups have commented on regularly is that these complex behaviours can be hard to pick up on some times. Fundamentally there is one word used in game development to describe this, it's down to having a lack of "Juice". Creating juice in a given system is essentially the art of designing satisfying player feedback with animation and audio, and we have been digging into this specifically in the context of our AI recently.

 NPC reactions

It's a small thing, but up until now you could only tell NPCs were receiving data by watching the networks in data view. We have now improved the NPC reactions so that they physically respond to data too.

Similarly - showing what an NPCs behavioural model is upto has been tricky just through animation. We had hoped to just show what NPCs were thinking for players to deduct their next move from purely through character animation, in reality in a 3rd person game you are often so far away from the characters you are watching that this proves very difficult. 


We decided to move to a more Metal Gear Solid Style system of core NPC thoughts and behaviours being identified as icons above their heads at certain times.  It's pretty early in testing but it certainly seems to have improved things, more on this in future blogs as the feature evolves.

Another is the fact that the modders we have testing the tools to make their own levels tend to want to be able to make more expansive environments and put more random background NPCs in to their content without having to write or design specific AI routines. They want to be able to drop random wandering NPCs in, *in walks the Wander NPC system*

So this doesn't end up becoming a book rather than a devblog we'll focus on this particular system as the deep dive for this post, and we can dig into the others previously mentioned here in future posts as they mature.

The Wander NPC System

Essentially the bulk of AI work last sprint was creating a new system to easily have more neutral or non-enemy NPCs in a level without the need for the resource intense AI calls the main NPC system uses. This helps bring to life many of the environments and makes levels set in public spaces seem somewhat more realistic. We decided to call this lightweight AI the WanderNPC system, to differentiate it from the core and more complex NPC AI.

With the "normal" NPC system, every character has an agent definition to control its behaviour. This is good for having various types of NPCs in a level, but every NPC needs to be defined in the mission script, so it's not exactly a quick and simple way to spawn various characters scattered in a level. We needed a system to spawn NPCs more easily and without any specific AI, just different characters with different props and colors wandering in a level without any bigger purpose, except filling the level.
To use this new system you only need to use the respective function in the LUA API, specifically the function "Mission.SpawnWanderNPCs", this function has some parameters to easily change the spawned characters. They are the following:

  • spawnpoint : Is of the type string and is the only required parameter, the point selected to spawn is going to define the area that we want to spawn all the wander NPCs, every wander NPC is going to be spawned in a random position inside that area; the spawned area is defined by any position that a navigation agent can walk between the selected spawnpoint at any random position inside a specific radius, the wander NPCs cannot use doors, so doors and walls are normally the boundaries of a spawning area.
  • quantity : Parameter used to define the number of wander NPCs to be spawned at the same time in a specific area, if this parameter is not manually set then it's only going to spawn 1 character
  • characters: This defines what characer models / prefabs the system will spawn, at random.
  • headprops : Like the name suggests its possible to define a prop or a group of props for the characters to use, the character is spawned with a prop or none in a random way, and never more than one prop
  • colorTextures and metalTextures :  It's possible as well to randomize the color and metal textures of the characters spawned, if none is selected each character will have its default textures
  • gestures : Sometimes the wander NPCs will run an animation when they tops momentarily, this animation will be a random one of those selected in this parameter

As you can see, with this new system it's very easy to spawn various wandering NPCs, and it's also very flexible, by just changing some parameters it's possible to have a diverse crowd in a level, making it possible to have even more unique looking levels!

New Content - The Harbour Terminal

Since the last blog post we've spent more time designing and modelling for the Harbour level's main building. This one is a bit different from many of our locations, the main building itself is big enough to be a  full level on it's own.

 Like the rest of the Harbour, we've made it to support lots of alternative routes through the level, more than what we'll likely enable for when you play this level the first time. Let's just say that we have some interesting plans for that...

Changelist and other updates : 

Content (Level Design and Art)  

  • Intro at the Apartment - player guidance and tutorialisation
  • Courthouse - more advanced devices and puzzles
  • Harbour - creation of areas for future expansions to the game
  • Creating the new Wander NPC system
  • Start on AI behaviour icons system
  • Reactions from NPCs and their corresponding animations

Modding and Lua API additions 
  • Player path tool now supports connections between paths

Bugs fixed 
  • AI reacting with a Radio
  • AI Pause
        - Save time reduced
       - The save system also save the player crouching / standing state
        - Use item button visible after loading an autosave

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, 9 March 2021

Sprint Roundup: Spring Forward

Welcome Folks and Happy 2021, and how good does it feel to be finally well out of 2020?!

Thanks for bearing with us while we got this you, we missed December's update, but here we are, back in the swing of things, and so finally here is your back-to-regular dev update!

 Give me an 'A', give me an 'I', what does that Spell?!

On the last sprint roundup we mentioned that we started to work in some improvements in the AI to give more flexibility to the NPCs. So what exactly are these improvements? To start, some bugs were fixed, some unused features were removed and others simplified. But the main thing improved was the possibility to change, add or remove any aspect of the NPC behaviour in run time, like, for example, actions and goals, and with this came a round of improvements on our AI debugging tool, the AI Explorer:

The default way to change any NPC behaviour is still as it has always been, changing the world states.  Only in specific situations should changing the goals or actions be needed, but this is now possible by adding or removing them during runtime and allows for much more complex behaviour. Changing Goals should be used rarely, as it is seen as a more permanent change to the NPC behaviour. It's important to keep the following concepts in mind to understand the best way to change an NPC behaviour:
"World States" represent everything that the NPC knows about the world and themselves, for example: The guard must see the intruder before doing any action to try to catch it.  Changing world states in order to evoke a reaction is the first thing you do. 

"Actions" are the available skills and resources that an NPC has, for example: A guard should have an action to use a taser or other resource to knock out the intruder, and so accomplishing his goal. Changing actions is the best way to change what an NPC has the potential to do.

"Goals" describe the intentions or beliefs of the NPC, for example: the guard should always have the goal to catch the intruder, because it's his job, if this goal is removed it means that the guard lost his faith or belief in the job. For this reason goals are the last thing in NPC behavior you would consider changing as you are fundamentally changing them as a person.
Being able to alter any of these at runtime means NPCs are now more flexible and give more options to design new levels and scenarios, that is noted especially during the gameplay because now its possible to change its behaviour at any time and you don't have any restrictions in relation to what was initially defined in the NPC, so that means that a NPC now can use picked up objects, learn new skills, change their main objective, among other possibilities, it really is much, much more flexibility.

But of course this flexibility also means that is important to be careful with the complexity of the NPC definition, it could get a bit confusing in the best way to accomplishing some results and also could be hard to track why the NPC is behaving in some way. So to simplify we think the best way to approach the changing in the NPC behaviour in runtime is trying to change the world states first (but being careful to not have to many different states), next is the actions (that are especially handy for use specific items and skills), and the last one is the goals (that need to be used very carefully because a minor change can change the NPC behaviour drastically). Hopefully this model will provide some exciting opportunities for us in design and for modders too!

We also replaced the old Lua API call for altering a character's motivation value with a new generic system which allows for checking, and setting, any of the stats an AI might have.

The U in Usablility

Since the last blog post, we've spent some time fixing some usability issues on the UI side. Mainly, we've added automatic scrolling to UI for use with gamepad controls, removing the need to use scrollbars, which then simplifies the navigation across the UI. To go with that, we've updated lots of the UI across the game, also fixing some selection issues and improving on the mouse cursor autohide system to further smooth the controls and especially switching between input methods. While these might not sound like big changes, they certainly have made the user experience a lot smoother...

Paperwork for a good cause!

The start of a new year always brings a lot of paperwork, with our financial year end timing in to the calendar one.  It's a lot of shifting numbers on spreadsheets but the nice thing is that in the UK, with the fantastic BFI's support, we actually get a credit back on money we have spent on development each year though the Video Games Tax Relief scheme the UK government runs. Pretty good stuff.
We have had some work for hire that we have fitted in in a couple of places, Pontus has been doing research and development on an unnanounced project of a developer friend of ours and Rich ran a lecture series on Blender basics and specializing in Character animation for the MA Character Animation course at Central Saint Martins, University of The Arts London.

We also managed to garner some more funding for some R&D work from one of our long term partners Creative England, which has been super exciting - PLEASE don't jump to any conclusions from this but we have been researching how well our procedural message generation can be evolved to be able to handle languages other than English...

No Tofu!

As mentioned above, we have been working out how our generated content will work in different languages and doing some R&D on non-latin alphabet/writing system support.  This is all quite exciting stuff, and warrants its own dedicated post at some point, but... essentially, OFF GRID's game mechanics depend on key words in data and meta-data generated by NPCs, and the fact that there is text in the game that is generated at all creates and interesting problem to solve when it comes to localisation.

At this early stage we can't specify any particular languages, in-fact we can't guarantee it will work, or that there will be any other languages than English in the game, but we are laying the groundwork to see if possible and have embarked on some research work to see what those possibilities are, watch this space!

The Beginning and The End

Some of you who have played alpha builds, or demos at some point may have seen the intro cutscene to the game (it's the one that some of the clips in the trailer on our Steam page come from). One of the things we have been working on is making this part playable and more of a mix of small cutscene sections intertwined with basic tutorials and gameplay. We are believers in making sure that everything in the game story is told via gameplay and the environment as much as possible, so we were keen to make sure that the very beginning of the game sets the scene while still adhering to this principle. 

Unity's timeline is the powerful tool we have been using to achieve this, but we have had to do some real hackery to get it to play nice with interactive sections rather surprisingly.  When you couple that with tying it into our lua commands for writing missions, objectives and triggers and you start to get quite a complex section of the game to assemble. It's coming along nicely though, and they say the first 30 seconds, and 30 minutes of a game are the most important to focus on to keep players intrigued, so we have been happily dedicating a lot of time to getting this to all feel right. It's also certainly something we'll be counting on you, as our players, to play and give feedback on ahead of full release. Looking forward to seeing what you think!

We've also been fine tuning and cleaning up some of the content in the later game and making some more complex puzzles and hacks. The wierd thing about editing content is sometimes you can make more of something, in this instance we needed to make sense of one of the final missions, and actually breaking it into two seperate missions works better.  Without giving any spoilers, one of the planned missions is now giving a 2-for-1 value!


Content (Level Design and Art) 
  • Design for the Harbour level passenger terminal / offices building
  • Replaced messages that were written for old SMS system with proper single-message conversations
  • Courthouse initial puzzles done 
  • Taking the scene from prototype to production and playable instead of just a cutscene
  • Broke up Court House Level into two levels

Controls and UX
  • Autoscrolling in UI
    • Usability improvements especially on a gamepad for any scrolling UI
    • Greatly improves device UIs since it means we can make their scrollbars un-selectable on a gamepad, simplifying the navigation in that window


  • AI Goal and Action improvements for flexibility
  • AI Debug system improved (with more information and in a clear format)

Modding and Lua API additions 
  • Lua API support for setting/getting NPC AI stat values
    • We used to have AI.AlterNPCMotivation(name, value) specifically for setting motivation stat value, this replaces it with a generic AI.AlterNPCStat(name, stat, value) usable for all the stats an AI might have
  • Lua support for Unity timeline and firing Lua functions from it (use wisely!)
  • Lua Console app for testing any line of lua anywhere in the game
Bugs fixed 
  • Bug fixes related with the AI and save system
  • Fixed issues with mouse cursor autohide/show system when switching between mouse/kb and gamepad controls
    • Year end accounts and VGTR
    • A few small work-for-hire jobs
    • Blender for Animators Lectures
    • New Ideas Fund application and grant


    Hopefully that catches you up on OFF GRID development. It's been a tough 2020 for us, especially the second half of it.  Safe to say, the world has been turned upside down and that had an impact on some of our families and how we managed running businesses and looking after our loved ones. Obviously OFF GRID is continuing development but running behind at this point, luckily we have at every turn been ahead of the punches and come up with game plans to make sure we could continue sustainably, and deliver OFF GRID come what may.

    For our little studio this has meant tightening our belts at the couple of junctures when we have found we were behind our anticipated milestones, tightening scope, bringing in some part time work-for-hire contracts to top up the coffers, and scaling the team down so we could operate in a lean and efficient way. The knock-on effect of shrinking the team for sustainability is it means things take longer, but it has the benefit of meaning you can roll with the punches and survive more easily.

    The three of us, Pontus, Andre, and Rich are still working hard on dev, bringing you the best game possible, and one thing is clear, with our great little team, OFF GRID is going to be everything it deserves to be, and that you deserve it to be for supporting us. Thank you so much and looking forward to showing you more over the coming months!

    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!

    Friday, 9 October 2020

    Sprint Roundup: Meta work

    Welcome friends, time for another sprint update!

    In the last couple of sprints we did a fair amount of checking existing game systems, making sure everything works as intended, and adding some long-planned polish here and there to make those existing features look and feel better. Most visible changes from player's perspective would be improvements to how meaning and use of metadata is communicated to the player, with better messaging about what data has new metadata, making sure player knows when they gain new metadata, and making the effect of collecting data about someone more visible in the UI.

    One of the improvements we did was the addition of the save slots, we believe that this change will make the save system cleaner and quicker to use. Each slot (the current number of available slots is 3, but that value can be increased before launch) can have one manual save and one auto save, also the difficulty option will be associated with a specific slot, to give the option to have different game states with different difficulties at the same time, every other game option will be general and not associated with a save slot.

    Improving the AI system is another important feature that we worked on in recent weeks, it's still a feature in development so we will talk more in-depth in the next sprint roundup, but essentially we felt the necessity to change the NPCs behaviour in the middle of a mission in a more flexible way, using the specific agent Lua script, doing that in an easier and transparent way. This will be a powerful tool to us and modders, to change the AI in a more dynamic way, but also it will help us to debug and improve the NPC behaviours in a faster way. For example, with this we can give a NPC a taser in the middle of a mission to attack the player. We'll have a full update on this topic on the coming weeks.

    On the art front we have been importing a load of art assets into the project and reorganising our source files. We've been reworking all Existing LUTs, essentially cleaning up any old redundant character textures. 

    Whilst we made these changes, we updated the wiki to reflect which LUTs are working and a preview of their appearance, this should help to visualise the vast variety of LUTs we have in the game for modders to choose from.

    On top of all this we've been looking forward with some funding applications for some interesting post release collaborations we have in the pipeline. We've also done a lot of back end organization work, we moved cloud provider for our documentation for the studio, and it takes a surprising amount of time to make sure everything makes it's way over to a new system properly, and when you move stuff you realise you have a bunch or organization to do at the same time!

    In the latest game and Levelkit build : 

    So, what can you expect to see in the next build of the game and modding tools?
    Content (Level Design and Art) 
    • Dynamic light cone mesh for flashlights (no more flashlights clipping through walls!)
    • New gates, fences, light models, concrete barriers, road/sidewalk parts etc added to LevelKit 
    • New character LUTs have been made based on the older designs that work with the new LUT template

    Gameplay and Mechanics
    • All game systems will now only display a character's name if the player has actually learned the name from metadata or not.
    • Targeting system will show if a data point has new metadata the player hasn't found yet. (also cleaned up the target info window a bit)
    • Data download notification shows the amount of new metadata gained from the data.

    Controls and UX
    • Save slots added

    • Improving and fixing various issues on the AI system such as NPCs being able to move form neutral to adversarial mid mission
    • Setting and changing NPCs actions and goals were improved
    • Cleaner NPC animation state machine setup
    Modding and Lua API additions 
    • Changes made on agent Lua script to allow for more flexible modding of AI
    • Lua track for Timelines (run any Lua command from a timeline - DANGER!!)

    Bugs fixed 
    • Character LUTs were not assigned correctly if only color or only smoothness/metallic was defined in mission Lua script.
    • SocialInventory was not assigned correctly so all collected metadata was just sent to void
    • Lua API was not handling null/nil values consistently, some API calls returning a nil value from Lua side as a nil, and others as null.

    • Funding applications for post release DLC
    • Cloud and documentation migration
    That's it for this update, we'll be back again soon with more, in the mean time stay safe folks!

    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!

    Wednesday, 29 July 2020

    Sprint Roundup: An iterative process

    Devblog time!  From making all characters playable, API improvements, and an overhaul of our setting systems, we've packed a lot in to the most recent sprints this summer. 

    New character spawn system

    On the last sprint roundup, we talked about the new NPC creation system - a more flexible system to create various types of NPCs.  That was the phase one of a bigger goal:  to improve and simplify the process to spawn all characters - NPCs or playable ones.

    The second (and final) phase was all about making all characters playable!  Now all character prefabs are generic, and every character can be a NPC or playable.  To change between these two states now just requires defining in a single line in the mission script, which, for examples, looks just like this: characterType = "npc". The game will automatically handle add the needed components and connections to make the character controlled by the player or the AI.

    This means you can now easily make a mission in which you can play as a guard and Joe can be an NPC!  It's a big change that gives so much more flexibility when creating new missions.

    Joe tazering a guard

    Look Up Tables

    We also reviewed how the characters are currently implemented, and decided how we want them to work with regards to the character look up tables. Following this, we decided to create a new LUT template that would work for all characters whilst still enabling a variety of characters to be created from a single mesh, which will also take into account the new head prop system. For this system to work, a new UV layout has been created, which has been a great opportunity to review all existing characters and tidy up any issues with these characters too. 


    There's been a lot of work getting Timeline to play nicely with spawned characters and our Lua API - so recent work has centered around implementing the playable sections of the intro to the game making use of this. It's been an interesting process with lots of back and forth as Timeline really does seem like a tool made for making animated movies in Unity rather than controlling entities in a game engine between playable sequences. Writing "playables", the Unity components needed for scripting different functionality into sequences, is a little arcane too!  None the less, we now have something that is looking pretty good and sets the whole game up nicely.  We think you are going to enjoy this!

    Joe in kitchen, Jen coming down stairs


    We improved the settings system, and added new settings to give players more options and to add other important small quality of life features.

    OFF GRID main menu image

    The new and updated settings are:

    • Vibration: enable or disabled the controller vibration
    • Auto hide mouse:  the game have full control if the mouse cursor is shown or not, dependent if the player is playing with a keyboard and mouse or a controller
    • Mouse locked [only available if the "auto hide mouse" option is disabled]: Always show or hide the mouse cursor
    • Follow camera: if enabled, the game camera will always follow the player character
    • Brightness: increase or decrease the screen brightness
    • Resolution: select the resolution in a list of available ones, the user screen native resolution is set as default
    • Fullscreen: selected between fullscreen or window mode
    • Locked framerate: it is possible to play the game on a unlocked or a locked framerate
    • Vsync: the options here are off, on, or half
    • Anti aliasing: the available options on this field are FXAA (FastApproximateAntialiasing), SMAA (SubpixelMorphologicalAntialiasing), TAA (TemporalAntialiasing) or none
    • Anti aliasing quality: the player will also be able to choose the AA quality level if it's selected FXAA or SMA on the option above
    • Shadows Quality: it's also possible to select the shadows quality (high, medium, and low) or disable it completely

    Quite a list that is!  All together, they will certainly improve user experience. 

    API Improvements

    Making games is very much an iterative process, often requiring going back a few steps and re-doing what you have but in a slightly better ways. Over the development, we've grown our Lua API a fair bit, and sometimes things haven't ended in the most logical place, or with the most descriptive name. And in quite a few places we've eventually come up with a more convenient, or more flexible, way something could be done instead. So, while we still have a chance to make massive, breaking changes to our Lua API without annoying all the modders by breaking their mods, we've done a bit of an overhaul of our Lua API in general.

    In short, the API is now less verbose, more consistent in its syntax and its use in various Lua scripts in the game, automates certain setup tasks better, removes some easy chances of making mistakes in your scripts, and after all the changes, our mission scripts shrunk in size by about 25%, so you'll probably end having to write less code to make your mods as well!

    In summary

    As always, a quick list-based summary of the progress:

    • Finished the new spawn character system
    • Bugs fixed and polish on characters and save systems
    • Character LUTs

    Content (Level Design and Art) 
    • Intro cutscene playable and tutorialised
    • Testing the Unity Timeline integration with our Lua API and extending it to fit the implementations we need it for
    • Work with virtual cameras and targeting in Intro to make them behave nicely now they are following dynamic spawned targets
    • Continued work on the harbour level
    • Harbour props - creating fences, gates and cranes to help make the harbour feel more authentic
    • Adding head props to the unity project

    Controls and UX
    • New and updated settings

    • Writing custom AI Agents for intro level interactions

    Modding and Lua API additions 
    • Updated some existing levels to new Lua API
    • Added in-game debug UI with support for executing Lua commands while testing the game/mods

    Bugs fixed 
    • Lots of generic clean-up and fixing various small bugs

    As always, thank you for reading and following along on this development journey!

    The OFF GRID Team

    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!