Well. Maybe the last post about Zoo Economy in 2020.
Sandbox was created as alternative to Campaign mode with ability to customize game rules, select starting zoo etc. And as final act of my redesign i have completed it. It was most complex UI element in main menu and it additionally require integration with several game systems. So now it looks like this:
If follows base design of rest of the main menu and It now features new customizable elements, space for future elements and as part of it player can now select how many zoos he\she wants. In future I would like to allow player to even select other zoos, which won’t be possible with old design.
Number of zoos was increasing, as new ones were introduced and it was starting looking like around 40 zoos is maximum optimum number of zoos on map. With more zoos it can probably became a tech problem, but now it mostly esthetic and gameplay problem. By default 30 zoos will be set, but if player wants it can be changed.
This how it looked in previous version. Giraffe was nice, but he was taking some valuable space, so i had to sacrifice it.
Customization was lacking space and wasn’t future prove.
Zoo selection stayed mostly the same, but now it includes selected continent and has more space for zoo name.
Other versions were pretty much the same, just with less customization options.
As now player can select number of zoos I needed some sort of a system to generate subset of zoos (if it less then total number of zoos). Additionally i wanted to make zoos as distance from each other as possible to create more diverse look on map. And it created some challenge. Each zoo has it’s own position on map and my first idea was to select player zoo as base point and calculate distances from player’s zoo to every other zoo using simple euclidean distance. Then sort distances, select max distance and add this zoo to the subset. Then repeat this process until we found our desired subset. To account for freshly added zoo, distances now calculates for players zoo and all other zoos already added in subset. Each zoo which is not in a subset keeps total distance to zoos in subset, then sorting, selecting zoo with max distance, addition to subset etc. Something like this:
- Add Player’s zoo to the empty subset
- Calculate distances from zoos in subset to all zoos NOT in subset
- Sort distances and found most distant zoo from zoos in subset
- Add most distant zoo to the subset
- Repeat 2-4 until desired number of zoos are in subset.
Using just player’s zoo as first base point we will create the same subset each time for same player zoo. I solve it by adding as second base point random zoo. It is some sort of seed. With enough number of zoos it can generate many unique subsets. So point 1 became:
- Add Player’s zoo to the empty subset and add 1 random zoo
Selecting most distant zoo created another problem. If we have player’s zoo at position 0, zoo A at position 1000, zoo B at position 500 and zoo C at position -20, current algorithm will select zoo C, not zoo B which is more distant from player’s zoo and zoo A( which are in our subset). It is happening becasue total distant for zoo B will be 1000 (500 from player’s zoo and 500 from zoo A), but for zoo C it will be 1040 (20 from player’s zoo and 1020 from zoo A). More distant zoos in subset will add ‘weight’ to nearest zoos from other zoos in subset. I didn’t quite fix this problem and i see it as temporary solution. Now i select zoos with average distant from each other. Mostly it generates good results, but sometimes can create bad ones:
- Sort distances and found average in distance zoo from zoos in subset
Some examples (subset of 10 zoos):
Honolulu zoo (No zoos from Oceania, but subset is mostly nice)
Budapest Zoo (No North America zoos, most squeezed)
Budapest Zoo 2 (Now whole America without zoos)
Perth Zoo (A lot of Oceania zoos, which is not very nice)
I would like to hear your thoughts and maybe ideas to improve current algorithm.
Plans for 2021
I’m finally planning to release the game next year, somewhere in spring, but delays can of course happen. Around 50% of content is ready and about 60% of all mechanics. As some things are more or less polished i can easily add new content and implement rest of the mechanics. Anyway i have two more things which I really want to share with you in the 2020. But you have to wait a little bit
It was the last devlog of 2020, next one will be in January. So see you there. Happy holidays everyone.