Showing posts with label Lua. Show all posts
Showing posts with label Lua. Show all posts

Thursday, 14 March 2019

Sprint Roundup - 14.03.19 - Doors of Perception


It's that time again! Here is your regular sprint round up of development! Read on to find out what we have been up to in the last few weeks and if you are one of our backers on the FIRST ACCESS level, what you can expect to see in the latest build update!



Content (Level Design and Art)

  • Created new Character LUTs amd some character variations (as seen above!).
  • Cleaned up on the geometry of the IRL hacker and activist characters.
  • Setup new system for door prefabs
    • Wow this was a big one, but one we have had our sights on a while - the doors and door frames all now conform to sane dimensions and make use of the new nested prefab system in Unity meaning doors and their variations are infinitely easier to create.
  • Lots of work on an early level and tutorialisation of rooting your phone and glasses, and the hacking tools you have to install and learn at the beginning of the game.
  • Some more scripting of interactions with a more neutral NPC than the fairly intolerant guards you meet in other levels.


Gameplay and Mechanics

  • New mechanics for data view trace time & app use and costs. Hopefully this will sort out some of the pitfalls of the old trace time system and instead turns that into a proper game mechanic. Plus the changes give us a way to upgrade player abilities throughout the game while keeping things balanced. We'll test this a bit in action and will then tell you more details. 
    • This also came with some visual prototyping  with Josh Ge's ASCII art and animation editor REXpaint (as you may recognise from his game Cogmind) to try and get an ASCII art / homebrew software feel, we are still playing with this, but it's a nice start:
Prototyping visuals with Josh Ge's REXpaint
  • Added support for using physical inventory items (and the Lua API for scripting what the items do).
    • This helps evolve the game's  "adventure game" like elements
    • This allows for finding and using items which can be scripted now to do pretty much anything. We have yet to add a "combine items" button, but watch this space. Mini crafting system here we come! :0
Speaking of 'adventure game like elements' - Rich talked a little bit about this on the retro gaming podcast last year. One of the host's, Ben, described the game like this:

"Its kind of like an adventure game that is then set within this 3d stealth game - which gives you more fail states than 'well I'm too stupid to figure out this puzzle'.

You can listen here around the 1hour 30min mark.

Modding and Lua API additions

  • The above point to do with physical item inventory comes under Lua API too of course.
  • New scene hierarchy in the Template scene in generated when you create a new mod LevelKit to give a guide to help keep your mod scenes tidy and

Other

  • Fixed NPC prefabs to have the correct navmesh area tags so that NPCs would use stairs again!
  • Lots and lots of small stuff about doors. How their logic is set up, how the player and NPC's unlock them, and making sure they open away from the character instead of hitting you in face etc...
Testing doors!


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!

Monday, 19 November 2018

Sprint Update 19.11.18: The Longest Sprint


Hello!  This Sprint Update is a long time coming - there's been a lot going on, including a successful Kickstarter!   Successful Kickstarter has a nice ring to it, eh!?

If you followed along with the Kickstarter (and hopefully you did!) you will have had a lot of updates to read in the meantime.  Nevertheless, here is the detail of what we have been busy with throughout this epic sprint as we prepared for and ran our first ever crowdfunding campaign:

AI

- Pooled dictionaries in AI state
- Immutable AI state
- Inevitable fixes for above
- Extra cost for guards using stairs
- Fixes to AI planning
- Fixes for OffMeshLinks / AI using doors
- Tracked down a bug relating to door GUIDs / saving and loading
- Noise documentation
- Updated AI used in the Harbour scene
- Fixed a drone navigation crash
- Added mechanisms for AI to prefer particular devices based on their personality
- Added mechanisms to allow AI Actions based on their personality + Documentation for this

Controls

- Added UI to remap controls in main menu
- Checked/updated all control settings & defaults
- Limited repeat rate on analog gamepad sticks when moving around UI
- Added dataview range control on mouse & keyboard


Apps being configured: choose if you want them available in the app wheel or radial menu.

App system

- Completed new app system
    - added App system Lua API
    - unavailable apps are now hidden from Apps menu
    - If app can't be added to either appwheel or radial, it's now hidden in the App Menu (for exaple the password cracking is currently an app, but shouldn't be controlled by the player directly)
    - Apps are added to AppMenu, AppWheel and Radial menus when the app becomes available
    - Only execute currently selected app (instead of all active ones) when selecting a target+app in radial menu
    - Update loop for apps (so apps can run in background and do things continuously/over longer time)
    - Apply app action cost (both per-action, and for app cost over time for a continuously running app)
- Status windows for apps
    - Support for displaying an icon and/or a piece of text
    - Support for changing icon & color
- Rewrote Light Monitor app using new API
- Created "Send Data" app (lets you send a file to currenlty targeted chaarcter or device)

Lua API additions

- Lua API for audio RTPC
- Added normal (scaled) time support for scheduler API
- Added notification messages to UI Lua API
- Player API additions to get social profile data for currently targeted character

Bugs fixed

- Player character walking/crawling sounds get swapped after crawling first time
- Removed hack that re-assigns all materials in scenes (original Unity issue that required this has been fixed so the hack isn't needed any more)
- 1st person targeting should maintain the direction player is currently looking at
- Character profile data displays color codes in UI rather than colored rich text
- Fixed notification message UI animation setup
- Fixed file viewer not displaying images
- Fixed card scanners missing UI markers whe usign the Help app

Apostle level

- Checked all atmos colliders, added new ones where needed
- Blocked staircase from lobby to 1st floor
- Blocked door in 1st floor that would otherwise allow player to skip half of the floor
- Checked navigation layers
- Checked colliders, changed some to simpler ones, added some that were missing
- Fixed colliders with negative sizes
- Fixed typos in some device scripts
- Checked all doors and assigned correct door groups and access levels
- Removed drone from rooftop
- Replaced a few hunded cardboard box models in level with prefab versions
- Fixed missing/wrong static tags around the level
- Removed some leftover invisible collliders blocking player and the AI movement
- Fixed props not correctly aligned to walls/floor
- Redesigned first floor of Apostle HQ
- Implementated new hackable device

Art

- Creation of activist and hacker characters
- Prop and asset creation for new levels
- Set dressing and environment art for the Apostle level

Models of the real life hackers featuring in OFF GRID.

Other

- Enabled ultrawide display reoslutions
- Added headers support in popup menus (menu item with no function becomes a header automatically)
- Added splash screens when starting the game
- Data colors now ignore alpha value set in scripts and instead use pre-defined opacity to make sure things look correct in data view and in UI
- Opened studio Discord!
- Built a new website for the game
- Quick update of studio website with new Semaeopus logo

Kickstarter

Updated build for Itch.io demo

- Removed options menu from build
- Removed other levels from the build
- Forced loading straight to Apostle level in demo build
- Added Kickstarter campaign ad in main menu
- Disabled save game loading (makes no sense for a single-level demo and would cause issues when loading a save where the demo level is already completed)

Campaign Prep

- Campaign page drafting, review, and finalising
- Reward drafting, review, and finalising
- Contact push
- Press push
- Newsletters
- Update planning: every 3-4 days to all channels
- News release drafting
- Daily social media scheduling
- Streaming planning

Events and promotion

- Game Dev Camp, Lisbon - Rich and Steve spoke
- IndieCade, LA - Rich spoke
- Sweden Games Conference - Rich spoke, Off Grid demoed within Indicator and Off Grid won the Indicator award!
- Inside Intel, London - an art exhibition on privacy & surveillance
- PlayUK, a videogame curation put on by the British Council in Macedonia
- Dev Space Winter Mixer, London
- Closing party and livestream to countdown to the Kickstarter campaign's end!



The final moments of the Kickstarter campaign!

Whew!  A long list to match a long, bountiful Sprint! 

To top all of this off, the team travelled to Dundee, Scotland last week to attend the UK Games Fund Awards.  Semaeopus was nominated for the 'Smart Studio' Award, and we were looking forward to a fun celebration together after the month of hard graft.  When the category for 'Smart Studio' was up, we were absolutely stunned to hear 'Semaeopus' announced as the winners!


Award winners!  Sarah, Steve & Pontus pictured with the award presenter.

A successful Kickstarter, two new awards, and loooooads of new supporters - we are so grateful to each and every one of you that has helped make the last couple of months so successful!  

There's been SO much going on - expect to hear more from individual members of the team as we each wrap up from the last couple of months. 

What's next?


It's onwards and upwards now.  We're working on getting our FIRST ACCESS programme off the ground.  Anyone that backed at the PENTESTER level or above can expect to hear from us soon about what is to come. 

One of the two main goals of the crowdfunding campaign was to provide a bit of additional resource to support more open production of Off Grid.  We're busy getting our ducks back in a row after the Kickstarter, and can't wait to move forward with you all behind us.

THANKS EVERYONE!

The Off Grid Team


If you haven’t already - be sure to wishlist Off Grid on Steam - *EVEN IF YOU ALREADY BACKED THE KCKSTARTER! Each wishlist makes a big difference to us, and we really appreciate your support!

Tuesday, 5 December 2017

Dev Blog Post 5.12.2017 - Social Engineering and Distracting Noises

We’ve been working with a bit smaller team for this sprint, so this is going to be slightly shorter blog post than usually. And we’ll switch the format slightly as well, so you’ll get a section from both of us telling about what we’ve been up to…

Steve:

My first month has flown by! It’s been great to get started and become acquainted with Unity, which has impressed me. I started off on Off Grid by poking around the existing code, and playing the demo level, which gives an good overview of where the project is. After that I was forced to do some real work; first of all, I exposed the ‘Noise’ system to Lua, meaning modders will be able to play sounds that the AI will investigate. I’ve also fiddled with the camera, with the Lua setup, the wiki, and a fair few under the hood changes that hopefully will help us create new content more quickly. Exciting times ahead!

Pontus:


Character profiling

We had already previously converted the text files we use to describe each character’s personalities and background information from old XML files into Lua. But as we'de designed some of our data mechanics, and especially the social engineering aspect of hacking and privacy bit further, we realised the profile format we had would not do the job.

So, in this sprint I’ve worked on re-designing the character profiles to use a tag-based system that allows us, and the modders, to easily add pretty much any amount of background information about the characters, and tag that data in a way that lets us then attach those tags to different data points, files and whatever inside the game, and hook it into the AI’s behaviours easily.

(and same as with our mission progression system and many other things, the design goals and explanation how it works ended being much more complicated than the actual implementation, so no need to worry, this is really simple system for modders to use and should be very extensible and flexible for all the crazy weird hacking stories and tools modders might come up with which we never even thought about…)

While doing the required changes for this, I also added few quality-of-life improvements, so the levels can now automatically load character profile files, and the image files used for character colour customization, both from the level’s own folders and from the Common folder used for sharing things that might be used in multiple levels. This means that we don’t need to duplicate character files to each separate level where the same character might appear, and also modders will have easy access to some pre-made characters they can use in their own levels without having to even bother with the actual character profile files until they want to create some new characters of their own.

Sending SMS, with Lua

We are then using those character profiles to generate text messages (and eventually e-mails, and other files as well) that get sent to all the characters, and that the player than intercept, read though, and use to learn about the characters (maybe to figure out how to distract a specific guard, or to help guessing someone’s password, and so on).

This is nothing new, the SMS system has been in place for long time already. But the source file we used for the SMS templates was the last remaining XML file in the game, so of course that had to be converted to Lua as well… If nothing else, it’s more consistent and easier for everyone to deal with the same language throughout the project, but it’s much more human-readable syntax as well.

To take things a bit further than that, we thought that maybe the actual code used to generate the messages could also be moved into Lua. This certainly isn’t something you’d want to mess around for every mod you make, as it’s a bit more complicated than the rest of our mission and character files, and the actual content you see in-game can be changed easily by just creating different character profiles anyway. But exposing that code to the modders might open some interesting opportunities, maybe for localizing the message generation to some language with different grammar than what English has, or to build something more complicated than what the base game needs to go with some awesome mod you are making. We’ll see what happens!

Oh, and of course I made sure both the template file and the actual message generator code can be loaded from both the Common folders as well as from the level-specific folders, just like with the character profiles.

Outro

That’s everything for now! We’re not quite sure yet if we’ll have a short sprint (and one more blog post this year) or if we should just make it a long one and return back to you in 2018! Either way, we’ll make sure to let you now when the next blog post is out!

Tuesday, 6 June 2017

Off Grid Sprint Update 06.06.2017 - Radial Velocity

The month of May is done and dusted - and Off Grid is all the better for it! We’ve overhauled the app system, reorganised our LevelKit, and continued adding all the right save features. If you’re a wannabe Off Grid player and modder, the time to start getting familiar with the tools at hand is right here, right now!


New ways of using your apps

In this sprint we ended with fairly big difference in how apps, and selecting targets for interactions are handled. While the old AppWheel is convenient for certain types of interactions, like grabbing all the data around you as you run through the level, it’s less ideal when you want to do more planned and complicated interactions with various devices, without having to switch different apps on & off and sometimes opening your pause menu and inventory to select files and send them.

So we decided adding a radial menu you can use to select the apps to use, files to send etc while you are currently looking at a target device would be a nice option.


Simple enough as a concept, but as things go, actually building this ended up requiring quite a lot of other things to change as well…




Wednesday, 29 March 2017

Off Grid sprint update 29.03.2017 A(door)able Conversation

Hello and Welcome!

Dear future players, fans, diehard readers, friends, and fellow indie game lovers, please open your ears, blink your eyes, wiggle your fingers, and get ready to mark your calendars:
Behold, BOnUS STaGe!!!




Bonus Stage is a showcase of independently made video games happening in Loading Bar, Dalston, all day on the 2nd April 2017 (this Sunday!!!).
We’re chuffed to have been invited to take part and are super excited to get our game into even more hands!  Come along - it’s totally free and is a sweet opportunity to get your hands on these great games, meet the developers behind them, and score yourself some swag.
The event is part of the wider London Games Festival, and is one of many fringe events taking place throughout the capital at the moment.

Behind the scenes

Working in the shadows
We have had an extra stealthy member of the team working hard in the background for the last few months.  Her name is Sarah and she’s a bit of a low key operator, but she has recently resurfaced on Twitter herself, and so it seems like the opportune time to shout about how awesome she is and welcome her into the fold.  She’s been helping to fine tune the Semaeopus machine and is taking charge of our social media.   You’ll be hearing a lot more from her as development progresses!  

Under the surface
The team has been shaving away at a whole slew of different tasks, but sometimes it’s easy to forget all the foundational work that goes on under the surface. This time in a project, where you are breaking through from systems and mechanics​ to content and full production comes with an array of different challenges for small teams. Obviously there is the transition of roles and responsibilities as the day-to-day for everyone starts to change shape, and there are considerations of resources, not least scaling up the staff themselves to handle the increased workload that full scale content production inevitably​ brings.
There is also discipline, and finding who is going to own the responsibility for ensuring each team member stays rigidly on task; the amount of jobs to do increases and therefore so does the surface rates for distractions, rabbit holes and scope creep. We do a fairly good job of managing this with our agile approach where everyone has to take responsibility for the next sprints work.
Among the accounts, production and secret biz dev we can’t really talk about, there’s been some great progress and good fun happening over the last month.  Lots of level design going on:



And we finally received our Perception Neuron to do our own mo cap and get some more animations in our bank!  The team couldn’t wait to open it up and start trying it out.  Here’s a couple different interpretations of the ‘T pose’ during calibration :)


The New Door System

This sprint Harry’s been refactoring the door system.
Doors in games can be a never ending source of complexity and problems.
We’d highly recommend Liz England’s hilarous article on Gamasutra
Our new door system had the following requirements:
1.  Doors must have the ability to be hacked (therefore require a network connection)
2.  Door scanners must use NFC connections for key validation
3.  Doors must be easy to set up in LevelKit with only a few variables to tweak
Our old system relied on the idea of “Access Levels” - depending on the player or NPC’s access level, they’d be allowed through the door.
Our new system uses the idea of “Zones.”  Multiple doors can belong to a zone and multiple keys can unlock a zone.
When placing a door prefab down in LevelKit, there’s a zone variable to fill in on the ‘Door’ component.




As you can see in the above example, the door is part of the “Delivery” Zone, the Zone component is the only value you’ll need to change in the Level.
Now lets take a look at the mission script changes!
Here’s the door section in one of our in development missions:




So let’s break it down a little.
Section 1: This sets up the network that the door system will use. It’s required for us to send data when keys are used to validate a door scanner.

Section 2: This code is setting up the Zones and which keys unlock them, for example. Anyone with the “Admin” key will have access to all the doors in the last 4 Zones.

Section 3: So this part is a little bit more complicated, but stay with us! :)
It’s all very well and good setting up these zones and their keys.  But how does the player ever get them?

