Introducing "Interstellar Smuggler VR" - Devlog #1

Submitted by David Snopek on Fri, 04/03/2020 - 10:35

I've been super interested in the idea of virtual reality (VR) for a long, long time, although, until recently, I hadn't actually even tried it much. However, the price and quality (in both hardware and games) seemed to have reached a critical intersection, so a couple months ago, I picked up an Oculus Quest. Since then I've been playing almost exclusively VR and just loving it!

(Yes, I've been playing Half-Life: Alyx too - it's an amazing game.)

So, of course, I started experimenting with making my own little VR games in the Godot game engine right way. :-) I wish I had been posting articles about them at the time, but it's hard enough to find a little time to work on my game projects, let alone write about them.

Anyway, after my first experiments, I started working on a bigger project...

Interstellar Smuggler VR

You play as a scrappy interstellar smuggler, who starts out with a small ship in disrepair (and not much else), trying to make their fortune by transporting "exclusive cargo" across the galaxy.

The game focuses on repairing, maintaining and upgrading the dynamic and inter-related systems that make your ship run. Each system is composed of machines, conduits and parts, that can be disassembled and re-arranged to keep your junker flying!

Imagine putting out a fire, and tearing apart your food processor to replace a coil necessary to keep the power grid running. Or sabotaging the life support system to eliminate space pirates that have boarded your ship. Anything and everything could go wrong!

The Simulation

I love simulation games like SimCity, Civilization and Rimworld, and I've always wanted to make one myself. Of course, doing a simulation game is a big undertaking for a single hobbyist, but I finally wanted to try it. :-)

To start with, I picked a single system to simulate: the power system.

The lore is that the energy for the power system comes from the ship's "flux drive" which is converted into usable power by a transformer, which makes the start of the power system. That power is then routed through conduits to a Cargo Conditioning Unit (CCU) that is used to maintain the conditions that the cargo needs in order to prevent "spoilage." The idea is that we accept cargo in some standardized shipping container from our clients, and due to its not-entirely-legal nature, we don't know what it is - only what conditions we need to maintain for it (temperature, pressure, moisture, atmosphere, etc).

Anyway, in the future I'd like to have a more complex system relating the CCU to cargo spoilage, but for now, it's all going to be about maintaining steady power levels. Cargo is always spoiling a little bit, but if the power drops below a minimum or goes above a maximum, the rate of spoilage increases. You need to deliver the cargo to the destination without exceeding a certain level of spoilage in order to get paid.

Sketching

While trying to figure out how to make the simplest spaceship and power system that could possibly be a game, I made a series of sketches in my notebook (a PUBG notebook I got at M+DEV in February):

Top-down drawing of ship interior
The 3rd (and final) sketch of the ship interior
Sketch of the cryopod, cargo container and CCU
Sketch of the cryopod, cargo container and CCU
Sketch of how the power system components connect
Sketch of how the power system components connect

I did most of these notes and sketches while simultaneously watching my kids. I made the biggest headway while watching them play at the children's museum and other play spaces. That's how Game Dev Parents roll. :-)

Whiteboxing

Then I "whiteboxed" the ship with all the individual machines together in Blender and imported it into a Godot project for VR, so that I could walk around in it, and see if the scale was right. 

After walking around in it, I made a dozen or so small tweaks until the space felt good.

Testing the Simulation in 2D

In the actual game, you won't have full insight into the simulation. If you did, that wouldn't be nearly as fun! But in order to test it and make sure it's working how it's supposed to, we need some debugging tools.

The first that I created was a 2D app to test the simulation completely outside of VR:

You place machines and components, tweak their properties, wire them up together and watch the simulation run tick by tick, with full insight into all the variables.

Question to other games devs: Have you built similar tools when working on simulation games?

This is my first one, so I don't know if this is best practice, or just a weirdo thing I did. :-)

At a code level, the 2D app is an interface to the lower-level simulation objects. In VR, the VR interaction you do will serve as the interface to those same simulation objects. So, in the 2D app you draw a line between a coil and one of the transformer's coil sockets, whereas in VR, you'd pick up a coil mesh and place it in the transformer's coil drop zone. But underneath you're just connecting those two same simulation objects in the exact same way.

The Debug Gun

Currently, I don't have all the possible simulation objects represented in VR, but for the ones that are there, I want to be able to get some insight into them from within VR too!

So, I made: The Debug Gun.

In the future, I'd like to allow the gun to edit properties of the simulation objects just like I can in the 2D simulator, to make it easier to engineer the situations we need to test.

I also thought about having a Debug Tablet, that actually shows a version of the 2D simulator on it, so you could even have that level of control over the simulation while in VR.

Of course, neither the Debug Gun or Tablet would be available to players in the real game. They'd have their own diagnostic tools to check the condition and power level of different things, but with much less precision and detail, and probably requiring more work to use. Like, the player would have to open up the transformer and spend a couple seconds scanning its coils and getting a color code to indicate if they are about to break, rather than just pointing a ray at them and getting instantaneous numerical results.

Opening Machines and Swapping Parts

The next big thing that I'm planning to work on, is opening up the machines and being able to remove and install parts. I've modeled the inside of the transformer in Blender:

Draft of the inside of the transformer
Draft of the inside of the transformer - still basically whiteboxed.

However, I don't yet have the ability to actually grab those parts and remove/install them in VR.

What's next?

All of the work I described above was done about a month ago. I know for some people, being forced to stay home due to coronavirus has given them more free time, but, unfortunately, with two small kids, having them in the house all day (rather than school) has evaporated almost all of my free time. :-/

I'm really hoping to be able to make some progress on this soon, and maybe writing about it in this devlog will motivate me! Or, if not, at least I have something cool to show in the long silence before I can get back to it. :-)

Thanks for reading!

Game / Project