Wednesday, 29 July 2020

Sprint Roundup 29.07.20: 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. 

Timeline

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

Settings

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:

Gameplay
  • 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
Graphics
  • 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:

Characters
  • 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

AI 
  • 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!