mobile background

Ratopia DevDiary #3 - Buildings and Path finding

Cassel
2 Jun 2022
Views 290


Hello everyone!

It’s Cassel, developer of <Ratopia>.


Last month, we had chance to exhibit our game for the first time on public,

through S.Korean game shows called “PlayX4” and “Indie Craft”.

Thank you so much for the people who enjoyed our game, even the game is far from completion.

We will try our best to satisfy your expectations!


For this time on DevDiary, I’ll talk about structure(building) design and path finding system.




Designing Structures/Buildings

The concept setting of buildings begun before the characters and tile designs were fully fixed.

At the beginning, I was unsure which buildings will be requited in the game.

So we began with the simplest ones like the walls and ladders,

tested 2.5D design to give perspective, put source of light to make it more natural.


Concept images using the house design of <Ratropolis>


However, when put together, the design of the characters, buildings and tiles were mismatched.

Thus we tested to unite their styles into cartoonish ones.

This time, they looked fit with each other.


We designed structures like houses and farms,

since the ladders and walls were not sufficient enough to check the panorama of the city.

In the game of <Ratopia>, I wanted the buildings to change their outlooks related to the wealth of their owners, 

so considering the variant of each structures was really mattered.


House level system of the game, <Pharaoh>


In <Ratropolis>, the expanding building function was added on later,

so we had to redesign some buildings from the basement.

For this time, I did not want same thing to happen.


But setting a specific rule to prevent such problems was not easy at all.

Unlike many other simulation games, <Ratopia> is a 2D side view game,

so the heights of the buildings were very limited.

And the animations of Ratizens using structures were planned too, 

thus even with the upgrade, the movable parts of the building had to be kept.


With such restrictions, we’ve decided as the social level of the owner rises, 

the buildings get to be more organized and decorated with items such as flowers.


Early concepts of tents, cabins, and houses, with added decorations


After designing around 10 buildings, unexpected issues were followed.

The first was the existence of the walls and the roofs of the buildings.

Unlike <Ratropolis>, <Ratopia> was the game to build walls and doors, and then putting the buildings within those city boundaries.

We’ve realized that we had to design not the ‘buildings’, but instead, the ‘structures’.

Thus, the houses were replaced to beds, and the walls on any building got removed.


The problem followed after this design change was that, since now there’s no walls and roofs on the buildings, 

the decorations we could add got really limited.

This time, we’ve changed our plan of adding decorations to distinguish buildings with their main color themes,

such as dark brown, brown, and painted wood tone for each classes.



Concept images of beds, farmlands, public baths


As expected, a while later another problem came out.

Structures designed for the early level of the game were easy to follow the rule,

since they were all made out of woods.

But after the middle of the game, main resources of the structures change to stones,

meaning that wood-tone colors would be really not matching with such buildings.

There was an idea to change the structure property from wood to stone, stone to marble, as the class changes,

however this could not be followed since there were buildings that are not supposed to be made of woods (ex: furnace).

In addition, we could estimate that various new structures will be followed up, unaware what new structure will violate any new rules.

So we could not make clear solution.


It would be better if we could set more specific rules for various conditions,

Because we were keep having trials and errors.

But this time we had to put aside decision making,

but instead to focus more on developing other matters.




Ratizen's Behaviors

On the other side of the team, the programming part was focusing on how will the Ratizens move around the city.

Since we are using tile map system, we’ve made Ratizen to move based on A* algorithm.

But ratizens of <Ratopia> have size of 1*2, not 1*1.

Thus we also had to make Navigation map that Ratizens could move around with such sizes,

Considering where Ratizens could pass with jumping or using ladders.


Prototype of path finding system


The navigation map updates itself whenever a change made, such as tile break or ladder build.

But if all citizens get their own navigation map, calculation overload could possibly happen.

To solve this, we’ve made the system to pick a citizen and made everyone share the same map.


While making the system, I began to worry whether larger enemies with sizes of 2*3 or 6/4 could be possibly put in.

Difference in sizes means the needs of different navigation maps,

and this will definitely require larger scale calculations.

We are still seeking for the solution, whether to make all the enemies have the same size with Ratizens, 

or to make them do not need complex path finding algorithm.


After making them to move from A to B correctly, the basic order of digging a tile was programmed.

When the player sets a tile to dig, Ratizen move to nearest locatable spot of the tile and dig the tile to get paid.


Dawn of Miner


After the function of digging inserted, other delicate things had to be set.

Specifically, where to where should be dig-able, 

how will the order should be distributed to each Ratizens, 

and what would they supposed to do when they got stuck on a spot for various reasons.


When dug, the tile drops items on the spot.

By using those items within the storage, the player can build new structures in the city.

Thus the clean-up function got added right away to move dropped items to storage.


Ratizens are designed to clean up items right after digging


The first design was made as some ratizens only dig and some only transport items.

However, in <Ratopia>, Ratizens get paid related how hard their works are,

and digging designed normally to get paid more compared to transporting.

This could make imbalance of wage within a single job,

so we changed them to dig and transport, time about.


After making digging and transporting function,

gathering and constructing could be made much faster.

Watching Ratizens move around as ordered made the game felt much like the simulation we wanted to make.




Mind map and Milestone

As the development goes on, aspects supposed to be added and scale of those to be placed had to be specified.

Not only those in the game but also outside matters such as the title screen, opening scene, 

and advertising videos all had to be considered.


This time, I used <Whimsical> to organize those things.

Previously, I’ve used Powerpoint or Excel to organize those, 

but using <Whimsical> was really handy since relocating nods and applying changes by simply click and drag.




Put colors to make it clear who will do what


While organizing, I again felt there are so many to be done,

and also got afraid that we might have to give up many things.

So as making the mind map, I’ve arranged the list of priority.


Then, I checked the schedule of annual game shows and supporting project that we might apply, combined it with priority list, set milestones in our schedule.

I am pretty sure that this will not be going on as planned,

But with this we might be able to act flexible when unexpected happens.



That’s all for this time.

Thank you for reading this long article.

For the next diary, I am going to write about animating Ratizens;

Ratizen's animation making process and their behavior priority tree.


Please subscribe our homepage to get news about the game, events, and gameshows we are joining!


Hope you have the best day.

9 1