First month


First month of development

Inspiration

I am a big fan of Minecraft and one mod in particular grabbed my attention and after some playing I fell in love with it. The mod is called Forestry. Its premise is using bees and trees to generate helpful resources and effects. There is actually more, much more to it than bees but it's the favourite part of the mod for me.

 

Mechanics

The core mechanics of beekeeping are as follows:

  • There are A LOT of different types of bees
  • Different types of bees produce different combs and other resources
  • You can mate bees
  • The offspring can have a mutation, resulting in a different type from the parents

This is what got me hooked. Looks similar to Alchemy and Doodle God games - combine two different two elements to make a new one - but with a crucial twist: these creatures were actually useful in a game loop of minecraft. Furthermore, every bee has a genome. 


This genome defines all properties of the bees: from species to fertility, from ability to work at night to type of flowers needed for polination. The existance of genomes enables the player to improve the population of bees they have and ultimately produce more resources or improve special effects.

My game

But there is one radically important factor that I dislike. The bees' lifespan. You have to wait several minutes before the queen bee produces offspring and you can find out ther genome and make decisions. So I figured I could remove the wait and other features I found annoying and add new ones. This idea lingered in my mind for a long time and by the time I sat down to implement the game I have fallen in love with two more genres - idle games (like cookie clicker) and automation games (like factorio). So, with a goal in mind (and not yet on paper) I began working. The general idea was to reimplement forestry's beekeeping system and add idle or automation features later.

The prototype

I will describe the first month (April 2021 - May 2021) of development. 

The first thing to write was a Bee class which has a genome and a way to combine bees to produce offspring. So, this genome consists of several genes, each of which provide a certain quality or behavoir seen in a bee. The genes are species, fertility, lifespan and speed. Each gene has several options to be chosen from. The speed can be fast or slow, the lifespan can be short or low.  These options are called alleles. Each gene in the genome has two alleles. The parents' genes are combined using Mendel's laws of Inheritance.

With offspring creation done I had to hide the genotype from the player and show only phenotype. So I added an `inspected` property to a bee and text representation which shows bee's species when the bee is not inspected and whole genome when it is.

Then I made an inventory class to store the bees and its text representation too. It shows the bees inside and has methods to mate bees and to place bees into itself. There are actually three types of bees: Drones, Princesses and Queens. A Drone and a Princess can be mated to produce a Queen bee which produces resources. At this point I had implemented only one resource but I was already looking forward to making different bees produce different resources. 

The next point was to give Queens a lifespan and make them older every second. After ticking up to that age they die and produce offspring. However, mating and ticking lifespan in inventory wasn't the way forestry minecraft mod handled mating bees. So another building, Apiary was on the list. It basically has two slots for a Princess and a Drone to mate and create a Queen and its own inventory to place the offspring. The offspring has a chance to have a mutation when certain alleles were chosen for that offspring. That is the way to progress in the game. 

After all the interactions between an apiary and an inventory were handled, I created a command line interface (CLI) for the game, right inside the jupyter notebook file which I used at the time. Using ipywidgits module was a fun experience, all the buttons and text boxes are quite usable and easy to tinker with. I wrapped all these interactions as text box commands and the basic features could be used at runtime by the user and not only from the code.

After that I added more resources added them to the game text state, along with the inventory and an apiary and added new commands for CLI to build new inventories and apiaries to spend the resources. Inspecting bees also requires resources to be done.

This is how the game looked at the time.

By this time I had a solid foundation to work with - many backend features were created and tested and I needed to create a pretty user interface for it.

Get Forestry

Leave a comment

Log in with itch.io to leave a comment.