carrotcake Blog 🍃


official devlog for carrotcake written by Louis Durrant

Thursday Report: Show Me The Options

Posted on Mar 14, 2019

Just a quick report today.

With expanding the map by some size last week, I quickly ran into an issue of performance. While I could fill out an acre with many thousands of nodes, having the game render that another 36 times across the map on the fly was asking too much.

Fortunately Godot has a ‘VisibilityEnabler’ node that allows the game to know whether the character is walking into range of a prop (say, a bush or a tree), and when they are walking out of range. This means I can set each item to remove itself from the game, then spawn itself back in when the character moves close enough (hopefully, all off screen). This took a little time to figure out since it was all new to me, but things seem to work pretty smoothly. The trick is having things load in such a way as to prevent stuttering.

It’s dawning on me that not only for the sake of performance, but also for the sake of saving and loading the game between play sessions, I’ll likely need to package all props and items in their own container nodes that carries nothing more than the item’s location, and whether or not the item has spawned or not. It will simplify things in the long run, but I do wish it was something I had considered earlier on into development.

I built a main menu for Godot some months ago now, but never showed it on the blog. The main reason was that I hadn’t settled on a name at the time. In fact, when making the menu was the first I had written down ‘The Garden Path’ as a placeholder name, and I suppose seeing it everytime I booted in made me more and more fond of it.

I’m even more eager to show it now also because I spent some time this week fleshing out the options menu. I figured it was important to begin mapping out what the players would be able to change early on, so I can anticipate how the game might be played and perceived differently on different machines.

I do think there’s a balance when it comes it options. While giving more power to the user is rarely a bad thing, sometimes you can overwhelm the user and create the opposite effect – where users will be hesitant to touch the settings at all. I know personally that while I love to get stuck in with a good number of options, having so much power can sometimes be a headache.

Being a 2D game, the possible list of options is pretty limited to begin with. I’ll be building and testing the game at 1080p, but a wider range of resolutions will be supported. Currently shadows and foliage are the biggest culprits of performance, and although I’ll be tuning things to run on my own modest machine at 60fps, I will need to experiment to see how less powerful computers tackle the game.

Sound will be divided into three buses, ‘Music’, ‘Voice’ and ‘Effects’, although I’m still deciding whether or not I want voices in the game. It certainly won’t be full voice acting, but sometimes a line or two can help set the scene.

Godot 3.1 came out yesterday, which is a pretty exciting release that I had been looking forward to since the latter months of last year. While I had initially set aside the morning with plans to import The Garden Path into the new engine, as it turns out very little needed doing. The new engine is a bit more picky when reading and processing code, so some of my clumsy programming raised some flags that it didn’t used to in 3.0. It’s encouarged me to do a bit of spring cleaning under the hood, which is always a good thing. It only took editing a few lines to get things up and running again as they were before without error.

I had saved myself from using the new engine until its full release in case any bugs rendered The Garden Path dead in its tracks, so it’s exciting to dive into all the new features for the first time. For the most part though, it seems like a refinement of what 3.0 brought to the table. 3.1 is, as the developers put it, a much more mature bit of kit, so it feels much more smooth, and more modern.

I’m unsure yet if any of the new features will be a boon to developing The Garden Path.

It’s a simple game, so simple features are all it really needs.

TwitterMastodon