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!
Wednesday, 8 December 2021
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?!
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:
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!
No Tofu!
The Beginning and The End
Changelist
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
- 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
- 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!