TUXDB - LINUX GAMING AGGREGATE
by NuSuey
NEWSFEED
▪️ GAMES
▪️ STEAM DECK ▪️ DEALS ▪️ CROWDFUNDING ▪️ COMMUNITY
tuxdb.com logo
Support tuxDB on Patreon
Currently supported by 9 awesome people!

🌟 Special thanks to our amazing supporters:


✨ $10 Tier: [Geeks Love Detail]
🌈 $5 Tier: [Arch Toasty][Benedikt][David Martínez Martí]

Steam ImageSteam ImageSteam ImageSteam ImageSteam Image
Devlog 027 - Improving the Simulation

Hey everyone! We got a lot of feedback on the performance on of shapez 2 since the Early Access launch. There are a couple of areas where significant improvements could be made. A portion of these including multithreading will arrive with Update 0.0.9, which is set to go live after a short period on the experimental branch. If you're interesting in being part of this process, be sure to join our Discord to try it right now! For today, Nicko will walk you through how the simulation in shapez 2 currently works and some of the improvements we're working on! It's quite a technical blog, but hopefully the images will help you visualize everything. But first, some news!

News


Steam Awards



The Autumn Sale brought along the annual Steam Awards! Be sure to vote for your favorite games from this year, though we'd like to recommend shapez 2 for no particular reason. You can vote for shapez 2 as many times as you want, in any category besides Labor of Love. The Sit Back and Relax reward is a great fit, alongside Game of the Year of course!

Cast your votes here!


Bundle Sale



We've partnered up with Youthcat Studio and Gamirror Games to bring you the Automation Pipeline Master bundle, giving you a 10% discount on shapez 2 and Dyson Sphere Program! Whether you already own one of the games or still have both of them on your wishlist, you can expand your library and try two different takes on factory building in space. Keep in mind, the 10% bundle discount stacks with any other discounts! During the Autumn Sale, shapez 2 is 25% off, Dyson Sphere Program is 20% off and you get an additional 10% off through the bundle, marking the lowest price yet for both games. The bundle is available until December 4th, 2024! https://store.steampowered.com/bundle/46765/Automation_Pipeline_Master/

Disclaimer


As per usual, everything in this devlog is subject to change and things may end up working out differently than expected! [hr][/hr]

Devlog 027


In shapez 2, the core gameplay is quite simple: The player places a building and then it starts working. However, quite some effort is necessary to make all the buildings that are placed work together as the player expects. Besides the pure functionality of a factory, performance is a key element for shapez 2. The goal has always been to enable the player to build massive factories, in an enjoyable way. From a technical point of view, this means that shapez 2 must be capable of simulation millions of buildings while maintaining a stable framerate and must react fluently when the players make changes to their factories. We will first have a look at the state of development when the shapez 2 Demo was released, then the state of development of the current shapez 2 Early Access version, and finally the improvements with the upcoming 0.0.9 and 0.1.0 release. Lets go!

Past


During the development of the shapez 2 Demo, we focused on precise functionality and a sustainable way to create new buildings quickly. This time was not about scale, but to implement a solid basis which we can easily improve later.

Basics


All buildings are assembled from common components like belts, pipes, and fluid containers. In addition, most buildings also have some custom simulation logic. For example, the Rotator consists of three successive belt lanes. The input lane on the left and the output lane on the right are visualized as conveyors and will just move shapes forward. The processing lane at the center is visualized as a circle. It has a length of zero and does not move the shape. Instead, it contains the custom simulation logic that performs the rotation of the shape.

Connections


Each building also defines input and output connectors. For example, the entry to the Rotators first belt lane is defined as its input connector, and the exit of its last belt lane is defined as its output connector.
Whenever a building is placed, we check if adjacent buildings have compatible connectors at the same edge. If we find a compatible connector, we connect the two buildings.
In the example, the incoming Conveyor on the left will hand over shapes to the Rotator, as soon as they reach the end of the conveyors belt lane. The Rotator will hand over shapes to the outgoing Conveyor when they reach the end of the Rotators output belt lane.

Update Order


