1. FOUNDRY
  2. News

FOUNDRY News

DevBlog #44 | Foundry Fridays: Year Recap & Decorative Objects

Hello everyone!

I hope you had enjoyable holiday celebrations! The FOUNDRY-Team is on a two week company-wide vacation to recharge our batteries and get ready for the upcoming year. For that reason I’ll keep today's blog a bit shorter, I’m going to start off with a recap of 2023, look ahead into 2024 and finally show off a new feature.

[h3]Recap and Outlook[/h3]
This past year was the most transformative year for our studio. Partnering up with Paradox Interactive provided us with the ability to scale up to a development studio worthy of the name. Development progress is now going faster, our art has improved and in general the quality we can deliver to our community has increased. On top of that we have received a far greater visibility and our community has grown significantly.

Over the past year we were able to revamp the gameplay experience when progressing through FOUNDRY. Additionally we have added and improved countless features. A process that culminated in our Steam Next Fest participation where over a hundred thousand people played our game. It showed us that we’re on a good track and also made us aware of where we need to spend some additional time.

Our focus for the upcoming year will be the long-anticipated Steam Early Access launch - an event we’re looking forward to as much as you do. We initially assumed we would get there a bit sooner, but game development done right takes some time and we felt it was necessary to spend more time on our game to provide the quality and scope we think the game should have for an Early Access launch. We still don’t have a set date for you, but we will let you know as soon as we can. There will also be additional alpha preview versions for our itch audience - more information on that soon in our Discord.

[h3]Decorative Object System Sneak Peek[/h3]
Before we close today's episode of FOUNDRY Fridays I’m going to share a few insights about our newest feature: A decorative object system that allows you to get even more creative about your factories. We always had a couple decorative objects and while you can build anything out of voxels, we wanted to provide you with additional objects to create good looking buildings and structures.


The building above is made out of several smaller objects which are highly customizable and tile well together. They can be rotated around any axis to provide the most possible freedom. Our art director Jason has created a pretty large amount of objects for you and there are almost certainly more to follow. To achieve more creative diversity the system provides an option to select different colors for all of those objects. Please note that the screenshots are work in progress and models and textures are not final.


As this is just a sneak peek, this is all for today. The system will most likely get its own blog post at some point, but I wanted to show you something new for the final blog of 2023.

Happy new year and see you soon,
-mrmcd


Follow us on socials:


Stay tuned for more news!

https://store.steampowered.com/app/983870/FOUNDRY/

DevBlog #43 | Foundry Fridays: Shader Shenanigans

[h2]What the heck are shaders? [/h2]
I’m glad you asked. Shaders are tiny little programs that run on your computer's GPU, running a massive number of operations in parallel to create many of the wonderful effects you see in modern computer games. We use shaders all over Foundry, and since I spend a lot of time thinking and working on them I wanted to share a bit of the work I’ve been doing on our new unified object shader.

If you want to catch up, in previous Foundry Fridays I talked a bit about our first person rendering solution and touched on our lighting system. Before we delve into our new Foundry shader I think a little background on shaders is in order.

[h2]Vertex Shaders[/h2]
First you need to understand that almost everything you see in a video game is made out of triangles, and each triangle has three points that define it, which we call vertices.


These vertices are often spaced out more than each pixel on your screen. We frequently perform operations that move, animate or color each vertex.


A simple Vertex program will transform the object space position of each vertex into clip position, and perform some operations on the texture mapping. The really cool thing about vertex programs is that they only define the data at each vertex point in a triangle, and then the data is “interpolated” (blended) between each point when you sample the data later at the fragment (pixel) level. Imagine one vertex is blue, the other is green, then the middle point between the two will be teal.

[h2]Fragment Programs[/h2]
The interpolated data from the vertex data is then transferred to a fragment shader (one fragment shader per pixel of the shader being drawn on screen). The fragment program then decides what will be drawn on screen. Here we sample a texture, given a uv coordinate to output a simple texture without any lighting information. If you want lighting or any fancy features from here you need to add a ton more code.



[h2]Surface Shaders[/h2]
Unity has a really nifty feature called surface shaders. These shaders let you create consistent and powerful shaders with relatively little code. That’s because instead of defining the final “output” in a fragment program, you write a surface description in a special surface shader. This includes descriptive things like the color of the object and the reflectivity of the surface. Because we are just describing a surface we are not responsible for how the final pixel looks, and instead another shader operates on this data all at once at the end to create a consistent look with all other surface shaders.