This is what section 3 is doing. IDcard01 is an interactable mission object.



Once “SetKeyOnDevice” is called, the key data file will be transferred over when the player interacts with (In this case scans) the card.
We also have “Doors.AssignKeyToCharacter()“ to directly send the key data file to a character.
This isn’t all that’s in our new door system, you’ll have to pick up a copy of the LevelKit to find out more details! :D

Conversations

If you’ve had a chance to play Off Grid this far, you might remember there being some points in the game where you are faced with an endless stream of long text messages, either telling you what you should be doing, or providing background information about why you are doing it. And you might also remember us mentioning that we were aware that this wasn’t really working as well we’d like…

From game design perspective, that had a few big problems. First of all, the player is often busy trying to do something else, and message notifications popping up in the corner of the screen are probably the least important thing you feel you should be paying attention to (well, might be the
same thing in real life as well…). To make it even worse, even the players who were kind of interested in the story seemed to just doze off after few long messages! Switching to the Pause menu and reading though the old messages one by one was also a bit cumbersome way for following what really is a longer piece of info, but had to be split to small enough separate pieces in order to work as text messages.

Finally, the worst of all, reading long pieces of text means that the player is not actually actively doing anything, you are not really *playing* the game at that point. While some people enjoy taking their time to read through game lore, many don’t. And when people started ignoring the messages because of this, we lost our means for communicating to the player what their objectives in the level are, what they should be trying to do, and where they should be trying to head.

