We have a tech tree system!

Hello, fellow developers and game enthusiasts! It’s been a while since our last update, but don’t worry; we’ve been hard at work, and we’re excited to share some significant advancements in our game’s development.

Catching up!

Our primary focus over the past weeks has been developing a robust tech tree system. We started by laying out the tree in a JSON format, allowing us to quickly edit and adapt the tech tree as our game grows. Each tech item in the tree is defined by properties like ID, name, description, cost, prerequisites, and unlockables. This setup allows for an easy way to dictate the game’s technological progression and dependencies.

Integrating Tech Tree with Unity

Once we had our tech tree designed, we needed to bring it into Unity. For this, we wrote a C# script to parse our JSON file and convert each item into a C# object. Then we created a prefab for tech tree items and wrote a script to instantiate a prefab for each tech item in the tree. The result is a fully operational tech tree within the Unity engine, ready to be interacted with!

Implementing Research Mechanic

After setting up our tech tree in Unity, we developed the research mechanic that allows players to progress through the tech tree. We defined three research states for each tech item: NotStarted, InProgress, and Completed. Depending on the current amount of science resource the player has accumulated, we update the research state. This implementation adds depth to the gameplay, as players have to strategize how to distribute their science resource effectively.

Resource Pool Management

The resource pool has been another crucial focus. We added methods to deduct or add resources to the pool. We also developed a mechanism to increase or decrease resource production or consumption based on the researched technologies.

Integrating Outcomes

A significant part of our work was defining and implementing automatic ‘outcomes’ for each researched tech item. Each tech outcome could either increase the production or decrease the consumption of a resource, or unlock new buildings or units.

Modifier System Death

We’ve also killed our modifier system!

When we contemplated all the cool possibilities of the techtree’s outcome system, we realized that a bulk/stack buff/debuff management system would not be the way to go on Eternity. It served us well up until this stage, but now it had to go. Fret not, its source code lives on, nice and cozy on a copy of the class file, waiting for the day that it will be used again on a different project!

Thanks for keeping up with our devlog! Stay tuned for more updates as we continue to build our game. Your support fuels our development journey. See you in the next update!

 

Happy gaming!