DevBlog #68 | Foundry Fridays: Power Plant Preview
Hello everyone!
A few blog posts ago we promised to show a new modular building on the next FOUNDRY Friday and instead covered a different topic in the following post. Since we received a few “reminders” I wanted to address this grave injustice and hereby finally show the work in progress art of the new power plant!
What you can see is a power plant that is made out of several different modular buildings. I once mentioned that one of the main motivations for modular buildings was that in reality it’s more likely to have a single large machine than hundreds of small ones working in parallel. A power plant made of multiple such buildings is the next logical step. We’re trying to make those objects - especially once combined - feel like real buildings. In fact, some of them are so massive you can enter them.
Its functionality is inspired by real life nuclear power plants, although a bit simplified. We haven’t yet decided if we’ll theme it as a nuclear plant or if we’re going to come up with a more sci-fi-ish design.
Your task is to build those buildings and properly connect each of them. As we are still working on this I won’t go further into detail but instead share screenshots.
Please note that things are subject to change as everything is work in progress.
We’re writing today's FOUNDRY Friday to provide news regarding the next big release, referred to as Update 2. As you may know, we originally planned for the 2nd update to arrive at the end of this year. After analyzing player feedback and survey results, we have decided to adjust the timeline and move Update 2 into next year.
The main reason for this decision is because we want FOUNDRY to provide a great and unique gaming experience and we believe to make this work we need an even bigger update. Because of the scope of the changes, breaking it into incremental pieces would have been difficult and slowed development. This means that instead of getting a smaller update at the end of this year, we will instead deliver a much larger update next year, addressing many of the suggestions our active community members shared with us during these months.
What will Update 2 be about?
Many of our players have mentioned that a more meaningful purpose for building a factory would make the game more interesting for them — Update 2 solves this by letting players explore commerce and robot production of all kinds. After all, what’s a factory if you aren’t building something? We’ve been talking about this in several past FOUNDRY Fridays and you can read about that here and here. We believe our work on this feature drastically improves the core of the game. Alongside that, we will also focus on new features, buildings, recipes and space station content — everything to make the game longer, deeper and more engaging — we will gradually share more details as we work towards Update 2.
And finally we will keep working on game performance, optimization and QoL features so that your factories will run smoothly while looking great.
We would like to express our gratitude to everyone who has been talking to us on Steam, Discord and socials, and participated in our surveys — you are shaping this game with us and your input is what is helping us deliver the best possible version of FOUNDRY.
It is a bit too early to have a specific date, but we’ll be transparent about our progress and what we’re working on in future FOUNDRY Fridays, and we will inform everyone as soon as we have a release window for it. Join us on the upcoming livestream To talk about Update 2, the new timeline and to answer your questions we will be hosting a livestream on Wednesday, the 4th of December at 18:00 CET / 9 AM PST. Tune in to share your feedback and get in touch with the developers!
Hi there. Today I want to talk a little bit about the work that we're doing to try and improve streaming performance in Foundry.
Current System
Similar to many other Unity games, Foundry is built in Unity and most entities in our game are represented by GameObjects. Some of the performance challenges that come with using game objects include: - You can only create/destroy GameObjects on the main thread. - You can only enable/disable GameObjects on the main thread. - GameObjects and their components are dynamically allocated meaning that their memory is all over the place and not cache friendly. - GameObjects use a lot of memory.
Option A: Object Pooling
One of the solutions many games use is object pooling. This is when you preallocate pools of gameobjects and just enable/disable them as they come into streaming range. We actually use this already for some portions of the buildings but there are several challenges with using this strategy for all the objects in the game: - It's difficult to choose how many of each item to have pooled. If we want perfect pooling, we would need to have enough gameobjects in the object pools to handle the player walking in any arbitrary direction and we only have a little bit of time on the main thread available to grow those pools when necessary. - GameObjects use a lot of memory. If we needed to have a significant amount of objects pooled, the memory costs would grow quite significantly. - It is still quite expensive to enable/disable objects, especially ones with deeper hierarchies where unity has to iterate the hierarchy and enable/disable all the components. - Implementing game object pooling is fairly simple to do but converting all the game code to work with object pooling can be quite difficult and lead to very subtle bugs, not just for all the existing code, but for any code that anyone on the team writes in the future. It effectively would add a 'development tax' to all current and future development on the project.
Option B: Unity ECS
Another solution games will use is Unity's ECS system. Though using Unity ECS would solve many of our issues, the main issue with the unity ecs system is that Foundry was in development for many years before the 1.0 release of Unity ECS and switching the entire game would require a significant rewrite of the entire game. It would be possible to use it for only certain systems but this would mean we would have two entity systems which would add significant complexity to the game. So instead of rewriting everything to use Unity ECS, we're working on incorporating some of the ideas behind it into our own code.
Option C: Streaming Proxies
The solution we are currently prototyping is to take parts of our own code and make them more data oriented and have it stream in separately from the unity GameObjects. These objects that stream in separately are called streaming proxies. These proxies are data oriented and stream in exceptionally fast. The idea is that most of the world you see will be drawn using streaming proxies and game objects will stream in close to the player:
Initial Prototype
As a prototype, we've moved over the rendering of everything that uses our compute rendering system over to the streaming proxy system. Here's a video of how fast streaming was before:
And here's an example using streaming proxies:
In the second video you can see that all the streaming proxies stream in exceptionally quick but we're not yet loading collision for any of those objects which means you can't interact with them at all yet. That'll be solved by a mix of streaming in gameobjects near the player and moving more systems over to the streaming proxies such as collision/effects/sounds/etc.
What's Next
This whole system is a a work in progress and the final solution might end up being a mix of gameobjects/pooling/streaming proxies. Next steps are to stream in the gameobjects near the player but also to move some of the collision handling over to the proxy system. That being said, we wanted to give you guys a look into some of the work in progress that's being done to solve the streaming issues in large bases.
Thanks for listening! -Cheerio
If you haven't read our previous FOUNDRY Fridays and prefer a video format, feel free to check out our Monthly Status Update video on YouTube:
We have been pretty heads down working on some major changes, so today's Foundry Friday is a bit of a grab bag of topics. We are going to go over the survey results, show off the orbital uplink tool, show some optimization progress of modular buildings and tease a new mega structure.
Survey Results
Last Foundry Friday we shared a survey with our community to better understand where we should focus our efforts on improving Foundry, and we received TONS of responses and were able to draw some valuable insights.
Although there was a great deal overlap in respondents' opinions, the feedback fell into two broad buckets. Our retained players focus on quality-of-life improvements, like refining resource gathering and adding smoother gameplay tweaks, reflecting how invested they are in the experience. Meanwhile, players who’ve taken a break often cited the need for more content, a clearer endgame, and blueprints to bring them back. This mix of perspectives gives us a solid direction: making iterative improvements to keep regular players engaged while expanding content and adding features to draw back those who’ve stepped away. This survey affirmed our need to add more content and a thematic goal- but also reminds us we also need to expand the existing core pillars of the game.
Of note, the pressure mechanic was not seen as a priority. I believe that’s because it’s something that has conflicts with the general vibe of the game- so it’s interesting to see the community respond with a similar opinion. Also… everyone wants trains.
Orbital Uplink Tool
In Foundry Friday #62 we shared information about the Orbital Laser. This late(ish) Space Station upgrade helps players terraform large chunks of terrain with ease. And now commanding the space station with the new Orbital Uplink Tool design is a breeze. This craftable handheld has a right-click modal menu that lets you switch between different Space Station features (like the Orbital Laser).
Optimizing Modular Buildings
Foundry is receiving a ton of optimizations, but there is still much left to do in order to allow absolutely massive factories smoothly on a wide range of hardware. This week we tackled optimizing Modular Buildings, the mid to late game super structures that are built in modules by construction ships and drones. These buildings presented a unique challenge in that they don’t utilize our existing systems for rendering. By manually processing the drawing of these buildings (and their related handrails, scaffolding and modules) we were able to improve performance on this “blast furnace” test scene from a poultry 27fps to a much more acceptable 103fps.
Modular buildings can contain thousands of pieces like hand railings and scaffolding.
Modular buildings now have the same batching optimizations as regular buildings
Foundry is the most fun when you try to scale, and because of this it’s important that we have each element run as fast as possible. We have done a ton of other rendering and streaming optimizations that we haven’t talked about yet, and our development builds are running smoother than ever. The next update should be really solid for those who like to build "big".
Mega Modular Buildings
Now that modular buildings have received a large optimization- we might as well tease where this feature is going. Even larger, even more modular mega structures! Next Foundry Friday we will reveal one of the most mega modular buildings yet. In fact, it’s so large you can actually go inside and to get it to work requires numerous new modular buildings. This building is so iconic that it was hard to get a work-in-progress screenshot where you wouldn't immediately guess what it is. So you get this early rendering of one of the components instead:
What could it be?
Well, that's it for this week. We are hard at work on a ton of things behind the scenes and we are eager to share more in the coming posts.
In today's FOUNDRY Friday I continue to talk about potential future features and afterwards conclude with a community survey. The survey can be completed in less than two minutes and all textbox questions are optional. We are actively working on a bunch of exciting features and content, but we believe it’s important for us to ‘gut check’ that we are prioritizing things correctly.
While the survey asks a few different questions, the main focus is a feature list we want you to order by priority. What you care about most goes on the top and what you care about least goes to the bottom. We understand that many of you will want all of those features, and we might very well add all of them, but for this survey it is important for us to understand what you believe is most urgently needed.
The features to order are purposefully vague as this isn’t the time to go into details, however during the following blog post I will be providing content to each of those features to help you make the decision on which rank you’ll be ordering each. Additionally if you want to share I would love to read your thoughts in the comments about how certain features should be implemented.
For better context it’s advised to read through the feature descriptions below first, but if you want to skip ahead you can find the link here.
Trains
Trains offer a very effective, immersive and visually appealing way of moving goods around your factory over large distances. I think they don’t need much explanation, there are quite a few (factory) games with trains and we would implement them in a roughly similar way. We have already experimented with trains and we might show some of those experiments in the near future.
Blueprints
Factory games are about scaling and blueprints help a lot. We want to add blueprints, but we are not yet sure if it should be a relatively simple copy and paste mechanic or something more integrated with unique mechanics like blueprinted objects being built by the construction industry.
Pressure Mechanic
I want to start with the important part right away: Any sort of pressure mechanic would always be optional and could be turned off completely. A pressure mechanic could be implemented in many different ways. I personally believe that moving enemies don’t fit our first-person voxel based gameplay and that pressure should come from other sources. It could be environmental pressure (pollution, weather, …), something related to our space station (attackers?) or maybe something entirely different.
Exploration Mechanics
FOUNDRY offers a procedurally generated world, yet as of now there isn’t much to discover except new resource nodes. I’d be very curious to hear from you if you would like to have some mechanics themed around exploring the world. An example could be the hunt for rare items that provide various bonuses or unlocks, however I believe players shouldn’t be forced to if they want to focus on the factory. If you have suggestions, let us know in the comments!
More meaningful goal / endgame
It’s something I have covered in multiple previous FOUNDRY Fridays, most recently here, therefore I’ll keep this one short: Does the game need a better purpose for producing goods, instead of just to progress through the tech tree?
More unique features
Do you think FOUNDRY needs more unique features that cannot be found in comparable games? An example would be our construction industry and modular buildings.
Better Performance
We are constantly working on improving the performance so that larger factories are possible. The reason this is part of the list is that we see how urgent you believe this topic is.
Better Usability
With usability we mean how comfortable certain features are, that could be the user interface or how easy it is to drag belts and pipes. As with the performance point above, we are working on this no matter what, but we’d like to see where you put it on the priority list.
More content
We intend to make the game much longer compared to what it is now, but we want to offer it as part of the orderable list so that you can specify how important it is as of now.
That’s all of the features we want you to sort by priority, here’s the link to the survey: LINK
Thank you very much for participating, me and the team are looking forward to the results.
This FOUNDRY Friday is going to be a little shorter than usual because our fully remote team is traveling to meet up in person. For some it is the first time they will meet the team in person!
Amongst many other things we’ve been working on, we’ve also been continuing to work on optimizations. Optimizations are such an important part of a game like ours because the entire fun of the game centers around building giant never ending factories. They also help the game run on lower power systems, and on higher quality settings. Most factories in Foundry are CPU bound which means that the GPU is idle and available to help.
One of the optimizations we’ve just finished up is to recreate the unity particle systems on the GPU. This frees up the CPU to handle more of the factory simulation. In this video you can see the CPU version of one of the Foundry smoke effects on the left, and on the right you can see the GPU version. The GPU version costs no CPU to simulate and it also now supports occlusion culling so if it’s completely obscured by terrain or a wall, it costs no CPU or GPU at all:
This plus some other physics/effect/batching optimizations that we’ve been working on makes it so that on average, in dense areas of your factory, you will see on average somewhere between a 50% to 150% increase in your FPS. Here’s a before and after video of a factory designed by Zytukin where the framerate in one of the problematic areas is almost double what it used to be.
Before:
After:
This was just a brief overview into one of the optimizations we’re doing. There’s still a lot more to come which we will cover in a future Foundry Friday.
I heard every good factory game needs a laser update, so I’m excited to share some early laser related developments within the world of Foundry.
Now Witness the Firepower of This Fully Armed and Operational Space Station
https://youtu.be/zXcci0UtY5Y
Orbital Laser
The orbital laser is a late(-ish) game Space Station upgrade that gives you access to a terraforming laser. It makes short work of large chunks of terrain, but has the limitation that it’s fired down to the planet from the sky and indiscriminately destroys everything it touches. Removing pesky mountains has never been easier- just don’t fire it too close to anything you love! This early version hasn’t had all the kinks ironed out yet, so we would love to hear your thoughts as we polish it up.
Orbital Uplink Tool
Expanding on the utility of the Space Station has always been the plan, adding additional upgrades and functionality to reward your factory progress. We have begun work on adding a mobile “Orbital Uplink Tool”. A craftable item that will allow you to remotely command the Space Station, including targeting the new Orbital Laser. The hand tool in the video is just a placeholder as we decide on the design for the holdable.
The Future of Terraforming
One of the most obvious USP’s for the game right now is the procedural, modifiable voxel terrain. We are actively thinking of ways we can make better use of it, especially in the early game, to help folks see how cool Foundry is. If you have any thoughts on what we could do in regards to this, we are listening.
One more thing…
This one has been on our TODO list for a long, long, long, long, long time. Introducing the brand new multi-directional-belt-drag mode!
https://youtu.be/ZgMxchpsZLk Placing belts is one of the most common tasks in the game, and previously it involved swapping between multiple items and modes. So, in addition to the precise placement mode you are already familiar with, we (and by we I mean MrMcDuck) have added a powerful, and simple, click drag mode. It works in multiple directions, handles numerous turns in a single drag, and even automatic vertical belt placement.
https://youtu.be/milJtS8YjsE I know everyone has been (very patiently) waiting for the next content update, and is itching to get their hands on new content asap. Please rest assured that despite our belts and lasers initiative here, that we are working hard on a substantial content update with tons of surprises.
Today we have something new for you: A timelapse video of our Art Director Jason creating one of the modular buildings, the Long Range Scanner. You can see him modeling the whole building from start to finish in a heavily sped up format of just nine minutes.
Let us know if you enjoy seeing how games are made behind the scenes and if you'd like to see more content like that.
Speaking of behind the scenes, we've spent the past week on improving usability for conveyor belt dragging and I think you'll like the result. It's a little to early to share, but I still wanted to mention it.
Last week we launched our first update and we’re happy to see you enjoying the new features. Some of you have already uploaded mods to Steam workshop and our team is very excited to see that. We also want to thank everyone who sent us feedback, always appreciated.
With the first update done, I want to use this FOUNDRY Friday to look at the future and discuss what we’re planning for the second update and the road towards it.
Key Priorities
Our key priorities for the upcoming future are more and new gameplay content, usability improvements and performance improvements. Let us go over them a bit more in detail below.
Gameplay Content This is obviously the big one everyone is waiting for. Of course we want to make the game longer and deeper, but we even more so want to focus on making the game more unique. I wrote an entire blog post about a proposal for that and the feedback we received was invaluable and allowed us to further refine our plan.
To quickly recap the problem in short: I feel like FOUNDRY is too generic. While we added a bit of a story with Carl and C3-BB and a space station as a goal on the horizon, the game mostly revolves around making your way through the science tree. That is not a bad thing, but it lacks meaning and motivation.
The one sentence pitch to solve it: In FOUNDRY you build a galactic factory that is all about robots, produce, utilize and sell them.
FOUNDRY has a pretty unique feature in selling robots, but it comes very late in the game and I want to bring that right from the start. The other thing that became obvious from your feedback was that you care even more about using the robots you make instead of just selling them. The honest truth from a game design perspective is that it is a lot easier to sell a lot of different robots instead of using them in your factory, but we will try to come up with as many use cases as possible for using robots as part of your factory.
There is a lot to say about our further refined plans on this topic, but I will save that for upcoming FOUNDRY Fridays.
Usability Improvements We want to make playing the game more enjoyable by reducing friction while building your factories. Especially improving belt and pipe placement as that is what we’re receiving the most requests for. We understand that while we tried to make the building part of the game as comfortable as possible, we have a lot of additional work ahead of us to fully get there. If there are other usability issues you find critical, now is the time to let us know!
Performance Improvements Foundry runs pretty well if you are focussed on finishing the research tree in an average sized factory. But of course factory games are made to go far beyond that and for exactly that we want to further optimize FPS so that you can build the mega factories of your dreams. Those of you who enjoy making use of massive amounts of decor blocks might have experienced that those might not necessarily cost a huge amount of FPS, but they take a while to fully fade in again after you have been further away and that is the second part of performance improvements we want to look at.
That is all for today and I’ll be sharing more details as our work on the game progresses.