Ramblings on building deletion
The Problem
Copypasting from the previous blogpost, here is the problem I have been thinking about today:
Because you get points based on building placement, a key gameplay restriction is that you can't delete buildings once you have placed them.
This has one main problem: its too easy to fuck up.
Unlike in Islanders, in my game roads and building access are important. Civilians need to be able to reach your buildings by road, otherwise you won't get a benefit from them. It is fairly easy to accidentally place a building that blocks a crucial road access point, or makes half of the map inaccessible, and then fucks up your entire game. On the one hand you could chalk this up to "user error", but this doesn't feel like a "fun" way to lose.Some alternatives I thought about that wouldn't work:
- If you can delete buildings freely, then you could place a building, get some points, delete the building, and then re-place a building in the same spot to get even more points - space restrictions become meaningless
- If you can delete buildings at the cost of losing some points, its still not great because you don't have to worry about the future too much when placing buildings - "Oh, I can just delete this later if I need to". You can also manipulate the zombie AI by placing a small cheap building to block off a key chokepoint, and then deleting it later once you have safely amassed a bunch of defences right behind it.
NB: Another problem is that you might be able to block the zombies entirely with a giant wall made out of buildings. I already encountered this problem with the 2D version of the game, so I'm gonna use the same solution - check when placing buildings if it will block the path from zombie spawn to the train station, and prevent placement if so.
Conversation:
These blog posts were originally posted on Slack, and here are excerpts from the conversation I had there about this.
Make building removal cost "points":
Y: What if you lose significantly more points on removal than you gain on placing? That way you're still encouraged to not fuck up, but a single mistake isn't game ending anymore
ME: Yeah, its a good idea, but I would still be a bit worried about the potential for zombie cheese - lets say you lose 10 points when you delete a building, for example - now you can think about a building as being a 10-cost indestructible zombie barricade, which is insanely good value.It feels to me like for the penalty to be big enough to make barricade strats unviable, the penalty would have to be just as game-ending as the original fuckup. Or maybe I should just accept barricade strats as a legitimate way to play the game...
Y: What about a cooldown on when the building can be removed? Turns zombie barricade into something you have to use sparingly? but yeah tricky
Rubble building:
ME: Hey heres a stupid idea: A building called "Rubble" which you can place over existing buildings to delete them, and replace them with Rubble.
Rubble can't be deleted, and it cant be built over, but it also gives road access to civilians (and zombies). It basically acts as an indestructible road.Rubble will also be super anti-synergistic to almost all buildings, and will tank property values.
I can give the player a limited amount of Rubble at the start of the game (eg 3), which they can choose when to use if they need to.In effect, it would be equivalent to a limited number of "Undo"s with an associated point penalty, but skinned to fit better into existing game mechanics.
theres even the opportunity for some rare rubble synergies. Maybe (eg) a builders merchant would actually benefit from being nearby or something
Destructible terrain:
TH: perhaps you can allow zombies able to destroy the buildings? I’ve seen a similar problem solved in RTS type games where you can build walls around your owned land but they are still penetrable by opposing forces. It takes a significant time for the opposing force to do so but it stops a player creating unbreakable barriers.
ME: the main thing stopping me from implementing that is purely pragmatic - I dont know if I am smart enough to program a fast zombie AI that will intelligently decide whether to attack a building or walk around it
if you make zombies always attack buildings, then you lose a whole gameplay layer of constructing a maze with your buildings/streets to funnel zombies down, but IDK how to make them judge when they should and shouldnt do so
There's an AA game called Orcs Must Die that also failed to solve this problem (in that game, orcs will never attack buildings unless there is no path to the target, in which case they will suddenly switch to attacking all buildings, which ends up being a bit janky and easily exploitable. and if that studio couldnt solve it, then I don't have much hope that I can either lol
TH: Yeah that’s fair enough.
I imagine you’d need to give a weighting to buildings that is taken into account in your Dijkstra algorithm.
That weighting then will be taken into account on the shortest path and if the shortest path is through a building then you can set zombies to attack a building with the smallest weighting.
That can be decided by the last building that was built as having the smallest weighting?
ME: that would work well actually! All tiles already have a traversal cost weighting used in my algorithm (eg: grass = 1.0 and roads = 0.2, so zombies would rather travel on 5 road tiles than 1 grass tile). I can give the buildings a weighting of like 9999 so that zombies would only pathfind through a building if they have no other option, and then set them to attack if they are pathfinding through
then we can turn the building into the aforementioned Rubble object, which can't be built on ever again, offering a powerful deterrent to barricade strats
Conclusion:
After having thought about this for a while, I have decided to do two things:
1. Implement a one-time "UNDO" button that allows you to undo 1 building placement at a time.
2. Possibly implement a "Rubble" building that can overwrite (remove) existing buildings.
ZIMBY
City-building, zombie-killing game about maximising your real-estate value
Status | In development |
Author | cawlgames |
Genre | Simulation, Strategy |
Tags | 3D, City Builder, Indie, Tower Defense, Zombies |
Languages | English |
More posts
- Biohazard-inspired developer toolingFeb 27, 2023
- Trains!Feb 27, 2023
- Zombie & Civilian AIFeb 27, 2023
- Zombies & building placement addedFeb 27, 2023
- Mini update: Super Mario Galaxy waterFeb 27, 2023
- 2.5D Projection & Djikstra PathfindingFeb 27, 2023
- IntroductionFeb 27, 2023
Leave a comment
Log in with itch.io to leave a comment.