When the simulation is updated, it will move forward all shapes on any belt lanes in the factory. To move a shape forward, there must be enough space in front. However, on a full belt, there is no logical space between the shapes, even though we render the shapes with a gap for visual clarity.
In the example, you see five shapes and their respective, logical size. None of the shapes could be moved forward because there no space in front of them. To be able to move the shapes forward anyway, we must update the buildings and their components in the right order. Therefore we start updating at the end and finish updating at the start of a shapes path. This usually means that we move the shapes at the entrance to the Vortex first and the shapes at the Extractors last. For instance, the Conveyor at Rotators output is updated before the Rotator. The Rotator then updates its output, processing, and input lanes - in this order. Finally, the Conveyor at the Rotators input is updated after the Rotator.
With these requirements, we can compute an optimal update order for any setup of buildings.
If you're interested in learning more about our early optimization efforts, be sure to check out Devlog 011! https://steamcommunity.com/games/2162800/announcements/detail/3710460746137286715

Present


During the development of the shapes 2 Early Access version we focused on scale. We had to improve the performance of a running factory and improve the performance when players make changes to their factory. We also had to find solutions for some special requirements. At the release of the shapez 2 Demo, controlling the Belt Launchers and Belt Catchers was one of the biggest issues. Unlike the other buildings, they had to behave differently depending on the 'constellation' the relative positioning of the buildings. Binding the custom simulation logic directly to a building did not work out well in these cases.

Pattern Matching


For the Early Access, we introduced pattern matching to decide which simulation logic is applied to each building. This means, that whenever a building is placed, we can first check the buildings surroundings and then decide on one of multiple available custom simulation logic. We can also aggregate multiple buildings into a single simulation logic. This grants precise control of building behaviors in different constellations and opportunities for performance optimizations. As an example, a Belt Launcher without a corresponding Belt Catcher results in a simulation logic that blocks incoming shapes. A Belt catcher without a corresponding Belt Launcher results in a simulation logic that doesnt do anything. Only a Belt Launcher with a matching Belt Catcher results in a single simulation logic for both buildings together, capable of throwing shapes from one building to the other.
We can also make use of pattern matching to improve performance. For example, we now aggregate all directly connected Conveyors into a single simulation logic. This reduces the required computations dramatically.

Update Graph


Whenever buildings are added or removed, the update order has to be recomputed. This is a very expensive process. So we searched for a way to reduce this effort. For Early Access, we no longer compute the update order directly. Instead, we maintain a directed graph of simulation logic that determines the update order. This is much faster, as we usually only need to attach or detach a single node to the graph. More expensive computations are necessary only when the player makes big changes to the graph, like placing a big blueprint.
In the example, you can see how the connections between the simulation logic of of all placed buildings create a graph.

Clusters


Another benefit of a graph is that we can identify isolated subgraphs. These are parts of the graph that are not connected to other parts of the graph.
In the example, you can see that the Update Graph consists of three isolated subgraphs (blue, red, and green). To visualize a subgraph while playing, select a building and press the Select Connected hotkey O. For shapez 2, we move these subgraphs into structures we call clusters. We can benefit from these Clusters in multiple ways. First, even if we need to recompute an Update Order completely, we only need to do it for one cluster ignoring all other clusters. This especially improves the flow of the game when you place bigger blueprints. We can now also define an individual update behavior for each single cluster. Update Frequency Before introducing the clusters, we updated each simulation logic in every frame.
With the introduction of clusters, we dont do this anymore. Clusters that are far away receive an update only every few frames. And clusters that are out of view are updated only three times per second.
During the endgame of shapez 2, players currently easily place up to 500.000 buildings in their factories, resulting in several thousand clusters. Only the handful of buildings in view must be updated every frame, allowing the Early Access version to support about 20 times bigger factories than in the Demo version.

Future


Heading towards shapez 2 Update 1, we will further improve the performance of the game to finally support truly massive factories. The 0.0.9 release set to come very soon will give you a taste of the future scale of shapez 2. Here are some of the things included in the update: In the general settings menu, you will find two additional settings in the simulation section that enable new performance features.

Simulation Threads


Clusters dont interfere with other clusters during their update. This means we can make use of all available CPU cores and update multiple clusters at the same time.
In the example above, you can see how using a second core already improves the simulation performance by 100%. Depending on your hardware and the number of other processes running on your computer while playing shapez 2, this can speed up the simulation update by up to 2000%. AMD CPUs especially should see big improvements, as they tend to have a lot of cores. Again, join our Discord if you'd like to try this update earlier ;)

Parallel Rendering


During the games update loop, we need to do several things. By far the most expensive are the simulation update and the rendering.
Already during the development of the shapez 2 Demo, we decoupled the actual rendering from the gathering of all the information for the rendering. Therefore, the rendering is already decoupled from the simulation update. This made it a relatively small step to do the simulation update in parallel to the rendering. Depending on your hardware setup, this may double your performance as well.
[hr][/hr] We hope you enjoyed this devlog and maybe even learned something new! Soon, some of these changes will go live and hopefully give you a significant boost in performance. See you then! ~ Nicko & the shapez 2 Team

Join the community:


Discord Reddit Suggestions Portal X / Twitter YouTube https://store.steampowered.com/app/2162800/shapez_2/


[ 2024-11-28 15:30:41 CET ] [ Original post ]

shapez 2
tobspr Games Developer
tobspr Games Publisher
Coming soon Release
GameBillet: 19.99 €
Game News Posts: 46
🎹🖱️Keyboard + Mouse
Overwhelmingly Positive (7837 reviews)
Public Linux Depots:
  • [0 B]


shapez 2 is supposed to be the long-awaited sequel to the original shapez - an automation, management & factory-building game currently available on Steam - built for audiences both new and old.

Our aim with shapez 2 would be to create a worthy successor to our original title - one which has a much higher production value, more content, better replayability and, crucially, looks more visually pleasing - this means that we’d like to include many more features for you… And we’ve outlined some of our ideas below!

Though we're still working on the prototype, we've got a solid vision of how the game could look - one that we'd love to share with you and get your feedback on. We would also like to point out that funding for shapez 2 isn’t yet fully secured - so whilst we’ll do our best to see this project through to completion, the outline below is our vision for our ideal game, rather than a set of specific promises.

Gameplay Overview

The goal of shapez 2 is to build, automate, and scale your factory in order to process increasing numbers, types, and colours of shapes! You’d be building machines, placing conveyor belts, and designing vast networks in order to transport your goods. Whilst to begin with you’d be focused on extracting pure shapes from the ground, you would soon discover a vast array of colours - unlocking an even vaster number of combinations... And, well, then the fun begins.

All sounding a bit familiar? Don’t worry, we plan to shake things up a bit this time… As you’ll see below.

2D + 3D

shapez 2 will, by default, have a 3D view. However - we know how crucial being able to build efficiently is, so you will be able to seamlessly toggle between 2D and 3D!

Layers

Complementing our new 3D view, shapez 2 will also feature multiple layers! Whilst in shapez there was only one additional layer (the wires layer), shapez 2 will provide players with up to 3 layers to switch between. You'll be able to place buildings, conveyor belts, and wires on each of them! (And, don't worry if you like to keep things simple - the additional layers are completely optional!)

View into the machines

Whilst shapez only had ‘closed' buildings (which could sometimes make it difficult to see what was going on!), in shapez 2, all buildings are ‘open' - allowing you to see exactly how your shapes are being processed! This is a big one for us - and we're hoping it'll make it easier for new players to get into the game. It'll be a much more visual process!

New engine, better performance, better accuracy

We're writing shapez 2 completely from scratch in an entirely new engine! This'll allow us to maximise performance (using all available cores & GPU power), leading to vastly improved performance, even with our new 3D visuals. (It's actually insane to us how many different buildings shapez could handle, considering it's basically a website!)

Islands

shapez had a very uniform map (which severely limited exploration) - and that's something that we wanted to change this time. In shapez 2 space will no longer be unlimited - instead you need to craft islands to expand your base!

This feature works well with our next one… Mass Transport!

Mass Transport

With the addition of new biomes, you'll be needing new infrastructure to transport your resources over long distances! In shapez 2, there will be a mass transport feature unlockable through the research tree. (More on that later!)

Whilst these may not look exactly like trains, they'll behave in a very similar way!

Pipes & Fluids

Another new addition for shapez 2 - pipes! Not only will there be a number of new fluids, but colors will be fluids rather than being transported on a belt. (Not to worry, though - you'll still be able to package them on belts with a new building that we're introducing!)

Research Tree