[h2]Multi-Compiled Shaders[/h2]
Shader programs are designed to be as small and efficient as possible, but at the same time we ask them to do so many different things. A solution to this is to make each “feature” you have in your shader optional by compiling two versions- one with the feature and one without. Key shaders often have many different options and for each option, O, we have a total of 2 to the power of O shader variants.



[h2]Default Foundry Shader[/h2]
Ok so now that we have that out of the way, lets talk about the new Foundry shader that we are moving towards using across most buildings, and characters. This shader utilizes surface shading and multi-compiled shader features. The “Default Foundry Shader” has numerous features we are experimenting with that can be mixed and matched and may one day find their way into the game.



[h2]Rim Lighting[/h2]
Rim lighting takes the normal and view direction of the fragment and determines if it’s looking at a glancing angle for highlighting. You are probably most familiar with this effect in Mario games like Galaxy. This can add definition to the edges and silhouette of a building or character. Here I apply an extremely obnoxious amount of rim light to the drop pod to help visualize how the light is applied.



[h2]Wear Mask[/h2]


Factories in Foundry are pretty and clean, but what if they were dirty? Using a tri-planar “noise” texture I can selectively apply smudges on buildings (or entire factories) using the wear mask feature. You could imagine how this might play into a gameplay system in the future, but for right now it’s just an experiment.

An old screenshot test of what a “dirty” base might look like.

[h2]Color Tinting[/h2]
Buildings and characters can have selective tinting at runtime. Areas on the model are masked out to receive tinting and then this shader feature modifies the HSV value of the fragment to a new tint. We are already using this tinting system for the player “skin” selection option from the Next Fest demo, but here you can see that it’s not limited to predefined colors- it could even be animated or applied to buildings.



[h2]Conclusion[/h2]
Shaders allow you to dramatically change the way your game looks and feels, but it’s easy to go overboard and create a performance nightmare. Surface shaders help keep things consistent and shader features let us optimize the amount of code actually run per surface to just what is needed. Foundry’s visuals and shaders are constantly evolving and I'm excited to see where we improve them next!

- Mark Laprairie

Follow us on socials:


Stay tuned for more news!

https://store.steampowered.com/app/983870/FOUNDRY/

DevBlog #42 | Foundry Fridays: Long Distance Transportation

Hello everyone!

Today it is time for an update on an often requested gameplay feature: Long distance transportation.
Our ore patches can be quite far out, especially once you made it to the mid or end-game. Many of you brought up that it is not very feasible - and neither fun - to build so-called “conveyor highways” to bring in your ore to the main base.
We always planned for mechanics which allow movement of goods over a long distance in a simplified way, and today we show you the first of those technologies: Transport Ships.


With them you can move all sorts of goods from one landing platform to another. The platforms are very large, so the technology isn't made for moving goods from one place inside your factory to another, it is for when greater distances need to be covered.

I will go into detail on how they work further below, first I want to talk about long distance transportation in general. Although this isn’t a guarantee, we ultimately plan to have multiple long distance transportation methods. Our transport ships are the first type. The other ones aren’t as time-critical now that the gameplay issue of moving large amounts of items to a different spot is solved, so don’t expect others to arrive quickly. But we do know that you all want trains and we’re going to look into it after we have launched into Early Access.

[h2]Transport Ships[/h2]
Let’s have a look on how to set them up and how they work. It all starts with two platforms, the target (drop-off) and the origin (pick-up) platform/station.


You set a name for the target station, let’s say “Xenoferrite Smeltery”, and assign it at the origin station so that it knows where to move the items. Multiple origin stations can have the same target station assigned. That means multiple ore mines could deliver to the same central pad if you want to set it up like that.


After that you need to configure the conditions on when the ship should start, you get detailed control on how they should behave. You can select either a percentage of the inventory or a certain amount of time passed. You can also combine them to create something like “both need to be true” or “just one of those needs to be true”.



Once the configured conditions are fulfilled, your ship will take off and fly to the target station. There it will unload and then fly back home. The way flying works is that they ascend upwards in a straight path, until they are outside of the buildable area and then they will fly straight to the point above the target station, where they will descend down again. That means both platforms must have an empty path upwards (must not be blocked by terrain, buildings, …). Their screen panels warn you if that is not the case.

There is no distance limitation, but the further they fly, the more they need to recharge once they are back home.