Well, for a long time now, we’ve also had a plan for how to solve these problems. How about turning all that into something the player can actually actively be part of? Changing the monologue of text coming from other characters into a conversation where the player is taking part, and can make actual choices as well. Not exactly a new idea, we admit, but we are making a game where all the data sent around you is tracked, and is simulated on the level of devices sending it though networks and so on, which made things a bit more complex and also meant we couldn’t just grab some existing dialogue system and instead had to design our own. Last month we were talking a bit more about the design side of things, and now we’ve turned those designs into something that actually works!
Lua Conversations
Our new conversation system is completely scripted in lua, it hooks into our existing apis and allows for some really fun state tracking.
Here’s an example of a simple conversation between Joe and Jen discussing what they’ll have for dinner.




Conversation scripts hook into your mission script seamlessly, all you need to do is list the short names for the characters from your mission and we’ll get the full name for displaying in the UI.
As you can see above, the begin function is called automatically. From then on, it’s up to you to fill in the message queue as you see fit.

Normal messages simply use the Send function. The first argument is the character the message is from, the second argument is the content of the message.
We also have support for dynamic messages, as you can see on line 21. If user provides a function that returns a string as the content, then we’ll call if when Send is called. This allows you to make some messages procedural.

To set up selectable responses from the player, the user can call the SendResponse function, listing up to 4 responses.
The first part of each response is the text that appears in the conversation log, the second part is a reference to the function to call once that option is selected, this allows the conversation to branch.
Here’s some examples of what that conversation looks like in game :)