On the topic of replayability, we're introducing a new research tree - featuring a number of branches designed to make progress less linear! Whilst there will still be a main branch (i.e. cutters, rotators, pipes, stackers), there will be additional sub-branches, allowing you to focus on each of the available buildings and unlock upgrades for them (for example, the 180-degrees rotator is an available upgrade after unlocking the default rotator. You don't have to unlock it, but if it looks useful to you, go for it!)

Blueprint Library

This was a feature that was actually planned for shapez, but sadly never made it into the original game. We'll fix this in shapez 2 by adding a complete blueprint library, as well as the ability to load/share blueprints easily!

... and more:

  • Modding support
  • New shape mechanics
  • Multiple game modes
  • Customizable game creation
  • All-new soundtrack

MINIMAL SETUP
  • Processor: 3Ghz+ dual coreMemory: 4 GB RAM
  • Memory: 4 GB RAM
  • Graphics: DirectX 10.1 capable GPU wit 1024 MB VRAM
  • Storage: 2000 MB available space
RECOMMENDED SETUP
  • Processor: 3Ghz+ quad coreMemory: 8 GB RAM
  • Memory: 8 GB RAM
  • Graphics: DirectX 11 capable GPU with 2048 MB VRAM
  • Storage: 2000 MB available space
GAMEBILLET

[ 6086 ]

42.46$ (15%)
19.49$ (35%)
4.12$ (17%)
10.91$ (16%)
24.87$ (17%)
17.50$ (65%)
1.33$ (87%)
1.67$ (83%)
11.04$ (15%)
10.79$ (10%)
2.52$ (83%)
5.11$ (83%)
32.78$ (18%)
4.00$ (80%)
3.50$ (50%)
6.69$ (33%)
9.87$ (67%)
13.21$ (17%)
7.69$ (45%)
6.79$ (15%)
33.99$ (15%)
14.21$ (29%)
13.79$ (8%)
9.00$ (70%)
0.71$ (28%)
24.98$ (17%)
5.11$ (66%)
4.97$ (17%)
12.50$ (50%)
35.99$ (10%)
GAMERSGATE

[ 3241 ]

5.6$ (49%)
16.0$ (60%)
4.25$ (79%)
11.99$ (40%)
6.6$ (78%)
0.87$ (71%)
7.65$ (74%)
1.32$ (91%)
5.0$ (75%)
4.25$ (83%)
4.5$ (85%)
6.25$ (75%)
3.75$ (75%)
2.04$ (83%)
0.85$ (83%)
0.85$ (83%)
11.52$ (62%)
5.0$ (90%)
0.88$ (91%)
4.95$ (67%)
10.79$ (46%)
21.59$ (28%)
13.5$ (77%)
20.0$ (50%)
7.5$ (75%)
7.92$ (74%)
14.99$ (50%)
10.03$ (67%)
1.25$ (75%)
5.0$ (75%)

FANATICAL BUNDLES

Time left:

7 days, 21 hours, 2 minutes


Time left:

13 days, 21 hours, 2 minutes


Time left:

10 days, 21 hours, 2 minutes


Time left:

10 days, 21 hours, 2 minutes


Time left:

10 days, 21 hours, 2 minutes


Time left:

10 days, 21 hours, 2 minutes


Time left:

10 days, 21 hours, 2 minutes


Time left:

10 days, 21 hours, 2 minutes


Time left:

10 days, 21 hours, 2 minutes


Time left:

10 days, 21 hours, 2 minutes


Time left:

10 days, 21 hours, 2 minutes


Time left:

10 days, 21 hours, 2 minutes


Time left:

10 days, 21 hours, 2 minutes


Time left:

10 days, 21 hours, 2 minutes


Time left:

10 days, 21 hours, 2 minutes


Time left:

35 days, 21 hours, 2 minutes


Time left:

15 days, 21 hours, 2 minutes


Time left:

7 days, 21 hours, 2 minutes


Time left:

42 days, 21 hours, 2 minutes


Time left:

31 days, 21 hours, 2 minutes


Time left:

28 days, 21 hours, 2 minutes


Time left:

36 days, 21 hours, 2 minutes


Time left:

38 days, 21 hours, 2 minutes


HUMBLE BUNDLES

Time left:

2 days, 15 hours, 2 minutes


Time left:

16 days, 15 hours, 2 minutes

by buying games/dlcs from affiliate links you are supporting tuxDB
🔴 LIVE