Diary #19 - Homelessness
After the 0.4.03 release, there were two main game mechanics yet to be added: homelessness and resource storage. Resource storage is currently in progress, but homelessness is now fully in place, so I figure I'll talk about what it is in the context of Iron Village, and a bit about how it was implemented.
Homelessness is when a Pop doesn't have an assigned home. Specifically, when a Pop is tired from working, they enter a GOING_TO_REST
state. If they already have a residence, they'll go there, but otherwise they'll request one from the ResidenceManager
. If no homes are available, they'll go rest at the train station instead, where there is an infinite amount of space to rest. This was already implemented already, but it had no actual impact to gameplay. What's new now though is Satisfaction.
Satisfaction is an internal value that Emotional Pops (i.e. Pops with an Emotional
component, a.k.a. all of them now) have. Right now, housing is the only thing that affects this value. (There's nothing else planned to affect this value before release, but it's designed to be extendable in future updates/sequels/titles that reuse the system.) Going to sleep in their own home makes satisfaction go up. Sleeping in the train station does the opposite. Getting assigned a home makes satisfaction go up. Being evicted does the opposite. (Eviction only occurs as a result of demolishing a Pop's home - this isn't Landlord Simulator.)
If a pop tries to sleep in a home, but is unsuccessful in finding one, you'll notice a little icon above their heads indicating their homeless status. Pops aren't worried about their lack of a home until it's actually time to sleep, so you have a little bit of time to address the issue. Once the icon appears though, their satisfaction has started to take a hit. This can still be remedied by building enough housing though.
Eventually though, the Pop will get too frustrated with their lack of housing and decide to leave. They'll have one last sleep in the station, head to the platform, and wait for the next train out. Those passenger trains that bring you pops? They can take them away too, there just hasn't been anyone wanting to leave until now.
The way the satisfaction system is written, a Pop could theoretically get enough satisfaction to stop waiting around and return to work. However, the only source of satisfaction is being assigned a home, and sleeping in their own home; a pop will only request a home when they are ready to sleep though, and without anything else to make them tired (only work does that), they'll just stubbornly wait for that train.
So, that's how homelessness works in Iron Village. The funny thing with implementing this was that most of the programming was pretty simple. The Pop's internal state machine was designed to be extendable like this, and for once, I successfully future-proofed my implementation well. I was so impressed by my own abilities, until it came time to update the train UI once they boarded the train. Turns out, the code that I thought was doing that was orphaned code - old code that had since been bypassed, but I never cleaned it up completely. Whoooooops. So of course, that's where most of the implementation time was spent, as well as where most of the ego-crushing happened.
Anyway, the original timeline was that I would finish up resource storage and a lot of smaller tweaks, fixes, and UI by the end of the month, and then put out the "Alpha 1" Demo. While this did account for a vacation last week, it didn't account for a bit of a crazy week this week, so that'll likely be some point in early July. There's a lot more content to add, as well as graphical features (including shadows!), but the new game mechanics stop here. Which is a pretty exciting milestone to get to!
Get Iron Village Alpha Demo
Iron Village Alpha Demo
With your railway, build houses, farms, and more to create your village. Trade your goods and grow it into a powerhouse.
Status | In development |
Author | Chappington |
Genre | Simulation |
Tags | City Builder, Pixel Art, Trains |
Languages | English |
More posts
- Diary #30 - 0.6.33 Release Notes7 days ago
- Diary #29 - Demo Mk. III12 days ago
- Diary #28 - Train Cars26 days ago
- Diary #27 – 0.6.16 Release Notes35 days ago
- Diary #26 - Steam Demo Release! (0.6.11 Release Notes)43 days ago
- Diary #25 – Steam Demo & Flour Power60 days ago
- Diary #24 – Steam!80 days ago
- Diary #23 – 0.6.00 Release NotesAug 05, 2024
- Diary #22 - Clothes, Hair, and Mailing ListsAug 02, 2024
- Diary #21 - 0.5.09 Release NotesJul 19, 2024
Leave a comment
Log in with itch.io to leave a comment.