Load/Save Compiling, Main Menu

Hey Folks! Finally got a chance to dive into some code today. And as you can see from the image above, I did a bit of main menu prototyping.

First, however, I had to fix-up the remaining compiler errors. And that meant figuring out where I left off before vacation. Fortunately, I kept pretty good notes, so it wasn't too bad to reorient myself. My main goal before break was to get save/load working, and it was almost there. I was basically trawling through the compiler error log to tie-up loose ends in the code.

Of that, the hardest part was figuring out how to restore rooms on a ship, since I've always recalculated those on the fly in the past. But now that rooms could have specific data in them for things like gases present and temperature, I needed that data to be saved/loaded, and that meant the room algorithm needed to parse save data.

After a few more other fixes (functions needing extra params I've added) ,I think I've got that at least compiling now. And that leads to the next task: how do I test this new save/load feature? I could just tack-on a new button to the ship editor, but it's rapidly becoming a weird hodge-podge of features that should probably be expanded into several smaller things. So I figured it was high time to finally tackle a main menu.

As hinted at yesterday, I sort of have an idea for how this is going to look already. Basically, I want it to kind of be like Metro's main menu. (Also, I suppose a bit like STALKER.) I'm picturing a close-up of some ship console with controls for starting/continuing a game, and in the background, we have an out of focus ship interior with hints of activity just out of sight.

Today's image is a step closer, as I took yesterday's placeholder model and plopped it into a new scene in Unity, added some lights and a camera, and applied depth of field for the foreground focus vs. background blur.

Also, I yanked the ATC UI from the simulation mode to quickly mock-up an in-scene rendered UI, and spent a bit of time working out some raycasting code to let the user click the screen directly with the mouse to select menu options. I'm thinking this might be handy in future work, since I'd like to use render textures/cameras a bit more for certain ship features (think landing/docking cam, security cams, etc.).

Anyway, it's extremely crude, but it should hopefully give you an idea of where it's heading. I suspect I'll be contracting an artist to do the final version, as even if I can manage it on my own, it'd take too much precious time to do right. It did feel good to be playing with meshes and lighting again, though. Been a fair number of years since I've done that :)

And, as a bonus, I was finally able to get the game running again! I hooked-up "NEW GAME" clicks to start the crew sim mode with the default ship, and it works! Well, loads without error. We'll see tomorrow if the crew goes berserk or items fail to load or what.


matsy's picture

Would you recommend Metro? Currently forcing my way through the second book. Love premise just not the bad translation.

dcfedor's picture

I played a fair amount of Metro. I liked the atmosphere and premise, the sense of scarcity was good (rationing ammo), the gameplay wasn't bad.

I think what eventually drove me away was coming back to it after a break and having to replay a bunch that I didn't want to replay. I think I lost a cloud save or something along the way.

Dan Fedor - Founder, Blue Bottle Games

matsy's picture

Hate it when that happens, had exactly the same experience with Dead Space.