Saturday, 24 December 2016

Sprint Update - 24.12.16 - Ubuntu Xmas

Our gift to you this year is stable builds across all platforms! The big news is we have been making sure our Linux builds are up to scratch as Rich is off to 33C3 and some of the hardware he might be borrowing to demo on will undoubtedly be running various flavours of Linux for us to put the build through its paces on.

Linuxmas is here

Last Saturday we tweeted out a few screens from the latest Linux build running and we were lucky enough to get this write-up from Gaming On Linux.

We’ll be putting the build through testing on as many distros as we can ahead of release, for a game with the sorts of themes encountered in ‘Off Grid’, and as all three devs are Linux users, making sure we cater to those of you who like to play on Linux is extremely important to us.

Content with ourselves

We have been busy building and enabling new content, with lots of work on evolving the LevelKit geometry we are using to build our levels and to supply players with to build their own.And that has included some head-scratchers at points! For instance we looked at the architectural standards of stairs and then spent a good bit of time going through how to make something hat looked and felt right fit into our 1m / 20cm grid setup for building levels with.

After some trial and error we got to something we liked and that was divisible to a good amount to be able to make modular for all those of you who want to make a stairway to heaven or building with obscure ceiling heights!

However when it came to ensuring the colliders fit snugly, Rich decided to attempt to be a little too clever and use the cosine values of the stair ratio to calculate what angle all stair colliders would need to be set at. After reinvigorating his dormant school level trigonometry lessons and yet again finding that maths problems presented in school are usually wholly impractical, with a little butchering and stringing of SOHCAHTOA the final equation needed was pulled together. And yet perhaps due to the length of some of the floats that needed to go in, and the lack of a MEM button on an old scientific calculator, we faced a result of “No dice baby”. Then, realising that the internet probably had our back, a quick google of “Triangle Calculator” had the answer in seconds. Even worse it turned out that the geometry was significantly complex that a standard box collider wouldn’t cater to the need to connect different pieces for stair like a puzzle and so we ended up having to build custom colliders anyway. Good to blow the cobwebs off of that part of the brain I guess though!

Something suspicious

The latest addition for our AI is the new Investigate action, made to fill the gap between relaxed routine behaviour and actual alert mode. So basically it’s to allow the guards to react to anything suspicious or odd, that’s still not an obvious intruder. For example hearing odd sound, or distant alarm signal, or spotting something that’s bit out-of-place.

We already had actions for reacting to seeing the player, and for actively searching the area in case they loose sight of the player but still know you are somewhere nearby. However running around the place like that would be quite an overreaction after just hearing a radio turned on somewhere… Also we needed them to be able to go straight back to their normal routines if they don’t see anything after checking out odd sounds.

The main reason for doing this now was that it was needed to complete our work on CCTV cameras, the existing actions were built for the idea that the guard actually sees the player and that triggers the alert mode (and also specifically makes them to search for the player). We felt it would make more sense for the guards to make their way to the CCTV camera first, and only then decide if they need to go for full alert mode or if they can just ignore the event.

Obviously the same AI action will now allow us to do all kinds of other distractions for the guards… We’ll probably add fairly complete Lua scripting support for this one in our modding API as well, it’s definitely one of the easiest AI behaviours to use directly like that.

Mission progression

Having a bunch of missions is fine, but for a game it would be nice if you could actually have a progression from mission to next one, unlocking new missions as you complete the previous ones, right? Funny enough even with all the other complicated systems and modding support etc. we’ve built this far, this is one of the more basic game features we’ve been missing. Well, no worries, we are now working on it. Or actually we just built it into the game!

So, we started by building completely new user interface for our mission selection screen. And then we continued by changing how our level definition files fork, at the same time converting them from JSON files into Lua scripts (we needed custom serialization/de-serialization and since we already had one for our Lua API, it made more sense to use that than write a second one for JSON). This is definitely just the first part, there’s still plenty more we’ve planned for, but it’s already enough so we can start building and testing mission sequences.

Anyway, the main idea is that instead of just listing a strict mission progression somewhere, each level definition file can list some preconditions, rules that must be filled for that mission to be displayed in mission selection screen. And then the same file also lists some effects, which can then cause another missions to become available. This gives us a fair bit more flexible system, that also means that it’s possible for modders to add their own levels in middle of our main story, or do branching storylines and whatever we (or the modders) might come up with. Depending on what parts of our Lua API we end enabling for the level definition part, pretty complicated rules should be possible.

…that being said we still need to actually deal with the “effects” part, for now it’s just the UI and “preconditions” that are working. However there’s some more interesting features we want to do so we might start by building those in first…

Bugs fixed

As always, we run into various bugs and small issues as we work on our main tasks. These are likely to be more interesting for everyone when the game is out and these things are actually affecting players, not just us, but maybe take these as a peek into game developer life ;)

  • Modal dialogues should highlight confirm button by default if there is no cancel button. We usually highlight cancel by default unless otherwise specified, but now we are making sure tha if there’s only OK button, its highlighted properly, so the dialogue can be navigated with a gamepad.

  • Positioning for targeting reticule & related UI elements wasn’t scaling correctly for different aspect ratios, causing it to be off-target on some screen resolutions. This was mainly an issue for situations where we take a 3D object from the game world and then need to calculate where it would be in our UI coordinates (in screen space). We assumed Unity’s UI methods would have given us correctly scaled position automatically, but it looks like we actually need to grab the UI scale factor the UI decided to use for current resolution and then use that to calculate the correct screenspace positions ourselves.

  • Guards could not open locked doors. This was just a result from us changing the door locks to support data connections & NFC data transfers earlier this year. We were missing a few requirements for the AI to recognise these doors again. In short, if you want AI to open a door locked with network-connected lock, it might not be a bad idea to make sure that 1) The AI knows it’s a door, and 2) they have some way to send the required data…

Getting LevelKit-ed out

This sprint Harry’s mainly been focusing on our LevelKit. As you might already know from past sprint updates the LevelKit is a Unity project you’ll download to make missions for Off Grid. This sprint it’s received lots of clean-up, organising and Love.

The LevelKit will come with a huge list of architecture pieces such as ceilings, floors, walls, doorways, stairs and windows, as well as pre-made room parts and whole pre-made rooms. We also have a wide variety of props for users to place in their levels. Everything from cardboard boxes (!) to server racks.

We’ve also been working on some Unity editor scripts that we’ll ship with the LevelKit for things like creating new levels, exporting existing levels in the format Off Grid is expecting them and validating levels for known issues.

Here’s what it currently looks like:

Here’s a quick test level we’ve whipped up in less than an hour in our LevelKit

End of an Epic Year

I suppose this is the point where we are supposed to look back on the year and summarise what has happened, but if you have been reading this blog regularly you will know it has been a bit of a whirlwind, there has been a lot going on and it is hard to pick out the biggest events. Let’s just say we are thankful for all your support, to be luck enought to be funded indies, to have confirmed platorm releases such as Early Access, and to have expanded our team with a great new Dev, Harry who we have welcomed into the family and settled in like he has always been here. There have of course been some huge technical milestones too, but you probably read about them here in detail already, so now it’s off for a couple of days of well earned rest for us!

If you are going to 33c3, hope to catch up with you there. McFly has kindly offered to help us find some space to demo the game in the Milliways area so swing by and we can get the latest build into your hands.

Have a great Christmas all, best wishes to you your family and your friends.

Pontus, Harry, & Rich.

No comments: