1. Captain of Industry
  2. News

Captain of Industry News

CD #41: Hydrogen vehicles in Update 2

Ahoy everyone, Captain Filip here! Our entire team is working tirelessly on Update 2, and I wanted to share more details on what's coming your way. We've touched on several features in our previous posts, but there's more we're finalizing just now, and I'm thrilled to present them to you. So let’s dive right in.

[h2]Hydrogen vehicles[/h2]
We've been eager to introduce hydrogen vehicles for quite some time. End-game factories, equipped with robotic assemblers and advanced nuclear reactors are literally asking for an alternative fuel source for your vehicle fleet. And the time has come!

We've developed hydrogen variants for all higher-tier vehicles. This lineup includes the Large Truck, Haul Truck, Large Excavator, Mega Excavator, Tree Harvester II, and Tree Planter. We've actually given these vehicles a bit of a makeover and are introducing them as entirely new models.

New hydrogen trucks next to the new hydrogen fuel station.

In addition to the introduction of hydrogen vehicles, we're implementing a pollution penalty for diesel-powered vehicles. This is something we've aimed to do for a while but were previously unable to, due to the lack of alternative solutions to mitigate pollution.

You might be asking why would you want to switch to hydrogen besides pollution free logistics? The first reason might be that you want to reduce your dependency on crude oil and diesel becomes just an unnecessary production step for you. You might want to power your vehicles by producing hydrogen using your solar farm or using an already existing recipe that efficiently uses steam from your fast breeder reactor.

Another compelling reason to adopt hydrogen vehicles is the potential for reduced maintenance costs. Since hydrogen vehicles utilize electric motors, they are less costly to maintain compared to their diesel-guzzling friends.

Diesel haul truck on the left, new hydrogen haul truck on the right.

[h2]Cargo ships - hydrogen & heavy oil[/h2]
On our journey towards hydrogen-first logistics, we can't overlook another significant diesel consumer: cargo ships. To facilitate this transition, we've implemented the option to upgrade your cargo ships to hydrogen-powered models. Alongside this upgrade, we're introducing a pollution penalty for diesel-powered cargo ships.

In the process of integrating fuel type switching for cargo ships, we saw an opportunity to further support player progression, especially in the early game phases. To this end, we've introduced the option to use heavy oil as fuel for your cargo ships. Once you unlock heavy oil, you can utilize it to simply burning it off in a flare or boiler. Implementing heavy oil as a viable fuel option not only adds a layer of realism but also diversifies your fuel choices. We still intend to keep diesel as the default fuel as it offers flexibility without the added pressure of immediate resource management adjustments.

In update 2 you will be able to choose from heavy oil, hydrogen and diesel fuel for your cargo ships.

[h2]Vehicles navigation[/h2]
Since this post is about logistics there is another fitting improvement we did in this area. Previously, when a vehicle couldn't reach its intended destination, it would get stuck and generate a notification, urging the player to resolve the issue. This approach had several drawbacks. For one, a vehicle stuck on an unreachable target stopped doing useful work and put more pressure on the logistics network. Additionally, haul trucks often attempted to navigate to locations that weren't critical, creating more disruptions. Also, some of these issues were temporary or not urgent, yet they demanded immediate player intervention to free up each vehicle.

Addressing the challenge of vehicles getting stuck due to unreachable destinations required a careful approach. The initial idea was straightforward: if a vehicle can't reach a destination, mark that destination as unreachable and move on. However, this solution wasn't without its complications. For instance, it might not be the destination that's the problem, but the vehicle itself being stuck. To tackle this, we implemented thresholds and automatic invalidations for unreachable goals after a certain period.

However, the largest obstacle to implementing the new solution was that our job assignments for picking and delivering cargo were managed independently, each with its own navigation task. This system led to trucks being dispatched to collect cargo without confirmation they could successfully complete their delivery. The result was a logistical bottleneck, with trucks accumulating near a silo, collecting cargo, then realizing they had nowhere to go, leading to a standstill. This was especially noticeable with dumping jobs.

Loaded trucks getting stuck one by one with cargo they just loaded from the silo unable to deliver to the blocked one.

The solution to this issue involved refactoring how we schedule jobs. Let's say we have a job to pick up cargo from storage A and deliver it to storage B. Previously, we would find a path to A, drive there, pick up the cargo, and then search for a path to B and try to drive there. In the new system, we still find a path to A, but we then run another pathfinding task from A to B before the truck departs. If the path from A to B is not found, we discard both jobs, and the truck doesn't depart. Furthermore, we mark B as inaccessible for our truck, meaning that, in the future, the truck will not be assigned a job to go there.

In update 2, an inaccessible silo shows a notification and ends up being ignored by all the trucks. Trucks no longer end up stuck with cargo loaded from the source silo.

Pathfinding isn't a trivial operation, and with this new change, we risked running the same pathfinding task twice. To address this, the new solution incorporates caching. When we find a path from A to B, we cache it. Once the truck arrives at A, it uses the precomputed path to B and executes it.

In update 2, clicking on the unreachable storage silo highlights all the vehicles that failed to navigate to it. These vehicles will occasionally re-test the path.

Some of these improvements wouldn't have been possible without the groundwork laid shortly after we launched Update 1. We introduced features such as automatic throttling of pathfinding for stuck vehicles and prioritizing smaller tasks. These enhancements have significantly increased the throughput of our pathfinder, enabling us to prune and retest unreachable goals regularly.

There's another exciting reason behind these improvements. In Update 2, players will gain the ability to lay their own surfaces, like concrete, directly on the ground—a feature we've hinted at in previous posts and will expand upon soon. This new surface-laying functionality will be carried out by trucks. Ensuring these vehicles don't get stuck due to unreachable surface designations was crucial, as it would have compounded existing logistical challenges. Faced with a substantial workload, we committed to making this enhancement to improve the gameplay experience and maintain our commitment to improving the quality of the game as much as we can.

Hydrogen excavators that are coming in update 2.

That's all the updates I have for you today. We have several more exciting features and improvements being worked on behind the scenes. I'm looking forward to sharing these with you soon. Thanks to all the fans and community for their continuous support. We are happy to have you! Stay tuned for more updates, and I’ll see you in the next one!

CD #40: Happy New Year & community rewards

Ahoy everyone, Captain Marek here and on behalf of the entire MaFi Games team – Happy New Year!! Lots of things happened in 2023 and even more things are planned for 2024! We are thrilled about what’s coming and I have some exciting announcements. But first, we are rewarding the most active and helpful members of our community so let’s start with that.



[h2]Community Rewards[/h2]
Last year we gave out more than $800 in rewards to the most active translators, wiki contributors, moderators, and members of our community, and this year is no different! We truly appreciate the extra effort that many of you put into helping others and giving back to the community. For example, COI is translated into 11 languages and 7 more languages have more than 50% coverage, all thanks to the community. Also, the COI wiki looks great and is full of useful info. Amazing work, thank you all!

We’ve contacted all reward recipients via email and most of the rewards are in the form of Steam gift cards or COI merch. Hopefully, our bank won’t block our credit card for purchasing so many Steam gift cards this year (guess what happened last year).

Community screenshot from discord user BarBarBar

Community screenshot from discord user DeathFire

Community screenshot from discord user Deimosian

Community screenshot from discord user Sarda

[h2]2023 recap[/h2]
It's easy to forget how many things were added over 2023. Just the changelog has 5707 words, so I won’t be listing all of the changes but I just wanted to mention a few highlights.

First, the biggest update yet, the Update 1 landed on May 30th 2023. It was actually COI’s first birthday as well! It added things like tree replanting, vertical pipes, extended nuclear power, new dynamic ocean, and improved graphics. For details, see the release announcement here.

Before Update 1 a smaller update landed that brought blueprints. Initial implementation did not support conveyors and pipes, but that was later added as well. Now we are working on the COI Hub website announced in Captain’s Diary #39 that will make blueprints sharing easy.

We’ve also optimized rendering, gaining 2x FPS on large factories. See Captain’s Diary #37 for more info.

