ecoHexFarm also known as Ecological Hexa(gonal/decimal) Farming Game, is a slow-paced farming simulator featuring autonomous 'evolvable' bugs with genetic traits, they merge and create offspring. Breed bugs, manage food and sell bugs with genetic traits similar to the market demand, and get rich.

[Known WASM Bug]: The item prices in the shop are not displayed correctly, the prices are like this

1. Healthy (Red) Food: 1 coin

2. Speedy (Green) Food: 2 coins

3. Scouting (Blue) Food: 3 coins

4. Super Food: 4 coins

5. Super Bug: 5 coins

Introduction:

The goal of the game is to make money and get rich. The bugs have their own unique gene based on hexadecimal RRGGBB color, each color represents a specific trait,

  • Red gene controls how much health the bug is born with
  • Green gene controls the speed of the bug
  • Blue gene controls the range of detection of the bug

The gene also gives the visible color of the bug itself. The bugs follow their own navigation system, they wander around the map, look for foods or mates. Eating a food depending on the food type strengthens the gene trait.

Bugs:

The body color of the bug represents their current gene. Reddish bugs will live longer without food, Greenish bugs will be faster, Blueish bugs will be able to detect foods and mates from farther away than others.

Sometimes the bugs will spawn randomly when the bug numbers in the field decreases below a certain number.  

When bugs walk, their hunger increases, when hunger reaches a certain threshold, the start loosing health and also damaging their corresponding gene, the Red gene. If the Red gene gets to zero, they die.

When bugs are healthy, and they are not hungry, they will look for mates, when they found each other:

The bugs, in this harsh world
among the thousand souls
looks into each other,
the passersby don't blink an eye,
but those two
walks, runs towards each other.
They no longer feel hunger,
they are healthy as is.
The onlooker will see the heart(s)
shining above them.
They embrace each other,
before giving birth to new hope.
From their ashes,
rises the new sun.
Maybe they are no longer,
maybe they became part of the wind,
yet they live,
they live through their future,

TLDR: Basically when they find mates, they walk towards each other and merge into a new bug, the new bug will have their parent's gene and some random mutation.

Foods:

In the game there are three general types of foods, Red(ish), Green(ish), Blue(ish) food, and a special "super food". All the foods makes the hunger go away.

  • Red(ish) foods will replenish the bugs' health. 
  • Green(ish) foods will increase the bugs' speed.
  • Blue(ish) foods will increase the bugs' scouting range.
  • The Super food will replenish the health but also increase speed and range by some degree. 

Replenishment or increase of gene trait depends on the Boost strength of the bug, the boost ranges from Weak, Medium, Super.

Randomly spawned foods will usually have Weak Boost, but there is a chance to get Medium Boost. Shop bought food items will have Super Boost for Super Foods and Medium Boost for other food items.

How to play:

Goal: 

The goal of the game (as of now) is to make money and get rich. Try playing with your friends to see who gets more money within a time limit

How to Make Money:

In the top-right corner of the game, you will see a small news bulletin window which will show you the current market's bug demand. Drag the bugs you want to sell into the bottom-right hexagonal pen, and click on the "sell" button.

Depending on the match of your bugs' trait and market demand you will get money. If you provide a fully matching bug, you'll get full price for each bug, if the match is 50% you'll get 50% of the price. 

How to Use Money:


The game has a shop from where you can buy things like foods and super bugs with all genes maxed-out.

The shop provides, 

  1. Healthy (Red) Food for 1 coin
  2. Speedy (Green) Food for 2 coins
  3. Scouting (Blue) Food for 3 coins
  4. Super Food for 4 coins
  5. Super Bug for 5 coins

Buying food items, (item 1, 2, 3, 4) will put 5 food of that type at random position in the field. Buying a Super Bug will spawn it in a random position the field.

Important Note: You cannot sell, Super Bugs bought from the shop

Controls:

Drag and drop the bugs with Mouse or Touch input.


Source Code:

GitHub: bauripalash/ecohexfarm

The source code of the game can be found at GitHub. The main branch will be the branch where latest development will happen, look at the raylibgamejam branch for the exact state the game was built and uploaded for the game jam

The game code is licensed under GNU GPL v3.

Internal Workings:

New Child Bug Gene Algorithm: 

Child.Gene.Red =  ((Parent_A.Gene.Red + Parent_B.Gene.Red) / 2) +/- Random Mutation between (-10, +10)

Child.Gene.Green =  ((Parent_A.Gene.Green + Parent_B.Gene.Green) / 2) +/- Random Mutation between (-10, +10)

Child.Gene.Blue =  ((Parent_A.Gene.Blue + Parent_B.Gene.Blue) / 2) +/- Random Mutation between (-10, +10)

Random Bug Spawn Gene Algorithm:

Base_Health = 127

Base_Speed= 127

Base_Range = Bug_Size x 3

Bug.Gene.Red = Base_Health +/- Random Mutation between (-15, +15)

Bug.Gene.Green = Base_Speed +/- Random Mutation between (-15, +15)

Bug.Gene.Blue = Base_Range +/- Random Mutation between (-15, +15)


Food Boosts:

Weak Boost = +5

Medium Boost = +15

Super Boost = +50

Chance of Spawning Random Food with Medium Boost: 30%


Acknowledgement:

Font used: Press Start 2P (Licensed under SIL Open Font License, Version 1.1) [link]

Color palette used: Velstad-4-by-mainzero Palette [link]

Reference for hexagons: Hexagonal Grids from Red Blob Games


Notes:

  • No Code or Artwork is made by AI, LLMs. AI was used only to understand how coordinate system in hexagonal tiles work. 
  • There can be bugs and errors in the game as it was made with time constraints, and I was unable to make enough play tests before the deadline for Raylib game jam. Please let me know if you find anything which works wrong or feel wrong.
  • Please let me know if there is any typo or grammatical mistakes in this page.
Updated 11 days ago
Published 16 days ago
StatusReleased
PlatformsHTML5
Release date 16 days ago
AuthorPalash Bauri
GenreSimulation
Made withraylib
Tags2D, Farming, Pixel Art, raylib
Code licenseGNU General Public License v3.0 (GPL)
Average sessionA few minutes
LanguagesEnglish
InputsMouse, Touchscreen
LinksGitHub
ContentNo generative AI was used

Leave a comment

Log in with itch.io to leave a comment.