Nav Station Implementation

Hey Folks! I was able to spend some more quality time with the space prototype today, trying to bring together the orbital plotter, voxel nav console, and crew sim.

First order of business was to get a voxel model done for the console, and I decided to just get a basic captain's chair for now. It's missing the screen and some other decorations, but it's enough to get the point across. And for me to see how voxel models look in engine.

Once that was done, and exported as an OBJ file, it was off to the code editor. In the distant past, I added a LoadOBJ() function (using StarsceneSoftware's ObjReader) to the prototype for some reason, so that was handy. The trick was figuring out how to get the game object that creates and inject it into the in-game item instead of the default cube and quads everything else uses. That took almost an hour of refamiliarizing, but I eventually got there.

I also had to add some scaling and rotation changes to the defaults for the import, to make it fit with the other items on the grid. But in the end, we get the blue chair seen in the image above (bottom left corner)!

Some initial thoughts on that: On the plus side, it nicely solves the shadow-casting issues my other objects had, and is actually really easy to draw/make. On the negative, it just looks so-so. I think part of the issue is lack of normal mapping. It just has per-face normals, so everything looks a bit dull and un-lit.

Graphics are a rabbit hole, though, so I just said "good enough for now," and moved on to hooking it up to game logic. And that meant a few things.

First, I had to migrate the orbital plotter UI I've been working on out of the ship editor (where it was for testing), and into the crew sim. This wasn't a lot of work, but took some figuring out to get all the pieces moved/rewired safely.

Then, I had to create some basic data to define how AI interacts with it. Things like "IsNavStation" conditions, condition triggers to use that condition info, an interaction for raising the UI, and some additional item and UI parameters (e.g. where to stand when interacting w/this object, which UI to load, etc.).

That's about where I am now. All of that is in place, but there are bugs when it runs. At first, the AI would interact with the nav station and nothing would happen. It turns out there are a few more functions I forgot to add to the plotter to make it show on-demand in the game. And that's where I need to resume tomorrow.

Assuming that works, hopefully we'll be able to direct the AI to the nav station, have the plotter UI appear, and pretend to go places! Then, we have to figure out how to make it really go places :)

Tags: Ostranauts

Comments

Marc13Bautista's picture
Marc13Bautista

Keep up the amazing work! BTW have you tried out Tom Francis' Heat Signature yet? I've tried out the beta yesterday and it was bloody brilliant for an open world, random generated, and Hotline Miami-ish fiasco. Though, I believe your game will include so much more!!!

Free Elusive Skill = Athletic x4 in ATN Enclave encounter

Malacodor's picture
Malacodor

Is it possible to use arbitrary OBJ files, or only those created with MagicaVoxel?

Ran around with a clown mask before it was cool

dcfedor's picture
dcfedor

@Marc, I haven't yet. But I've had my eye on it. I really enjoyed the writing and style in Gunpoint, so I'll probably check it out. I caught a talk of his where he described wanting to make Heat Signature one way, and discovered mid-development that it was actually more fun to play differently.

It's true that HS has a smaller scope than the space prototype, but that might just be due to him being smarter than me :)

@Malacodor, in theory, any well-formed OBJ will work. MagicaVoxel is just something I was interested in trying, since the art styles it can produce appeal to me. That, and it's super easy to use/less intimidating than most 3D modeling apps.

Dan Fedor - Founder, Blue Bottle Games