Character Class Selection
I added a dropdown of character classes that selects all characters of a specific type. It wasn’t difficult – the hardest part was really styling and positioning the dropdown. I still feel like quite a newb when it comes to working with the Godot UI components, but these tutorials have been really helpful.
Rectangle-Select vs Single-Click
I worked on selecting and multi-selecting characters. It was a little bit of a hassle because differentiating between a single-click and a click-and-drag involved using a Timer to detect whether the button has been released within a certain amount of time, which seems like a hack, but it works.
Point-and-Click Movement
You can move characters manually now, and movement uses Godot’s A-Star path-finding API.
ChatGPT for Game Research
I was brainstorming occupations that existed in the 1800s and started out by doing Google searches for things like “doctor profession in the 1800s”. I wanted to find out interesting details about the life of the doctor, for example: what were their instruments, how much were they paid, where did they practice, etc. I have a very long list of occupations. Using Google to sift through 100s of different historical websites is really pretty tedious and boring. One website might provide an answer for 2 items, but then you inevitably spend a bunch of time reading and putting together bits and pieces from others. This is the perfect use-case for ChatGPT, in my opinion. I simply asked, “Give me a list of 10 fun-facts about doctors in the 1800s”, and it produces a nice bulleted list. I can then rinse and repeat for other professions. Here’s just a small section of the research I compiled in this way:
Zooming and Panning
Other things I got working are zooming and panning the camera. I can’t say I’m excited to work on these kind of “mechanical” problems, but they are part of the progress.
Behavior Trees Using LimboAI
I’ve been really trying to architect the code in an extensible way. The more complicated the simulation becomes, the greater the risk of creating a bunch of spaghetti code. So I’ve been trying to use best-practices. One thing I started to implement was behavior trees, for which I chose LimboAI. It allows you to create a sequence of events, such as “idle for 3 seconds, then wander 5 spaces in a random direction, idle for 2-6 seconds, and repeat”. Right now the characters only idle and wander, which is just for test purposes. But I think this will be a powerful tool going forward in crafting complex behaviors and automating NPC behavior. Here’s an example with the behavior tree debug overlaid:
Character Info Panel
I added a basic character info panel as well. When you click on an NPC, it shows the sprite in the idle state, along with the class and character name. In the future I would put other details about the character, such as mood, inventory, job, etc. Not terribly exciting yet, but a step forward as I learn more Godot UI fundamentals.
NPC avoiding water:
A Custom Font
It’s still a work in progress, but I created a custom font for the game using FontSelf for the iPad. It allows you to draw your font using the Apple Pencil and exports an .OTF file. It’s a lot of fun and cool seeing the font in-game, although there are a few issues with the font I created (some font artifacts shown in the above GIFs).