And there is one more major update that was not as flashy, but it was the single biggest game change we’ve ever done: The terrain representation revamp. It’s hard to convey just how large of a change this was internally. The main CL (change list, or commit) was nearly 100k lines of changed code. This magnitude of changes in a released game is rare, and to be honest, a little reckless, but we pulled it off. If you’d like to read more about it, see Captain’s Diary #35.

[h2]Update 2[/h2]
Now it’s time for some more info about the upcoming Update 2. Here are features that were already announced:
  • Map editor
  • Pipes and tank trucks coloring
  • Icons on storages
  • Stackable balancers
  • Conveyor lifts
  • Particles on terrain
  • Custom surfaces
  • Cloud shadows


This is not all we’ve planned for Update 2, though. We have many more features to announce, but we are reluctant to announce things that might not make it since our priority list is constantly changing.

However, since it’s New Year, I will make an exception to this rule today. But please keep in mind that if this feature ends up being too complex, we will have to postpone it to Update 3. It’s roads!

[h2]Roads[/h2]
Yes, we are working on roads! It’s the #1 requested feature on our ideas tracker with 1.8k upvotes, and we’ve been internally talking about it for a long time, but it’s finally happening.

Roads are not just a terrain decoration, though. They are special entities that allow vehicles to drive on them while obeying traffic rules (at least that’s the final goal, we might release a first version without traffic rules). This also means that entering or exiting the road network will be possible only at designated places.

Vehicles will be free to choose whether to drive on terrain or on a road, but they will strongly prefer roads if possible. Building highways that connect distant places in your factory will make path-finding faster, allowing more vehicles to operate on your island.

Debug visualization of a functional roundabout composed of many smaller road pieces.

Debug visualization of a 90 degree turn of a double-lane road.

There are many more things regarding roads and their mechanics, but we will share them once they are ready, so stay tuned!

[h2]User interface[/h2]
And since you read this far, I have one more teaser for you. We are working on UI refresh and while things are still heavily in progress, here is a mock of the new loading screen. Let us know what you think about this new art style! Keep in mind that the art is not final and we don’t plan to change all game UI in Update 2, it will be more gradual.

Mock of the new Load Game window showing the new UI art style.

And that’s all for today. Happy New Year again, and see you around!

Captain Marek out.

Patch notes for v0.5.5d

* Fixed a rare case of disappearing buildings.
* Fixed vehicle pathabiliy overlay on very high or low terrain.

Captain's Diary #39: Lifts, tanks, conveyors, and Collin!

Ahoy, everyone! Captain Marek reporting in. I have lots of updates about our progress towards Update 2, so let’s jump straight in!

[h2]Welcome, Collin![/h2]
Before we get into the game updates, it’s my pleasure to introduce you to Collin – our new senior software engineer from Seattle! Collin is not new to the gaming industry, he was working for Zachtronics on some of their iconic games, such as SpaceChem. Since then, he has been working on some non-gaming projects, but he is back at game dev, and we are happy to have him! He will be focusing on the UI/UX at first, and he already started to rewrite our UI framework. Here are a few words from him:

“Greetings! I'm happy to join the MaFi team to work on improving my all-time favorite factory builder game! I look forward to helping accelerate development and improving the user experience for Update 2!”

[h2]Improved fluids recognizability[/h2]
In our ongoing quest to enhance the factory building experience, Update 2 brings improvements to fluid recognizability. Fluids, whether they're liquids or gasses, have always been stored and transported in closed containers. However, players have faced challenges in distinguishing between them at a glance, especially in areas filled with various types of processed fluids like refineries or power plants. For instance, all steam types are represented in white, making differentiation a frustrating task.

Moreover, to identify the contents of an empty storage unit, players had to click on it, and it was not even possible to tell what fluid was present in an empty pipe.

Update 2 addresses these issues through three key enhancements:
  1. Icons on fluid storages: Fluid storages will now have an icon representing the assigned product, even when empty. This means you'll be able to identify its contents with a quick glance.
  2. Icons on tank trucks: Trucks transporting fluids will now display the product icon prominently on their sides. Additionally, the tank itself will be colored according to the specific product being transported. This means no more confusion about what products are being transported.
  3. Pipes reflecting transported fluid type: One of the most significant changes arrives in the form of color-coded pipelines. Now, pipes will be tinted based on the product flowing through them. However, to ensure a seamless visual experience, these color changes will occur gradually, avoiding any abrupt transitions. This enhancement allows to quickly trace the path of different fluids through intricate pipeline networks.

