Version -0.90 is live! It’s not spectacular, but I’ve done some good work behind the scenes.
New stuff
-
Three tiers of housing: Hovel, Appartments and Penthouse.
- The peeps will look for the best tier they can afford with their income for at least 30 days and they perfer houses close to their place of work, if they have one.
- Rent was meant to be collected weekly, but I chickened out at the last minute so it’s paid every day for now. If a peep fails to pay it, they get evicted.
- Rent is based on the budget of peeps who were looking for a home the day before (more on the log system later). So if there is one peep who would be willing to pay 30 and five peeps who could pay only 10, the price is set to 10, since 60 > 30.
-
Restaurants are a better quality alternative to Food Dispensers
- They are more expensive to build and maintain, require to be staffed (which means they are only open for 8 hours a day) and have a limited capacity, but peeps will prefer them IF they can afford it.
- Unlike production facilities where wage determined the amout of work done, here the employees are simply paid half of minimum wage. I was going to let them eat there for free as a perk, but forgot to implement it, so the waiting staff is seriously underpaid right now and there are no tips. Tough for them.
- Working hours are determined by demand, unlike working hours of production facilities, which as as of now randomly to a random early hour.
- The restaurant can’t change its opening hours once they are set, because the why, how and when of that is a bit too nebulous for me at this point.
- The location where a restaurant is built also depends on where the most demand is (together with when). The same goes for Dispensers and Sleeping Pods.
-
Peeps now have the first vestiges of memory - when looking for a place to eat or sleep, they’ll remember places they already checked and decided that the queue is too long so they no longer ping-pong between two dispensers waiting for the queue to go away. They forget this whenever they go to sleep. (I’ll come up with a better memory disposal system later, but for now this works well enough).
-
Added a new graph screen (switch from map view in the top right corner). I’ll be adding more graphs as I think of interesting data to display there.
-
Workplaces which have working hours now have separate graphics for when they are closed. Except for the Power Plant (I was tired) it looks pretty good!
-
Workplaces can now go bankrupt, or rather, if a place has negative profit over the past 7 days and there was no profit yesterday, the building will get shut down. For now I let the buildings exists on the map so I could give the owners the option to reopen them if they think they will be able to make money again, but for now that’s not implemented, as the economic situation is unlikely to improve over time.
-
Added a log system with three uses:
- Reports on the state of the world (such as a new building being built)
- Reports used to guide some decisions (such as peeps wishing for a new service)
- Error messages
- This replaces all the various “print” lines I used to track all kinds of stuff. Now I can easily switch specific reports on or off depending on what I want to see.
- Early on the hungry and broke peeps kept reporting their lack of sustenance every damn minute of game time which obviously filled GBs of memory with junk, but now it’s working reasonably well. Of course, in the future I’ll come up with a system that would delete old useless logs.
- There is a tiny display showing the latest five logs below the map. For now it only shows buildings being built or shut down. In the future it should be expandable and allow filtering and stuff like that, but this is all you’re getting for now.
- The question mark next to it is supposed to take you to a help screen in the future, but since I hate designing UI, for now it only covers the screen with a nasty gray rectangle and… huh. Seems like that’s it. You can’t even get rid of it in any way. Yeah, you don’t want to click the question mark.
Background fixes and stuff
-
Buildings are split into four classes:
- “Dispensers” are automated places where a peep pays and gets food or a place to sleep
- “Housing” can be rented and the room then belongs to the renter until they can no longer pay or they move to a better place
- “Production” have employees and produce something based on their wages
- Employees of “Services” are paid a flat wage no matter the production. As long as they are staffed, they work the same as dispensers.
- I rewrote the functions finding out demand, setting prices and determining if a building is worth the investment. Previously I tried to fit every building type into a single function, but it just ended up extremely convoluted and hard to read. Splitting them like this made the whole thing a lot more smooth and readable, and allows me to make adjustments much easier.
- Demand is no longer estimated by guessing wildly (huh, there are 150 peeps? Better prepare 150 meals, economy be damned!) but by evaluating the demand from the previous day, in the case of housing including the purchase power of the peeps. It mostly works just fine, and when it doesn’t, it’s usually a problem with the economy rather than my programming.
- Whichever building of a certain type has the most production gets to determine the price. That means that a dispenser that’s used by a hundred peeps sets the price accordingly and another one that only gets ten customers per day has to survive with that (or get shut down).
- This is an interesting effect - a less popular place that is otherwise identical to a very popular one should, in theory, have higher prices to offset the lesser demand, as long as the higher price doesn’t drive all the customers away. I will be solving these cases way later, since for now there is a single universal price for each good and service.
-
I finally put all functions into local modules. Didn’t seem to have any impact, but it’s nice to know my code is a tiny bit more in line with what’s considered reasonable.
-
Magical free money for the homeless! That is to say, to make sure the economy doesn’t crash immediately after the jobless peeps run out of their starting money (which is presently set to 20 - 500 for most peeps, 1000 - 50000 for 20 lucky ones to make sure something actually gets built), once a peep gets hungry and can’t afford a dispenser meal, they gain 3x that much money out of nowhere so they can continue being good customers.
-
Made the loading bar a bit smoother
-
Scrolling the list of peeps is now a bit faster and thus more convenient. Still didn’t find the time to add buttons to skip by pages because I hate making UI.
Since the html5 version is starting to become unreasonably slow, here’s a bundled windows version:
Vigilante.zip (2.5 MB)
I’ve also noticed that in the html5 version no Hovels get built (their price remains inf) which is kinda strange and probably bears investigating. The way the numbers are set, the question whether Hovels will be profitable is on the knife’s edge, though, so it’s probably just because a different set of numbers are generated from the default seed. Changing the seed sometimes results in profitable Hovels (and sometimes locks the game up sometime during the first week… oops!
What’s next
There’s a couple of things I’m kinda looking forward to implementing:
- Entertainment! The peeps do have a (hidden) boredom stat which only ever goes up. Time to give them something to do. Unlike fatigue and hunger which cause peeps to try to satisfy them once they reach a set threshold, I think boredom will have an upper limit and the value will determine just how much of their budget they want to blow on entertainment - meaning that rich peeps will be able to party until they drop while to poor ones will only seek entertainment once in a blue moon, or possibly never.
- Liking and disliking stuff, namely other peeps and different rooms.
- Begging and petty crime! There are still tons of unemployed homeless peeps. Let them annoy the rest of the peeps by begging and steal from dispensers if they get really desperate. I think that there won’t be any possible repercussions at this point, but it will lay some groundwork for security guards, law enforcement and repair services later.
- More detailed information in the jobs display and implement sorting, by type at the very least. It’s getting quite crowded.
- Speaking of crowded, the map gets filled up pretty fast and if you set the number of peeps much higher than the default 150 (or making the map smaller) will cause problems as there’s no more room to build. I’m going to come up with a completely new design for the map. This one was really only meant to help me this far. It’s high time to come up with something more compact and space-station-like.
- You can notice that aside from housing (which is set to inf), there are some default prices. And yes - setting them to anything else does cause problems. I should probably fix that.