News about the Unity engine and project showcases from Reddit. Made possible with @reddit2telegram (@r_channels).
I've made a hand-drawn folk horror game launching in 20 days
https://www.youtube.com/watch?v=_oz5y2Qs6lQ&
https://redd.it/1c0q3ug
@r_Unity3D
From the devs of Odin Inspector: announcing PanGui, an upcoming data-oriented UI library for Unity and beyond, with a focus on simplicity, performance and expressive power
https://pangui.io
https://redd.it/1c0o19m
@r_Unity3D
everyone, but if you're struggling with modding in your DOTS game, feel free to ask for clarification.
I've rambled long enough, but I'm happy to answer any questions you might have!
https://redd.it/1c0olwd
@r_Unity3D
My fully DOTS-based game, Final Factory, is finally out after nearly 6 years of development
I've been developing Final Factory, an automation game inspired by Factorio and Cosmoteer, since 2018. In late 2019, I converted the game to Unity's Data-Oriented Technology Stack (DOTS) to take advantage of the significant performance benefits it offers. Having used DOTS almost since its inception, I've seen it evolve and have successfully built a massive automation game with the framework.
In Final Factory, players can construct huge factories, design spaceships, and explore a practically infinite procedurally generated map.
If you're interested, check out the trailer and additional info on the Steam store page: https://store.steampowered.com/app/1383150/Final\_Factory/
As someone who has extensive experience with DOTS, I wanted to share my thoughts and insights. Feel free to ask me any questions in the comments!
DOTS General Impressions
For average game developers aiming to create highly performant games with numerous entities, DOTS is a game-changer. While it has its quirks, especially when it comes to baking, I haven't come across an easier way to develop large-scale, performant games. The main alternatives are writing the game in native C++ or performing wizardry on the GPU, as the developers of Dyson Sphere Program have done.
The Positives
Multi-threading, the Burst Compiler, and the Job System
Unity's jobs and multi-threading support is incredible. It allows developers to easily write parallel jobs while preventing most common pitfalls. This is a godsend for factory games, where parallelization can be applied to many tasks. Without these features, achieving the necessary scale for an automation game would have been impossible. It's worth noting that Factorio's developers wrote their own engine and kept most of the game single-threaded, which is a remarkable technical feat.
The Burst Compiler effectively addresses C#'s inherent slowness compared to native languages like C++. While not perfect, it's a practical solution that average developers can leverage without getting lost in the complexities of C++ development.
Entity Component System (ECS)
Transitioning from object-oriented programming (OOP) to ECS requires a shift in thinking, but once you grasp the concepts, it offers a simpler and better-organized approach compared to the average OOP codebase. Although the level of abstraction achievable in OOP can be missed at times, ECS architecture excels at organizing code and designing game logic, especially for factory games with numerous entities requiring processing. It encourages modularization of game behavior into discrete systems.
However, ECS is not a one-size-fits-all solution and its effectiveness may vary depending on the type of game you're developing. For games with numerous entities that need processing, it works exceptionally well.
Challenges Faced
ECS Pitfalls
While ECS is excellent for organizing code, misusing it can lead to confusion. In my early years of ECS development, I was overly diligent in modularizing systems into small jobs. This led to numerous race conditions arising from entities being constantly deleted or modified by command buffers. One job might modify an entity in a command buffer, requiring the completion of said buffer before another job could properly use that entity and its data.
This issue caused some code spaghetti in the form of custom system groups with special sync points, allowing me to perform logic across a frame while knowing when command buffers had finished executing. It also led to situations where certain operations fundamentally required multiple systems to run. For example, when placing an item in Final Factory, several systems must calculate the item's connections to other structures, update the power grid, and modify connector groups. Thus, for an item to be considered fully placed on the map, many systems need to run.
Similarly, when an object is removed, the
Experimenting with variation is a joy isn't it!
https://redd.it/1c0kpel
@r_Unity3D
Finally I can say after 3 years of developing Pre Dusk solo my first game ever is really really close to be released. in the next days I will announce the release date
https://redd.it/1c0k11k
@r_Unity3D
Inconsistent Cell Posistioning
Hello, I am loosely following a tutorial series on youtube mainly to learn how to make tiles in a grid interactable to allow for farming the ground. But to put it simply sometimes when pressing space to interact the tile that gets changed is spot onto the players position and then other times it seems to be an entire cell off in one direction or another. This seems to depend on where the player is standing in the screen as I have a static camera (and I also tried it with the camera moving with the player). for example in the top right region the cells are changed almost exactly where the player is standing but in the bottom half of the screen they are off and the further down and to the left I go the further off the cell that gets changed appears.
if reference to the video would help let me know, if code would help I can do that too. But if anyone knows what might be causing this issue please let me know, I appreciate the help.
https://redd.it/1c0hiv6
@r_Unity3D
Extension Methods Tutorial
https://youtu.be/0PvliJ1cavY?si=Bi7BViKAhyuvMsy8
https://redd.it/1c0g09t
@r_Unity3D
"Animating" a chest
Hi guys, i'm new to unity and i'd like to implement a chest in my game, the chest has 3 states: closed, player nearby, and opened.
Each state has a different sprite i'd like to use, but here's my problem : I've only learned how to manage sprites with animations and the different states of the animation automaton, is it overkill/unnecessary to use that to give life to my chest ? Or is it the common way people does it ?
https://redd.it/1c0dezl
@r_Unity3D
Just published a new asset pack for GB Studio, free to download. Enjoy!
https://the-pixel-nook.itch.io/gb-studio-indoor-platformer-tiles
https://redd.it/1c07whf
@r_Unity3D
ELI5: Isn't Unity ALREADY an entity component system?
The answer to this question must be very obvious because I can't seem to find it anywhere.
I'm reading about ECS (not Unity-specific, just ECS in general), and everything I'm seeing describes how Unity regularly operates. Entities (game objects) are made of components (scripts) that define how they are operated on by systems (the game engine).
So what is it that makes Unity's ECS system is such a sea change? How is it different from how Unity is already set up by default? Is it a more "pure" form of ECS because entities are not supposed to perform logic?
https://redd.it/1c00tdr
@r_Unity3D
A literal asset flip game
https://redd.it/1bzxrcy
@r_Unity3D
Pixel Flickering problem - Hi! I tried looking out on unity guidelines and other posts, but couldn't find the solutions to the problem I am facing. The resolution of my game gets messed up if I choose to distance the main camera from my player object. I also tried pixel perfect camera.
https://redd.it/1bzxeuy
@r_Unity3D
Рleased to introduce you to our incredible character. Our team is always looking forward to your feedback.
https://redd.it/1bzszgs
@r_Unity3D
Multiplayer game vulnerabilities
https://youtu.be/3LZ8BWzhsrI
https://redd.it/1bzslqn
@r_Unity3D
is there a way I can make my particles rotate AROUND a game object?, they currently look like image 1 and I want them to look like image 2, thanks
https://redd.it/1c0weto
@r_Unity3D
2D Sekiro Parry Inspired Game
Hi! I'm working on a 2D Pixel Art Action Adventure samurai game inspired by Sekiro with parry mechanics!
Follow me on Twitter for Updates https://twitter.com/aayodev
https://preview.redd.it/mqe2bih6cotc1.png?width=600&format=png&auto=webp&s=6318c0df9514b55426cf712d73d7a4e1d4bd0ca2
https://redd.it/1c0oy5m
@r_Unity3D
same systems must run again to properly recalculate power and connections for the remaining structures. In OOP or a purely functional framework, you would ideally call every function synchronously to invoke all the necessary behavior for placing or deleting a structure. However, in ECS/Jobs, this logic can be spread across multiple jobs within a frame or even across multiple frames, leading to bugs and hard-to-understand code.
It's crucial to recognize when you're encountering these issues. Most operations in your game are not bottlenecks, so writing tiny jobs that avoid lookups isn't always necessary. Only do this when absolutely needed! Otherwise, you'll find yourself in race condition hell, as I've described.
TL:DR: keep system groups, job dependencies, and sync points to a minimum. Identify the real hotpaths in your code and optimize those into small, specialized jobs that use minimal lookups.
Animations
In Final Factory, I had to develop my own animation solution since DOTS lacked a native one. I created custom animator components and systems that perform simple actions like rotation, scaling, and lerping over a distance to animate the factory.
Local To World System
Pushing DOTS to its limits in Final Factory required us to fork Unity's LocalToWorld system and modify it slightly to exclude entities that don't need updating in a given frame. Similar to Factorio, Final Factory uses a chunk system to determine when things should be active, saving on performance. Unity's LocalToWorld system struggles with large factories, so we added logic to prevent LTW from running on entities in disabled chunks. I wish this was a native feature in DOTS (Unity devs, if you're reading this, take note!).
Physics
To avoid putting colliders on everything, we used a k-nearest neighbors (KNN) algorithm. Although Unity's Burst-compiled physics is fast and works well for many entities, the nature of combat in Final Factory (massive fleets, numerous projectiles) made it infeasible to put a collider on every ship. We opted for KNN early in development.
Once again, I would love to see a native chunk system in Unity Physics that allows disabling large portions of the map that don't need processing.
Content Pipeline and Modding
The baking framework makes implementing a content pipeline for a game like Final Factory quite confusing. You can't easily load game objects as prefabs at runtime; instead, you must create bakers to convert game objects to entities at baking time. This was particularly confusing when Entities .50 was released, and few people had experience with it. My content pipeline implementation is too complex to cover here, but if there's interest, I can provide further explanations in the comments.
Modding was also incredibly challenging to figure out. We created a mod template project with all the necessary dependencies, which people can use to build mods: https://github.com/bryding/FinalFactoryModTemplate
The most difficult aspect was determining how to allow people to add new items to the game. Adding systems is straightforward: write your system, build it, and our mod loader will load the DLL when the game starts, allowing Unity to detect the new system.
However, adding items is different. The basic approach is to provide modders with a struct containing essential game config that they should populate. Modders can then create game object prefabs and place them in asset bundles, which will be picked up when building the mod using the template. The asset bundles are specified by their names (models, icons, etc.), and our mod loader detects them, pumps them through our asset creation pipeline, builds the associated entity at runtime using the asset bundle with special code that mimics creating entities at runtime using game objects (similar to the pre-Entities .50 conversion logic), and adds the newly created entity "prefab" to the set of other items as if it were part of the base game.
I realize this might be confusing and may not apply to
How would I create a connected, dynamic structure in a Tilemap as seen here in Celeste?
https://redd.it/1c0nn8h
@r_Unity3D
I made a dice roll mechanic using Unity physics and some math
https://redd.it/1c0iymn
@r_Unity3D
Spine animation in Unity
I have made several assets in spine 2d and put them in a scene in Unity. All the assets I made have several animations (idle, opening, closing etc...) How do I make them switch between animations in unity?
Thanks.
https://redd.it/1c0hs5v
@r_Unity3D
1st dev project!
Hi all, I was looking to see if anyone could provide feedback on the first clip of my game. I'm currently in the Unity Learn camp, in the Junior Programmer course. The floor tiles are not what will be in the game, I just finished working on the movement scripts the last couple of days. Sorry I don't have more to share, this is my first official project and I am loving the process so far. https://youtu.be/D8kxS4eZxJI
https://redd.it/1c0eajp
@r_Unity3D
My 2D skateboarding game
https://m.youtube.com/watch?v=2XPtPVkaGI8&pp=ygUaaGlsbCBzbGlkZSBza2F0ZSBhZHZlbnR1cmU%3D
https://redd.it/1c03ywe
@r_Unity3D
First Unity Game Published: Forge Fusion
Hi, guys can you please try my first unity game published on Google play. And also please give a feedback if possible.
Also can I try your games and I'd loved to give it a try and give a feedback!
Forge Fusion: Google Play
https://redd.it/1c07yis
@r_Unity3D
I just published Major Marble on Steam! It's a game where you must complete puzzles or create your own crazy courses...
https://redd.it/1bzy9s1
@r_Unity3D
Vroom back to the N64 era in a parkour skilled taxi - 'Yellow Taxi Goes Vroom' is out today!🚕💨
https://redd.it/1bzy0ez
@r_Unity3D
I released a free tool that allows you to edit directly inside Unity the colors of a texture atlas used by Low Poly models. It can turn hours of work into minutes by eliminating the need to import/export a flat color texture to/from Photoshop
https://redd.it/1bzl1s1
@r_Unity3D
I'm making a 2.5D tactical roguelike called Mystical Tactics. The demo is available!
https://redd.it/1bzrbnf
@r_Unity3D
Look, completely reworked the monster, what do you think?
https://redd.it/1bznhj6
@r_Unity3D