Here’s a video of them flying:
[previewyoutube][/previewyoutube]
Please keep in mind, this is work in progress. Animations, balancing and other things may change a bit and/or will receive more polishing.

[h2]Wait, you can go inside?[/h2]
Yep, you can. There’s an interior and a pilot and you can jump on and ride from one station to another. Currently you need to guess the time it will take off (depending on the conditions set), but we’re thinking about adding some option to tell the robot pilot to just go now if you need a ride. Although we might also create a second system for that. Using cargo ships for personal travel seems slightly wasteful.


I hope you have enjoyed today's FOUNDRY Friday and I hope to see you next time!
-mrmcd



Follow us on socials:

Stay tuned for more news!

https://store.steampowered.com/app/983870/FOUNDRY/

DevBlog #41 | Foundry Fridays: Regrowable Plants & Trees



Welcome everyone to another episode of FOUNDRY Fridays! My name is Michael aka Lxi and I’m the “oldest” member of the team. I joined MrMcDuck roughly six to twelve months after he started this awesome project and it has been a fun ride ever since! It’s exciting to see how the game has developed so far and your feedback has been a crucial part of the journey. Therefore today’s topic is about an often requested feature I’m currently implementing, the possibility to regrow plants and trees.

If you want to design a factory surrounded by nature you won’t have to design it around the existing plants and trees anymore. We’ll provide you with the tools necessary to plant trees and plants wherever you like from seeds.

[h2]How does it work in detail?[/h2]
When you mine a plant or tree there is a possibility that it drops a seed beside the biomass you normally get. Currently it’s planned that each biome has two types of seeds: one for plants and one for trees.



Once you have obtained a seed you can use it like a building to place a plant/tree from the seed family. Use the radial menu which plant/tree you want to plant. Your plant or tree won’t spawn at its full height once placed, but will need time to grow. If you mine it shortly after placing it, you will get the seed back, so you don’t waste any seeds by accidentally misplacing it. As it’s growing larger it will yield a percentage of the biomass you would receive when it’s fully grown once mined, depending on the growth percentage.


Growth speed is accelerated for demonstration purposes.

[h2]I don’t want to mine 1000 trees to grow my own forest![/h2]

Great! We don’t want you to either! That’s where our new building, the Greenhouse, comes into play. The Greenhouse will be able to duplicate a certain type of seed by inserting a seed alongside with some other items/liquids. However duplicating the seed won’t work every time, there is only a percent chance that the Greenhouse will do so. This way we introduce a new kind of production cycle/gameplay: You will need to build “seed loops” and only extract the overproduced seeds to keep it going. Hint: The balancers provide a great way to help you achieve this by using the output priority setting.
Unfortunately I can’t show images of the Greenhouse yet, since the model isn’t yet finished.

Keep in mind that all of this is work in progress and might change in some ways, but it feels like this is the right amount of depth we currently want for this feature. Looking forward to your feedback!

All the best,
lxi

Follow us on socials:


Stay tuned for more news!

https://store.steampowered.com/app/983870/FOUNDRY/

DevBlog #40 | Foundry Fridays: Localization System

[h2]Hello! Hallo! ¡Hola! こんにちは! 안녕하세요![/h2]
Greetings, everyone! I'm Roman, also known as Zirus, and I've joined the FOUNDRY team back in April. Though I'm new to Foundry Fridays, I'm eager to share some exciting improvements we've been making to our Localization System.

[h2]Why the Upgrade to our Localization System?[/h2]
Previously, our Localization was based on simple key-value pairs. But, as we and FOUNDRY's codebase have grown, we've seen the need for a more robust system - especially when a tiny typo could lead to a big headache:



Key

Value



Welcme to Foundry!

Willkommen in Foundry!


Noticed the typo in "Welcome"? Fixing it leads to a lost translation as it ends up being a new key:



Key

Value



Welcome to Foundry!



To address this, we have implemented improvements to the System using unique identifiers for each phrase, which ensures consistency of translations across all languages. We'll look into this more in depth a bit later, but let's take a look at the things that actually need Localization first.

[h2]The Three Pillars of Localization in FOUNDRY[/h2]
Localization in Foundry stands on three pillars:

[h3]Static Localization[/h3]
Upon starting the game, static elements like information messages and headers are set in your chosen language. This content remains constant throughout your experience.


