Beesources 2: BEE DISTRIBUTION


When people talk about the most difficult computer algorithms to solve they usually don't talk about how hard it is to properly distribute bees.

- Week 2 -

As part of my plan for this game Jam I am putting a real effort to keep feature low enough that I am actually able to have time to polish the game. This means that I am done adding new features to the game and next week will be entirely polish focused. As for what I accomplished this week...

- Bee Distribution -

At the end of last week I had a way to place buildings into the hive and connect them all together. This week I made it actually matter. The crux of the problem is this: How do I determine how much honey is made each turn? This seemed easy at first and quickly became a struggle for not going 50 levels deep into recursion to make it work.

Factories are the buildings that actually produce honey, they have to have a clear connection to the queen bee through either adjacency or  tunnels to actually count towards the total. When I first started to solve the production problem I (Stupidly) thought the best solution was to take every tunnel and group every building into clusters of production. Theoretically this would let me know exactly which factories and houses are connected letting me to collectivize the resources of all the hives. From there I would be able to check which clusters would actually connect to the queen and use that to calculate the production for each turn. This was a solution that made me feel super smart (all I have to do is make a new class containing all of the factories tunnels and houses!) but soon turned out to be completely illogical. Turns out when trying to determine what buildings are connected it quickly ends up having the entire map as one group.

Luckily I eventually decided to use my brain and came up with the much simpler solution of deciding which factories are directly connected to the queen (and thus will actually be able to produce honey). Then I will decide which of the factories are connected to enough bees to function. Its the second part that is the real kicker. I find all the  bee sources (Writing this in code gave me the name for the game) connected to a given factory, which isn't too bad, but then I have to figure out which factory gets priority when bees are in short supply. This means going through all of the factories and checking if they have enough bees to function and making sure other factories aren't pulling bees from the same source. It is important to figure out a specific source for every factories bees as it will make the animation I do next week so much easier.

- UI and Flavor -

I worked a good bit with the UI this week as I added a summary screen for the end of every day. This gives you important information like how much honey you made and the current sell price of honey. You can decide whether or not you want to keep the honey or convert it to cash. The next page in the summary lists out all of the secret tasks that will raise your tax burden when completed. You are not really supposed to know what tasks will cause your burden to increase but this screen lets you know what things to avoid, you could write all the tasks down but it is really not worth it. The last page in the summary is my way of sharing lore with the player. It will occasionally be added to the bottom of the pile where it will include some fun message from everyone's favorite governmental department. This flavor text can be used to give hints to the player and general game information.

The other major piece of UI I created was the bee almanac. I had planned to have some sort of dictionary in the game from the beginning to track what buildings you had unlocked, but only this week did I decide that I wanted it to be the way you actually unlocked the buildings. Originally I had it so you had to discover the buildings by placing the correct buildings around the correct zone type, but this seemed overly complicated and the buildings were too useful to progression to introduce a feature I had no good way of telling the player about.

- Plans for Polish -

The main things I want to do to accomplish with my polish is to add animations to most things. At the end of every turn I want to show which bees are working at which factories and than honey produced moving towards the queen. I want to try and add particles when placing/buying/destroying things. I want more quality of life features with making the controls smoother and showing what type of zone/action is active on the mouse. I still need to add both a title and a game over screen. The game is super unbalanced right now so adjusting prices and production is on my list. I will also probably want to save at least one day for general bug fixing and planning out my showcase.

The game should hopefully look really good by the time I showcase it. I always love adding polish to games because a good looking game really encourages me to put more effort into the programming and gameplay.

This should be a fun week.

Leave a comment

Log in with itch.io to leave a comment.