Here are some comparisons of before/after:

New pipes and storages coloring (Update 2). Notice that now you can clearly see that the empty storage in the top right is for diesel, thanks to the icon and colored pipes.

New truck tank coloring (Update 2). You can also see the new and improved tank truck model.

In case you were wondering, none of these changes will have any effect on the game's performance.

[h2]Conveyor lifts[/h2]
Last update we’ve added vertical pipes and this time it’s time for conveyors! This feature is a hot topic on our ideas website having over 1k votes and it’s finally happening!



Designing and implementing conveyor lifts took us a bit longer because we were committed to getting them right. While vertical segments are a natural fit for pipes, the same logic doesn't apply to conveyors. Our goal was to enable simpler and more compact factories without compromising immersion or realism.

In real life, vertical conveyors, often known as "bucket elevators" for loose products, are commonly employed in filling large silos with bulk materials such as grain or cement. I bet that some of you have encountered these machines firsthand (if so, share some photos on our Discord!). For others, here is a short video explaining how they work in real life.

Our design process also considered gameplay mechanics. We wanted to avoid overloading conveyor lifts, especially in areas where space isn't a concern, and using ramps would be both practical and realistic.

This has led us to the following design: Conveyor lifts are stand-alone entities that can lift both unit and loose materials and occupy a footprint of 2x1 tiles. This offers substantial space savings compared to a conveyor ramp, which requires at least 3x1 tiles to change height by one tile, and 5x1 for a difference of two, 7x1 by three, etc.

However, there are some trade-offs when opting for lifts. They require significantly more power than using a conveyor ramp, and their construction must be done separately from building the conveyors. Here is how they look in action:

A comparison of assemblies connected via conveyor ramps (left side) compared to the new conveyor lifts (right side), which allow for more compact builds.

While conveyor lifts allow for more compact builds, the feature that excites me, even more, is the ability to be able to convey material over retaining walls! Take a look!

Conveyor lifts are used to transport mined iron ore from a deep mine over retaining walls. Notice that the middle lifts are built on raised pillars (they do not have to have the lower part touching the ground).


We are looking forward to seeing what new builds will emerge with the ability to use conveyor lifts!

[h2]Cloud shadows[/h2]
Cloud shadows is a feature that was initially implemented for Update 1, but we had to remove it last minute due to significant performance regression. Turns out that Unity decided to draw the entire scene twice when cloud shadows were enabled using a directional light cookie (a mask that selectively blocks light based on a provided texture).

Despite the setback, we were committed to integrating cloud shadows into the game as they make the weather more interesting and realistic. It was Jeremy who found another way to do the clouds shadows without the crazy performance penalty so now we have clouds “for free”! See the before/after below!

Cloudy weather in Update 2 (with cloud shadows)

By the way, these screenshots were taken from JD Play’s ultimate island adventure finished in the year 1000. He was trying to secretly escape the island in his rocket with a lot of gold waiting for him at a secret place, but people on the island found out and tried to sabotage his escape plan by flooding the crater. Did he manage to escape or did the crater get flooded? See his last episode #79 to find out!

[h2]Optimizing save size[/h2]
A few weeks ago, we received a bug report that the game crashed when the population statistics were switched to the maximum range (showing all years played). Turns out that the person’s save was 25k years old (yes, twenty-five-thousand!) and Unity could not handle a plot with 25k data points.

Seeing this issue, we realized that saving data from all years is not the best way, and it also uses up a LOT of space in the save file, around 50% (or 50 MB) for that 25k years save file to be precise. To fix this problem, we have limited the number of years stored to 100 and introduced new quarter-century statistics that are stored for all years played. This reduced the stored data by a factor of 25.

When we fixed this issue, we decided to go one step further and write a save analyzer that can quickly tell us what is actually using space in a save file. It’s a simple tool that visually shows the contents of a save file using a tree-map. Here is how it looks on that 25k year save after the statistics were consolidated:

A tree-map visualization of a 25k-year-old game save. The area of each rectangle is proportional to the disk space it uses.

We were happy to see that statistics are now a small portion of the total size, and the terrain is expected to be taking the majority of the save size. However, we were completely baffled about the mysterious queue in the vehicle path-finding manager that is taking over 40% of the save file. After a quick glance at the code, it turns out that this was some legacy code that was saving every fulfilled terrain designation, but this queue was never emptied, so it kept growing. Thanks to this tool, we were able to find it and fix it.

These two fixes were also back-ported to the live branch and released in patch v0.5.5c. Our in-house game serialization code is very flexible so we were able to do the statistics transformation and queue removal without breaking the save compatibility so that you all can enjoy smaller save files and faster saving/loading right away!
[h2]COI Hub[/h2]
I am excited to tell you about the upcoming COI Hub! It’s our community portal built by us for you. Its main purpose is the easy and convenient sharing of game content such as blueprints, maps, and mods!

We’ve seen a great need for sharing blueprints and mods, and with the upcoming map editor, we needed a central place to share maps as well. We had a few options.

The first option was to do nothing and leave it up to the community to figure things out. This solution is the least work for us, and there already are some blueprint-sharing websites, such as Captains haven. We are truly amazed and grateful for the incredible work done in community-driven projects. However, such projects can lose momentum when maintainers face other life commitments, which perfectly makes sense. But we're dedicated to ensuring this doesn't happen, keeping the content alive and thriving.

The second option was to use some third-party solution such as Steam Workshop or mod.io This solution is a moderate amount of work for us, and many games use these. However, we don’t think it’s the best user experience for players due to the lack of tight integration with the game. For example, when a game has a major update breaking some compatibility, third-party services cannot automatically mark all incompatible content, and it just rots on the platform.

So this leaves us with the most complex solution – build it ourselves from scratch – and that’s what we are doing! We believe that the tight integration with the game will allow us to do really cool things such as:
  • Validating uploaded blueprint strings (to prevent typos)
  • Show a list of machines from blueprints and filter based on this data.
  • Show map previews and metadata such as map size, amount of resources, etc.
  • Validate mod version compatibility and show various metadata.
  • And much more!

Here are some screenshots from the work-in-progress COI Hub.

A work-in-progress COI community hub showing some blueprints for download.

COI hub blueprint detail showing metadata about what machines are present.

Work on the COI hub is completely independent of Update 2, and we will release it once it’s ready. If you have any questions or ideas regarding this project, feel free to let us know on our Discord!

[h2]Steam Awards[/h2]
The prestigious Steam Awards season is upon us. We'd totally love your vote, but let's face it – our game does not have enough players to be nominated for a Steam Award just yet.

But wait! How about giving us a review on Steam? It's like our own mini awards show! Your feedback is the secret sauce for our game's improvement. I personally read every review, and lots of ideas and improvements come directly from them! Thank you!

[h2]Update 2 – when?[/h2]
We initially planned to release Update 2 this year, but we have decided to postpone the release to Q1 of next year so that we have time to add even more awesome features and ensure that everything is stable and polished. We will keep you updated with our Captain Diaries along the way!

And that’s all I have for you today, thanks for joining the adventure, and until next time, cheers!

[h2]We are hiring![/h2]
Still reading? Ever thought about enhancing the 3D models in our game or brewing up your own ideas? Perfect, because we're on the lookout! Join us as a low-poly 3D artist. Know someone perfect for this? Spread the word! Check out the details here https://www.captain-of-industry.com/jobs

Patch notes for v0.5.5b and v0.5.5c

v0.5.5c
* Annual stats have now history reduced to 100 years but a new quarter-century stats with unlimited history was added.
- This fixed crash when viewing annual statistics for saves with 10k+ years.
- This significantly reduced save file size by up to 20% and increased speed of save/load.

v0.5.5b
* Increased terrain physics processing speed 4x to prevent issues with terrain collapse being too slow.
* Fixed ocean rendering when repeatedly swapping rendering quality settings.