Game
Starship Simulator

3 years ago

This week's dev diary is later than usual due to optimising and perfecting the electrical systems.


Something I've always stated emphatically from day one is that if a feature or system ever causes performance or stability issues, then I will work on nothing but that problem until it's resolved. To that end, this latest Dev Diary has been delayed a week because the ship's real-time electrical system was starting to cause performance issues on older generation CPUs.

After taking a good look at what was happening, it was clear that the system I'd originally built just wasn't sophisticated enough, so I went back to the drawing board and re-wrote the entire thing from scratch. Rather than relying on what was largely just a brute-force approach, the new system is far more self-aware and focuses on using as few system resources as possible. In fact, during normal operation the new electrical system has practically zero CPU load, so with all things considered the past couple of weeks of hard graft were well worth it!

capture6.png

One of the many lessons I've learned during the past 5 or so years in game development, is to not be all precious about any code I've written. Rarely is anything perfect on the first attempt, and sometimes you just have to recognise that it sucks and needs doing better. I'm actually a big fan of the SpaceX "failing upwards" approach, where you just keep blowing things up until it's perfect!

These past couple of weeks haven't all been about rebuilding systems though, I've also been making some practical additions too. Firstly, the Reactor now has a Main Distribution Bus that will serve as the primary connection point for every electrical system on the ship. This will also host the loopback connection for the Reactor, feeding electrical energy back into the Reactor to maintain the fusion reaction.

capture5.png

Secondly, I've also added some status lighting to two of the distributor box types, which will flash either red or yellow to alert the crew that an interface has an error or warning condition. This helps see at a glance that something isn't working as intended, and I'll add the same functionality to the other boxes as I get around to updating them.

capture4.png
capture3.png

So what's the plan for next week? Well, I still have a few loose bits of electrical code to tidy up, but I'd actually like to get some more modelling done. Hopefully, I'll be able to start fleshing out more of the reactor hardware, as well as the fuel and coolant tanks. I really want to get this part of the ship finished off now so I can get back to the Bridge



0 comments

Loading...

Next up

We are almost at the end of the #100daysofgamedev

In the past 93 days, we have created an entire galaxy system, added multiplayer, designed a new bridge, and almost a complete A-Deck.

Here's a snippet of that.

I'm working on the lounge framework, and the deck B areas. I've also set up a livestream for backers to watch me develop the game in real-time, and actually, I've found it's keeping me engaged and on task a lot more. (https://t.co/hIyV5NeiYJ)

Weekly Dev Diary - Issue 11

18/09/21

If you would like to know more, please join our Discord: https://discord.gg/eDSQvpgdUX

Or Wishlist on Steam: https://store.steampowered.com/app/1332100/Starship_Simulator

Step aboard a fully-simulated, realistic starship with 200+ rooms over 7 decks. Explore a 1:1 scale galaxy driven by real astrophysics, in real-time, either solo or with friends.

Wishlist: https://t.co/T1HAbryTlu

Discord: https://t.co/wHPPCmIBoE

Weekly Dev Diary - Issue 12

25/09/21

I've updated the warp effect and the warp bubble, which will smoothly distort space while the Alcubierre drive is running. This was an important effect to get right because it needs to be descriptive of how the drive operates.

Casually flying past a random star in our new completely physicalised galaxy. All stars and planets exist in real-time, and you can warp between them at any speed!

I'm happy to say you can now customise quite a few individual things. Here's a few examples...