[h3]Dynamic Localization[/h3]
Your in-game actions prompt real-time Localization changes. For instance, the plumber tool adjusts its messages based on singular or plural contexts, ensuring an immersive and accurate gaming experience.



Singular

Plural






[h3]Templates[/h3]
Templates are the backbone of FOUNDRY's content - every machine, crafting recipe or item has its own template. Such templates may have translate-able variables, for instance their display name.



[h2]Enhancing Consistency by Introducing Unique IDs[/h2]
To bolster the integrity and consistency of our Localization System, we've introduced a unique identifier for each translatable phrase. Picture these identifiers as serial numbers assigned to each snippet of text, ensuring that every translation is anchored to a stable reference point. This means that even when the English source text is altered - whether to correct a typo or to update a phrase - the corresponding translations remain reliably linked.

Here's a practical illustration of this system at work:



ID

English

Translation



WELCOME_MESSAGE

Welcome to Foundry!

Willkommen in Foundry!


With this structure, we can address any textual errors without disrupting the existing translations across different languages. This new approach provides a safeguard against the common issue of 'lost' translations that occurred under our previous system when making corrections or updates to the source text.

Certain scenarios may still necessitate a reevaluation of the translation themselves though. For example, if the original English text is updated to the extent that it alters the context or meaning, the translations would need to be revisited to ensure they still convey the intended message accurately.

[h2]The Big Export: Optimizing the Translation Workflow[/h2]
In our pursuit to optimize the translation process, we have developed a specialized parser. This tool is designed to automatically generate Localization files in a format called "portable object". This change streamlines our workflow, making it easier to update our project on CrowdIn.

[h2]Validation: Ensuring Precision in Localization[/h2]
In the complex landscape of Localization, maintaining a clear overview of existing unique identifiers is crucial. To manage this, we've integrated a robust Validation System, designed to be a steadfast ally in the Localization process. This system automatically flags any discrepancies such as overlapping IDs or absent context comments. Here's a glimpse into the kinds of issues it helps us avoid:

[h2]Preventing Duplicate IDs from Causing Confusion[/h2]


ID

Value



MACHINE_EMPTY

Machine is empty



MACHINE_EMPTY

Machine is currently empty


Encountering duplicate IDs with different assigned values can create conflicts within the Localization System, as it relies on IDs to determine the correct text to display in-game. This scenario can lead to inconsistencies, which our Validation System is adept at identifying.

[h2]Avoiding Redundancy with Different IDs for Identical Values[/h2]


ID

Value



MACHINE_EMPTY

Machine is empty



SELECTED_MACHINE_EMPTY

Machine is empty


It's possible to inadvertently create different IDs for the same value. Our system detects such redundancies, alerting us to streamline our Localizations and prevent unnecessary complexity.

[h2]Context Comments for Clear Translation[/h2]
Context is king in translation. To aid our translators, we embed comments within each Localization call, providing them with the necessary background to deliver accurate translations. These comments are essential, especially when viewed in tools such as CrowdIn, where they guide the translation process. This is why the Validation System informs us about calls where these context comments are missing. Here is an example how these comments look in CrowdIn:


[h2]Modding: Empowering Community Creativity[/h2]
Our new Localization System is crafted with the modding community at heart, streamlining the way modders integrate translations into their creations. This modder-centric design allows for seamless utilization of the existing Localization framework during the development phase, ensuring that mods are as language-accessible as the core game itself.

From the initial coding stages to the final touches, modders should be able to:
  • Employ the system to handle in-game text, providing a consistent experience for mod
    users.
  • Export their content into "portable object" files, which are standardized for easy
    translation management.
  • Utilize the Validation System to preemptively catch and correct any potential issues
    with duplicate IDs or missing context, which is crucial for maintaining the integrity of
    the mod's Localization.
  • Load these translations during the game's startup, making sure that no matter where a
    player is from, they can enjoy mods in their native tongue.

Our goal is a robust and accessible environment that empowers modders to share their work with a global audience, removing language barriers that could previously hinder the full enjoyment and reach their creative efforts.

[h2]In Closing[/h2]
We strive to make Localization intuitive for everyone involved - gamers, translators, and modders. Should you have any feedback or suggestions, please feel free to reach out to us on Discord.

I hope you enjoyed this little sneak peek into how we handle Localization. Thanks for
reading!

Cheers, Zirus



Follow us on socials:


Stay tuned for more news!

https://store.steampowered.com/app/983870/FOUNDRY/