We’ll keep hold of your on-line conversations…
One extra benefit from conversations over individual messages is that we were also able to  change how our Message history page (in the game’s Pause menu) looks and behaves. Instead of displaying individual messages for the player to read one at a time, we can now easily group all the messages from a conversation together. And this makes it much, much easier for the player to follow what was said and to find the important pieces of information. It also means that there are less entries in that menu, one per each conversation instead of one per each message, so finding the right chat to read should be a lot easier as well.

On the technical side there’s nothing too complicated here, at least for now the log really is just a log of the conversation text itself, and who said what, so we are not logging the actual data sent around or anything like that. Maybe in the future, if we find a good reason to do so. The only reason why we couldn’t just grab the data directly from the conversation Lua script and instead needed to log it as the conversation went on was making sure we save the replies the player actually selected during the conversation.



Missions between missions
So, that’s the old SMS system replaced. And we could have stopped there… But there are times where it just feels odd that the player would just show up on some location, completely without having any information or reasoning beforehands, and everything is just explained when you get there. Surely the people sending you on a mission would at least tell you *something* first to prepare you for what you need to deal with.

So, we made you able to run the conversations in our map screen as well. And it’s not just a chat, the conversations there are actually ran as missions, with all the same rules and effects on the overall game progression as the “normal” missions have. The only difference is we just run the mission & the conversation right there while you are looking at the map instead of loading actual level.




