Let there be NIGHT! (and also people)
As per usual this update is available in video form too:
(or on PeerTube, if you prefer)
After sorting out a general vibe for the game in my last devlog, along with some basic models for the first few buildings, just one thing remained that was completely out of my comfort zone.
CITIZENS!
And so I decided to tackle this next, knowing that if I could do that I could probably do anything 😎
Unfortunately I’d never really done any kind of navigation system before, and in fact didn’t even know the right terms to research or questions to ask! So I described my rough vision on Mastodon, and the community there kindly informed me that what I was looking for was A-star pathfinding and it was built into Godot.
Marvellous.
Cue about two weeks of me reading, planning, blindly attempting implementations and just hitting play and seeing what happened.
There were scale issues.
There were weird piers.
There were a LOT of wrong path connections.
And just for good measure there were scaling issues in the opposite direction too.
BUT eventually and after some more moral support on Mastodon, I made it. Citizens, who are simple capsules for now, spawn from house hexes. They all travel first to an arbitrary corner of the hub tile, spend a second or two mulling over their life decisions, then head off to a new random destination.
Obviously very simple behaviour for now but I was SO HAPPY to get this working you have no idea. I must have spent at least a couple of hours just watching them mill around aimlessly and feeling proud of myself!
To celebrate I got stuck into building a day / night cycle, which I remain unconvinced about because it does work but it also makes the shadows wobble weirdly and also the way I’ve implemented it just doesn’t feel right. So more work needed there, but it does work well enough to trigger time-of-day signals which I can use for citizen routines and so on.
It also left citizens stumbling around in the dark, so naturally I took a brief detour to add some headlamps for health and safety purposes. Which had the added advantage of uncovering how bad my movement code was: the citizens hadn’t actually been turning to face the direction of travel and I’d just not noticed because they’re all capsules!
All’s well that ends well.
Last up and as a reward for all that hard work, I picked something from the task list that sounded like easy, low-hanging fruit. Usually my tasks are written with a fair amount of detail, but this one simply said “Birds”.
Omg. If only I’d known.
Long story short the birds wouldn’t flap. The animation worked fine in Blender, everything seemed to be right in Godot, but nothing. Honestly I was so mad at this simple thing not working, I raged on the internet for a whole night then went to bed in a huff.
The next day, I updated Godot to the latest version. And yeah you guessed it, the bird started flapping! Just an engine bug, nothing to see here. Siiiigh.
Unfortunately due to my crappy coding (again) there were…a few too many birds.
And fixing this was surprisingly complicated with my camera setup but, in summary, it’s all good now and I can finally move on with my life.
Unfortunately this was the point in the project where I came down with Covid, so progress naturally slowed for a while. But we’ll talk more about that next time as I take you through the absolute shambles that was my attempt at a save / load system! Yay!
In the meantime you can wishlist Solaria on Steam, or maybe come say hi on Mastodon where the updates are a bit more frequent but equally depressing.
Solaria
A minimalist, solarpunk city builder where the city builds itself!
Status | In development |
Author | TeaHands |
Genre | Simulation |
Tags | 3D, City Builder, Family Friendly, Hex Based, Minimalist, solarpunk |
More posts
- Aesthetics, hexes and a Steam page!Jan 29, 2024
- Introducing Solaria (and TeaHands, too)Dec 19, 2023
Leave a comment
Log in with itch.io to leave a comment.