Echolite - Update #8 - All Things Machines! - Part 2

Echolite - Update #8 - All Things Machines! - Part 2

Table of contents

No heading

No headings in the article.

Last devlog, we accomplished the foundational work for machines, essentially creating savable objects and allowing them to be placed in the world. While they look super cool once placed, they currently do not serve any functional purpose. That is about to change!


Features are only worth including in a game if they add value in multiple ways. Crafting gives a use to resources, but that action alone is not engaging unless some of the resources it produces provide depth to gameplay. Having machines generate resources is a step in the right direction, but it’s not as engaging as it could be. When I set out to add factory-building to this game, I wanted it to feel fresh and different. Factorio and Satisfactory lead the factory-building genre with much of their gameplay revolving around automation and optimization. It's geared towards a niche audience (myself included), so we need to think of ways of expanding factory building to players who aren’t necessarily committed to the “numbers” side of these games.


Part of this challenge will naturally be solved by the roguelite element of going into the darkness and back. This will bring more importance to machines, since they allow the player to “make a mark” in the world and collect resources without having to risk their life every time. As a bit of a tease too, we will eventually add objects like conveyor belts so the player can have resources come towards them without venturing out.

The other part of this challenge can be solved by something “custom” - upgrades! We can allow the player to sink additional resources into their placed machines in order to change how they operate. This is a solid approach for a variety of reasons:

  1. It gives general gameplay more value. Instead of placing a machine and calling it a day, the player is now given several choices that allow them to form their own gameplay styles. The players mentioned above who still wish to automate and optimize can do so by maxing out machines and messing around with different configurations. Conversely, players can just place a machine, maybe pick one or two upgrades, and still progress perfectly fine without ever touching it again.
  2. It gives resources more value. The player can choose to put resources into basic crafting or into existing machines. Essentially, they get to lean into whichever option they feel will help them progress faster.
  3. It gives crafting more value. When a player creates machinery, they are investing a few resources for an item that offers tons of customization. It is like creating several objects and merging them all into one.
  4. It gives placement more value. If a player wants to have multiple copies of machines with different configurations, they can choose to arrange/group them in the world based on their primary function.

So, you may ask…what kind of upgrades are there? Here ya go!

  • Loot Tables - Each tier in this category offers a new set of potential resources that can be generated by the machine. For example, you can try to go for a more “focused” tier that reliably offers a few different average resources or a “wider” tier that could potentially offer the worst or best resources.
  • Fast production - Each tier in this category decreases the amount of time it takes the machine to generate a resource.
  • Increased production - Each tier in this category can raise the number of resources generated at once by the machine.
  • Auto-Upgrade - Each tier in this category will present a list of resources that, if generated by the machine, will automatically become an improved version. For example, if the machine is about to generate “Emerald Shards,” it may turn those into “Refined Emeralds.”

Already you can begin to see how these upgrades intersect. The player may choose a loot table tier that offers tons of different resources, then stack an auto-upgrade tier to turn the worst potential resources into better ones. Some players may choose to focus entirely on one upgrade category while others will rely on a mix of them.

Perhaps the best part of this “upgrade” mechanic is that it continually makes early game objects relevant. The player may need rare resources in the late-game in order to reach the highest possible upgrade options on basic machines. Or, the player can earn rare resources through better upgrades that allow them to create end-game objects. Even as the player ventures further out into the world, the earlier work they accomplished never feels wasted. They won’t need to discard/swap machines for newer ones and can instead focus on improving their existing machines to better fit new goals.

Data Prep

Similar to other aspects of the game, these upgrades offer established options. Due to this exact data, we can store it in additional JSONs and then reference them as needed. With how large these upgrade categories could become with multiple tiers for each machine, separating them out into separate JSONs is likely the safest option. As an example, here is how the loot table JSON appears:


I think it is valuable to note why I chose to use JSONs in my game. Initially, I was hard-coding my data into scripts because I wanted everything to be “in-editor.” You can imagine the frustration later on as the project grew with numerous moving pieces. It became more difficult to find the spots where changes needed to be made, making the entire process of testing an absolute nightmare. By switching to JSONs, all of the upfront information used in the game is finally organized in one place and easy to manage. This is likely not a novel concept for most developers out there, but it is worth rehashing for the beginners like me out there!

Tying It All Together!

Now that the data is organized, we can dig into the visual aspects of working with machines. First, we need some assets that denote available resources with machines. Cue the “it’s not much, but it’s honest work” meme:


The timer that sits above a machine will simply use text, so luckily no custom artwork is needed there.

Moving to the upgrade categories, we need icons that help represent what that upgrade does. This means a list icon for loot tables, arrows for increased production, and so on. Here is how the icons turned out:


The specific color palette used is rather interesting. You may recognize its prior use in “filling” the resource collection bar that appears above the player when they dig for resources. After using these four colors, it made me consider the use of consistent coloring for icons and other “minor” aspects of GUI panels. We already have a set color palette for the world/environment and larger GUI elements, so another consistent palette for items like icons and indicators is incredibly valuable. Expect to see more of it show up in future features!

Finally, we can design the actual upgrade interface. The nice aspect of this interface is that it merges a lot of the tools we have already created in the past. We are essentially crafting, but this time the output is an unlocked tier instead of an item. Based on which upgrade category is selected, the related tiers will show up on the second page. This allows the player to supply the necessary resources in order to “unlock” and set a certain tier. Here is the final result:


While some components like the description field, unused upgrade slots, etc... will need some additional work to wrap up this upgrade feature, the current progress should suffice for now. I would love to hear what you all think!

What’s Next?

Adding basic machines into the game these last 2 devlogs has been an exciting endeavor, and while there are certainly more ways to expand it further, it is time to forge ahead with more core features! Litebot is rather lonely in the world and luckily there are some survivors living in the base camp that he can interact with. They may also have some special quests to offer…

Thank you as always for the support!