This is even more useful when you think about having some user-made levels, or even complete new stories. You can use the map screen conversations to introduce your own story, to prepare the player for a new mission, to debrief after completing one, and also as a midpoint in your story, something that can serve as a choice between branching story lines and different available missions. And because they use the same mission system, the choices made in the map screen missions can carry on in your save games, and work for long-term progression, affecting things in later conversations and missions. Or, really, whatever the level creators can come up with, it will all be available in the Lua API so if you want your smart water bottle to know what you said to someone few levels earlier, now you can. (What? Smart devices around you logging your behaviour? That would never happen in real life!).

Artist on the run

We have some more good news - we have officially been joined by artist Rob Ramsay!  Maybe you spotted him earlier?  He was the T-pose tea drinker in the mo cap photo above - we like his sense of humor! :)  Here’s a little update from him on what he’s been working on:

Processing 3d models from reference for Off Grid
This is my first blogpost for Semaeopus, and for Off Grid. As an artist with a keen eye for attention to detail and working as methodically as possible I am tasked with making the environment art and props, an specifically making it all fit into the LevelKit setup that the team has for making it easy fro modders to produce new levels.

The process involves looking at reference material and making props that snap to a 20cm grid with extendable parts and components, which in turn allow for the making of custom prefabs and larger props that can be placed into the game.
For example, this sprint we have been producing the model parts of the hangars for the Harbour, which was a case of checking out the reference material and deciding how the parts break down, into walls, roof parts, edges, guttering and internal frame supports.



Above, you can see the parts to make walls and doorways for the hangar have been made with various smaller peices that can be used to extend to almost any multiple of 20cm. In respect of this, the pattern of the walls also had to comply with 20cm.

Each part has a material assigned along with vertex colouring that are predefined from the art document; for example, aluminuim as a metallic-vertex material and plastic as a specular-vertex material. This is currently internal documetation, but there is a future plan for a community wiki with more detail on how anyone can structure making assets for Off Grid.

Another thing that has to be considered when making parts is where the pivots or origins are for each prop. Ideally, they would be at a bottom corner landing on the 20cm grid, this way parts can be rotated and placed together, snapping into place.

A good example of this is how the railings and platforms for internal industrial style walkways containing all kinds of parts that can be assembled to make prefabs.



Here are these parts constructed into a usable prefab that can be placed around any industrial setting:




Each part that is imported is given some kind of collision mesh, and collections are made that will be later used to present to modders who want to know what parts connect together.
Here are 3 examples of some of the collections made so far:




Eventually all of these collections are placed into a collections scene that we can use internally, and will prove useful for future modders to browse, understand and implement.
As you can see, there is a lot of flexibility and we are looking forward to what you all come up with!  ;)

That’s all for now

But don’t forget - come to BONUS STAGE on Sunday and play Off Grid!

Thursday, 2 March 2017

Off Grid sprint update 02.03.2017 - A little *more* conversation

A little more conversation, a little more action, please!


Somebody must have been listening to a little Elvis Presley around here. Are you dancing in your seat a little bit? We are! :P

Annnnnnyway - a merry March to you!  We’ve had a good February, full of all kinds of progress, on systems, content, and biz dev, so without further ado, here’s our action:

Finishing the city map

There were few small details we wanted to do on this pass of the city map scene left for this sprint:


First, what would a map be without proper markers? We replaced the placeholder ones featured in last dev blog post with new ones, this time drawn on the UI side. Not only do they look cleaner, but also this means we can more easily switch markers for different missions; for example, to differentiate between side quests, or different story lines and content coming from different mods.




…and then, we added support for multiple missions taking place in the same location, or in same city district. Just because it seemed like a good idea. We’ll still need to add the UI stuff for selecting between the missions if they are available at the same time, but on the code side, things are already in place.

Friday, 15 April 2016

Sprint Update - 15.04.16 - Showing off and being secretive

Top secret dev stuff

A lot of this month has been spent working on things we are under NDA over so can’t mention too fully yet.. but the time will come… and there is plenty of other interesting happenings to talk about.

What we did do…



Well, we finished up with the UK Games Fund and demoed progress so far at their event as part of London Games Festival last week. That went really well and it was great to meet some of the other devs that are part of the UKGF first round, many of which are making some very exciting things.
Shoutouts to our UKGF cohort co-conspirators, including Andrew Roper from Spilt Milk Studio, Billy Thomson and Martin Livingston from Ruffian Games, Andreas Firnigl from Nosebleed Interactive, Jon Olive from Mixed Immersion, Olly Bennett from Cardboard Sword. It’s going to be great to see where each of the titles from these devs are in 6 months time.

Wednesday, 3 February 2016

Off Grid Sprint Update 3.2.2016 - Beginning of a New Era

It’s been a while since our last development update, but there’s a good reason for that… (And it’s not just the holidays we spent recovering from last year and doing a bit of research and planning). Be warned, though, this is going to be a long post!

Christmas is a time for modding “research” (and sharing of course)


We have been aiming to open up Off Grid to modders in as many ways as is possible and manageable for a small team like ours, and so the sprint over the Christmas break seemed like a good time to do some “research” by messing about in some of our favourite moddable games made by small(ish) teams.


We had a gander at games like Kerbal Space Program, and Cities:Skylines, who develop using Unity and have opened up a huge amount of their C# API to modders, but also, more interestingly, KSP and other titles are using Unity itself as the level editor for players (due to it being free to download and use - why build your own?!). As far as data and code modding goes, we started small with a tool mod for Starbound (making the most powerful hammer in the known universe seemed like an important contribution to make ;P) and built up to looking at the quest, codec and dungeon modding structure to see what the good folks at Chucklefish have opened up with JSON and Lua for players to tell their own stories through missions and content.



Happily enough, it would seem the .xml data structures we are using already to store things like NPC personalities and the in game hackable DataPoints (text messages, emails etc.) will hopefully lend themselves quite nicely to a similar approach, and so next sprint we went into for January has been partially targeted at implementing a first pass at Lua scripting for character interactions with the aim of them being moddable… but I suppose we are getting ahead of ourselves…

UK Games Fund

We’d better start with the big news. We recently received a grant from the UK Games Fund to further develop our game prototype. This of course meant some of what we had planned for January needed to go on hold, and instead, we needed to sit down and think through the best ways to use that money. We decided we’ll use it to build some of the missing things that require the most help from outside of our small two-man company, setting things up for level editing & modding support, and dealing with our interactive story introduction and tutorial, which will require good amount of animation, motion capture, and of course sound…

Updating the tech

To get started with this plan we realised it’s time to get our tech up to the latest versions. We’ve been in limbo with the old Unity 4 this far, as we knew the upgrade would require roughly a week of rewriting and refactoring of code due to the way Unity does some things changing significantly. The upgrade also required us to update the sound engine we are using, Wwise. And to do that we needed to get our sound designer to come along and make sure everything is still working like it should.

So, now that’s done, we are running latest Wwise, compatible with Unity 5, and also with the support for building audio for Linux. On top of that we also got our sound banks changed to a better compressed format, shrinking the game builds from around 1.2GB down to less than 400MB. That’s going to make things a lot easier to send over the Internet…


With Wwise up to date we finally had a chance to look at Unity itself. Moving things from one major game engine version to next one isn’t the simplest of tasks, and there are limits to what Unity’s automatic migration tools can do. We ended creating a separate copy of the project and testing different approaches to figure out the exact route we’d need to take to get everything running. A few days fiddling, hours of carefully reading through Unity’s change lists and a couple of tries later, thousands of compile errors in our Unity console had narrowed down to few warnings and things were good to go on the main project.

