Inspiration
Biological Education
Learning about ecosystems and biology is essential for understanding the interconnectedness of all living things and the delicate balance that exists in nature. In a world struggling with the effects of climate change, we hope to spark interest in the interactions within a natural environment. Watching our Giblets feed and reproduce, you’ll see just how precious life is! What better way to explore how life perseveres? Sharing this awareness can help motivate us to make informed decisions about how we can work to preserve our earth for future generations. The world seems to become more digital by the day, but note that technology is no foe to the physical realm. TerraLabs is just one example that shows how technology can not only coexist with but also support our understanding of the world we live in. Exploration is the best form of education.
TerraLabs makes learning fun! This game can be applied in all kinds of academic and professional settings to explore common features of an ecosystem, regardless of previous background.
What it does
An interactive 2D ecosystem simulation that evolves! Mimicking many real-world features such as natural selection and gene inheritance, TerraLabs offers a user experience like no other. Designing your very own map, you can add all kinds of elements. Food source? Obstacles? You name it. And the big question: Will your Giblets survive the test? Not only will you explore your design capabilities and an understanding of biological ecosystems, your organisms will explore too! Your custom environment poses all kinds of challenges that your Giblets must navigate. Fascinating, isn’t it? Let’s get exploring.
Features
- Map Creation: customizable map building from scratch (user’s design!)
- Diverse Terrains: water, land, air
- Create Your Own Giblet! Select genes and giblet’s appearance (wings, horns, tail)
- Asexual Reproduction
- Mutation System & Gene Inheritance Algorithm
- Family Tree: ancestor tracking/recognition (colour-coordinated species)
- Adaptability to different terrains
- Natural Selection
- Nutrient Recycling: conservation of energy
- Food Chain: predators and prey (aggressiveness gene)
- On-click gene description
- Broad vision & adjustable camera (user-controlled)
- Time Manipulation (fast-forward, pause, etc.)
How we built it
The star of our game is the genetic algorithm that allows traits to be inherited between generations of Giblets. Since the genes are randomly generated, we get unique species every time (indicated by colour). Any similarities in colour mean similarity in trait/gene! However, just like in the “real world”, these traits don’t get passed on perfectly. Instead, we have gene mutation. Each gene has a float value that indicates the trait represented by that gene. The mutation is achieved by generating a random float (within a small interval) and adding it to the gene, changing its value slightly between single generations but creating a large impact over multiple generations.
An interesting consequence of this algorithm is evidence of natural selection. Any Giblets that, due to their traits, are unable to attain energy (whether through food or hunting) will not reproduce and eventually perish. This demonstrates the idea of “survival of the fittest” and leads to complex combinations of genes as the program continues to run.
Basic Project Timeline:
- Organized the project elements, separating each person’s tasks into phases. We worked on different project elements simultaneously, using GitHub to share code.
- We built the whole project in Unity from the bottom up. From brainstorming desirable features to creating basic classes and structs, we eventually got to determining the game rules. Crafting this final product was very much a careful step-by-step process.
- Once we finished the bulk of the project, we worked on the documentation and polishing. This includes capturing media for the project and preparing for the presentation.
Challenges we ran into
New Language and Engine
Learning to use Unity and C# mere weeks before UofTHacks was challenging but incredibly rewarding, especially throughout the implementation process. In this limited time frame, we chose to challenge ourselves with a new language to enable use of the Unity engine and all its built-in capabilities. Engaging with tutorials and assisting one another through stumbling blocks, we gained familiarity with C# and began to exercise these skills through the development of small 2D games. Today, we've built a working ecosystem simulation! It's amazing to see how far we've come and the projects we're now pursuing.
Big Dreams
Our initial plan had so many features that were not included in our product due to time constraints. As described at the bottom of this page, there are so many extensions we hope to implement in the future of TerraLabs (and we can’t wait to do so!). From digestion bias to unique limbs (wings, legs, fins, etc.), letting go of such great ideas was difficult but necessary for the project’s success. Yet, even with these adjustments, TerraLabs is still our largest and most ambitious project to date! Our eagerness sent our dreams (and workload) soaring sky high, so scaling it down was an important part of the development process. Just know that this is only the beginning for TerraLabs and a future brimming with potential.
Accomplishments that we're proud of
Gene mutation! How crazy is it that we kept finding new ways to implement this natural phenomenon? Customizing the pseudocode was a whole process but actually getting the algorithm to perform the way we intended for genes to be inherited was a feat in and of itself. Mimicking this element of evolution across generations of organisms with a computer program was both fascinating and enriching.
It’s all about the little things. We’ll never forget when we finally came up with a catchy organism name (Giblets, how cute!) and the feeling when we knew that our project idea was “the one.” It takes creativity and persistence to continue brainstorming even when you already have some okay ideas.
Producing a working prototype for such a large-scale project. We’re not ashamed to admit that there were moments of doubt regarding our ability to complete this endeavor, especially considering the hackathon’s occurrence during the lunar new year. However, what we never doubted was our commitment to this team. Balancing familial commitments during this holiday season as well as our excitement for creating TerraLabs, we successfully produced a fun ecosystem simulation game and we couldn’t be prouder.
Learning to implement a user interface that not only allows users to navigate the game with ease but is also visually stimulating. Menus sliding in and out, drag-and-drop tiles, buttons! UI being a new area of development for most of the team, it was incredibly gratifying to see and play with the results of our hard work.
What we learned
Features in Unity
Structs vs Classes, though similar, have very different use cases. Since the former is a value type, it is mutable. Classes on the other hand are reference types, being generally immutable. These can be helpful when we want to preserve data and ensure it remains unchanged.
Properties are method-like and can help us access variables in a class. Gets and sets make each property flexible and we can easily control which ones are read-only or accessible to edit (whether publicly or only from within the class).
T is for Trust
Deciding how to divide the labour of a project can be tough, especially when team members come from different experience and skill levels. We learned that there’s no better way to work together than to rely on each other’s strengths. Rather than making this a solo project with “assistants”, we trusted everyone to pull their weight, leading to more meaningful contributions. We also separated the process into phases so that we progress as a unit, only moving forward once everyone has completed that phase’s tasks. No one gets left behind.
What's next for TerraLabs
We have big plans for this project. We aim to implement more diverse terrains and genes to offer increased variation and authenticity within the user’s ecosystem. Players will have more elements to engage with. Some of these additional features include:
- Toxic map regions (increased mutation)
- Digestion bias
- Sexual reproduction
- Distinguishable sexes


Log in or sign up for Devpost to join the conversation.