The main hurdle was dealing with any plugins we had around, sadly Unity doesn’t have much for package management or version control for them yet, so lots of the upgrades were a question of searching for any plugin files, deleting it from the project and importing it back again, moving things around by hand, and generally just guessing and trying until they were all running again.

There were also plenty of new changes from Unity’s side, inverse kinematics needed to be handled in different way so our character controller scripts needed a bit of reorganising. There were a good few simple fixes, things like level loading, and how transparency is handled in shaders, had changed and just needed us tickling a few lines here and there. However what created a bit more difficulty was that the way fog is handled is quite different now, and the shader effect we used for our data view relied on reading Unity’s fog settings to fade the data view out over distance. With a bit more research we now have new version of that shader, this time just calculating the distance from camera to which ever vertex it’s drawing on screen. Seems to look even better than what we had before so that was definitely worth having to rethink the effect and shader mechanics.

…and of course the light and lightmaps changed, as did navigation and occlusion culling and everything else. So all of those systems had to be re-tweaked and baked again to get things moving and looking like they should.



So after all that, things are now more or less up and running with the new engine version, and we are finally able to benefit from all the new features and improvements in Unity 5. There are a few issues that still need ironing out, the small differences in physics require adjusting things here and there, and we’ll probably want to redo our lights and take a better look at our camera settings at some point. But we’ll get those sorted out over time, and new Unity features like multi-scene editing are already making our life easier. And of course things will only get better when we have time to update our rendering setup and other camera effects to get all the benefits of Unity 5’s new lights and visuals.

(And with the sound engine up to date we can now finally make the Linux builds *WITH SOUND* that we’ve been promising all this time. That alone makes the upgrade worth it…)

Lua everywhere

Our old mission system relied on a bunch of custom C# code all around various objects and components in the level - a quick and dirty prototype hack essentially. Not the best setup even from our point of view, but completely impossible for doing any level editing support. The plan was to restructure all that into a single script, but to make things even better we decided to build it with the future modders and level creators in mind.
We always had the plan of using Lua scripts in data to allow triggering custom behaviours and reactions when the files are sent to different characters and devices. So if there’s going to be Lua support in the project, why not build the level & mission scripts around it as well? After all it’s an easy-to-read way of defining any data and at the same time a very flexible language for scripting even complicated mission progressions.


We’ve used another Lua integration package before, but for Off Grid we ended up picking up the very nice MoonSharp. Setting things up was a breeze, and we now have the first version of Lua-based mission scripting working. The long-term plan is to also allow defining most of the character spawn locations, items and data used in levels etc. in the same file, so that’s what we’ll try to get running this next month.


Oh, and while doing that, we also got the Lua support for any network devices in the game done. So DataPoints now have the option of pointing to a Lua file as well, and when any NetDevice receives the file it can run the Lua script to trigger different things. That has already ended up being part of the new way missions are running, but we’ll definitely find more interesting ways of using the feature (TROJAN anyone?!). And obviously connecting that with the AI to trigger character behaviours is on the plans as well, although we’ll have to see if it gets done in the next sprint as part of the level editing/modding work or if we’ll have to work on it a bit later.

Setting up a story


Hopefully the test base for the Lua and modding features will be (at least partially) building the interactive intro with the modding tools. Those of you who have played the early incarnations of the demo will remember the little storyboard/animatic at the beginning. Well, here it is in the flesh, sitting in Unity and waiting to be brought to life!



We spent a some of this last sprint setting up the Apartment scene, cleaning up models and lighting it. there is still a long way to go, but it’s great to see this new scene starting to take shape, we can’t wait to throw some code on all the objects in here!

…and then some small stuff:


Encrypting data files will now automatically generate proper encrypted-looking content, with all the PGP version tags and such in place. This means we don’t have to type all that random stuff by hand any more, and of course it’s also required for any dynamically-created data, like the procedural text messages we are sending to our NPCs…

That’s it for this time, we’ll be back in a month’s time, hopefully with some more news about how our level editing & modding tools and intro/tutorial scene are coming along!