r/rust_gamedev • u/Houtamelo • Nov 12 '24
r/rust_gamedev • u/galic1987 • Jun 01 '25
An Open Source Rust Game Server for Massive Scale!
Hey fellow Rust gamedevs!
The Trebuchet Network is inviting collaborators to the 2power4 initiative – an ambitious open-source project to engineer a game server capable of handling 10,000+ concurrent entities at a sustained 60 FPS!
At the heart of this is massive_game_server (https://github.com/TrebuchetNetwork/massive_game_server), a 2D shooter server built with Rust, Tokio, WebRTC, and FlatBuffers. It's designed for scalability with concepts like AOI and sharding, but we're looking for skilled Rustaceans to help us truly push its limits and explore what's possible.
The Vision: To create foundational open-source technology for next-generation human experiences, from massive historical recreations to complex scientific simulations with thousands of interactive participants.
Current Performance Insights & Engineering Challenges:
Our initial tests with hundreds of bots show exciting potential but also clear bottlenecks in areas like AI processing and state synchronization under heavy load.
We're aiming to optimize for high-core count CPUs (like a 96-core Threadripper PRO 7995WX) and high-bandwidth networking.
Why This is a Great Opportunity for Rust Developers:
Deep Rust Performance Work: Dive into optimizing async Tokio tasks, leveraging Rust's powerful concurrency features, enhancing data structures for cache efficiency, and profiling for microsecond gains.
Real-World Networking at Scale: Refine WebRTC data channel usage and FlatBuffer serialization strategies for massive throughput.
Advanced Systems Architecture: Contribute to player sharding, world partitioning, spatial indexing, and innovative AOI systems – all in Rust.
Build a Landmark Open Source Project: Make your mark on a project aiming to redefine massive multiplayer capabilities.
How to Get Involved & Contribute:
Explore the Codebase: Dive into
massive_game_serveron GitHub:https://github.com/TrebuchetNetwork/massive_game_serverCheck out the
README.mdandCONTRIBUTING.md(once available) for project structure and contribution guidelines.Look for Issues: We'll be tagging issues suitable for new contributors and areas needing expert attention.
Propose Ideas: Have thoughts on architecture, algorithms, or specific optimizations? Open an issue or start a discussion!
We're looking for Rust developers who are passionate about performance, distributed systems, and the future of interactive online experiences.
Join us in pushing Rust gamedev to an unprecedented scale!
Questions? Ideas? Let's discuss in the comments!
r/rust_gamedev • u/devguyrun • Jul 20 '24
Don't want to ECS pattern, suggest another framework
please don't suggest Bevy, ECS is really overkill for most amateurs and frankly i don't care for it.
i have used GGEZ in the past with some success (3d first person shooter, traditional arcade games etc). i took few years off but now i see it's no longer maintained.
i don't care about ECS, but still want to use Rust, what's the latest in the non-hyped up world of non-ECS frameworks, and where is the GGEZ dude, i love his code.
r/rust_gamedev • u/KadiemHQ • Nov 16 '24
question Is it possible to develop a game without GUI?
I’m not a game developer (I did some game development as a hobby before), but I don’t understand why developing a user interface is not a priority for the Bevy team?
Is it possible to develop a full game (serious game, not as a hobby) without an editor?
r/rust_gamedev • u/Dereference_operator • Oct 28 '23
question Why Rust isn't taking over C++ ?
Why Rust isn't taking over C++ if it's far superior and better ? I don't mean just for game programming for os programming or ms office photoshop kind of applications programming or even NASA like etc Can you explain why Rust isn't getting more popular than C++ ?
Also do you believe it would be possible today to create a AAA game studio with just Rust and open source software like Blender and Linux (without windows or vm's) or the artist will need or cry for Photoshop and the rest of the adobe suite ??? or things will take too long or we will lack drivers for drawing tools like pen tablets ?
r/rust_gamedev • u/Rusty_Cog • Apr 07 '23
How game-dev-s debug rust?
I don't understand how can there exist some things like game engines, webservers, and who knows what given that rust's debug experience is still horrible.
On windows 10 even with trivial programs the moment I have non-trivial types (under trivial I mean i32) code-lldb is unable to show anything meaningful in the variable window, it's all just giberish.
How do you game-dev-s debug?
EDIT:
By updating via rustup update I am now getting some sensible variable state info in vscode's code-lldb extension. Unfortunately, the "locals" sub-window of the variable window does not work always. If you want to get the value of a variable at a given source-line then if you put the breakpoint onto that exact position, you will probably get it. If you get to that source-position from a sooner breakpoint, for example from an inner loop, then you probably won't get the state of the variable.
I wanted to comment on some of the comments posted here till now: I don't really consider using the dbg! macro a solution, or any kind of println debugging. And I understand and accept that especially in game-dev visualization based analysis can be much-more useful than staring and variable values, but again it is not really a replacement because in certain scenarios I would still want to checkout the states.
r/rust_gamedev • u/Animats • Apr 23 '26
Yet another stalled Rust renderer project - Renderling
I'm a user of renderers; I don't write them. I have a virtual world client that needs one. First I used Rend3, which was abandoned. I had high hopes for Renderling. But, at the three year point, it seems to have run into the problems that killed Rend3, Three and Orbit. Everybody does My First Renderer, gets to the hard parts, then gets stuck.
As with Rend3, the author is more interested in the lower levels. So the Renderling author is off writing a shader compiler. He also got into doing his own the 2D GUI, another classic time sink. His roadmap shows that the next step is something to assist with moving data in bulk from CPU to GPU. Maybe in 2027 he might get back to the renderer level.
This job appears to be too big for one person. I had real hope for Renderling. That guy has EU funding. He does good work. But it's not the work that gets the renderer done. The Rend3 guy was good, too. He moved down to the WGPU level.
Some of this problem is architectural. A standalone renderer, without its own game engine, is hard. It doesn't own the scene graph, but sometimes needs to be able to query it, or cache some parts of it. Without that, shadow and occlusion processing are too slow and don't scale. It has to provide concurrent GPU content updating. But that's only meaningful with the right API. You don't hit the architectural problems until you have a working My First Renderer. Then it's too late to build a high-performance renderer.
Some people have questioned whether a standalone renderer, separate from a game engine that owns the scene graph, is a good idea, or even possible. This is a tough layering problem - application->renderer->glue layer (WGPU/vulcano)->GPU interface (Vulkan, Metal, DX, even OpenGL). Where the cut points should be for safe Rust is not obvious. Cut at the wrong places and you hit a performance wall.
This may kill my Sharpview project, for which I need a fast multi-threaded renderer. I'm stuck with trying to maintain a fork of Rend3 despite WGPU churn, I don't have time, and it's never going to load assets fully concurrently without major work.
Six years, and there's still no good Rust renderer for big dynamic scenes. Bevy is good, but doesn't address the big-world problem, for which you need to get the content loading off the main thread and use a separate transfer queue to the GPU.
I probably should have used C++.
r/rust_gamedev • u/Dereference_operator • Nov 05 '23
question Do you believe it's possible to create a 3d engine like Unreal 5 alone or just the renderer part of it without all the toolings around it today ?
Do you believe it's possible to create a 3d engine like Unreal 5 alone or just the renderer part of it without all the toolings around it today ? mean like creating a 3d room like a 3d shooter with all the knowledge you could have in 3d graphics like water reflections, light, collision, sound, animation, raytracing and so on and so forth etc or it's just too much for 1 person to create as a portfolio ? I am asking this because Carmack did it in the 90's with Sweeney's too and other people, are things that much more complicated today that you have to write 10x the code for the same thing or it's a different kind of optimization ? Can you explain to me why a big company like CDProjekt would switch to unreal when they had already a amazing engine with Wither 3, CyberPunk etc isn't optimal sometimes to have or develop your own engine for your own games even for AAA ?
r/rust_gamedev • u/Animats • Nov 03 '24
WGPU 21% performance drop.
Trouble over in WGPU land. Between WGPU 0.20 (which became WGPU 20.0 in a version bump) and WGPU 22, frame rate on a large test scene benchmark dropped 23%. WGPU 23 improved things a bit, and performance is now down only 21%. Plus, there's a lot more jank - there are slow frames for no visible reason. I have public benchmarks to demonstrate this, linked in the WGPU issue.
There's been so much churn inside WGPU that's it's hard to isolate the problem. WGPU has lots of breaking changes, which required changes to egui, epaint, rend3, and wgpu-profiler. This makes it very tough to isolate the problem. Just getting everything to run again after a WGPU breaking change takes a week or so while all the other projects catch up.
I'm starting to think that the problem is that WGPU comes from web dev. It's "Web GPU" after all. In web dev, change is good. Push to production daily, if not more often. Agile! Features first! "Move fast and break things".
In web dev, it's normal for web sites to get bigger, fatter, and slower, sometimes by an order of magnitude over a decade. Most web pages do so little real work compared to what modern computers can do that this is not a killer problem. 3D graphics doesn't have that kind of resource headroom. Serious 3D game dev is usually up against the limits of the graphic system.
In graphics libraries, change is usually cautious. OpenGL is a formal standard, over 30 years old, and programs written long ago will still run. New features are added as formal extensions. Vulkan is a formal standard, only 9 years old, but has been mostly stable for the last 5. New features are added as extensions, not breaking changes. WebGPU, the API spec WGPU tries to follow, has a working draft of a standard, but in practice seems to be whatever Google decides to put in Chrome. (Mozilla plays catchup.) Names and parameters change a little in each release.
WGPU targets WebAssembly, Android, Direct-X 12, OpenGL, Vulkan, and Metal. So it can be used everywhere except consoles. This sucks the air out of competing projects with less breadth, such as Vulkano. Vulkano has few projects using it. As a result, there's not currently a high performance, stable alternative to WPGU for game dev. We have to build on shifting sand.
Every month or two, another major game project abandons Rust. The web dev mindset applied to high-performance 3D graphics may not be working out.
(I've spent the last month dealing with WGPU-induced churn. Zero progress on my own work.)
Comments?
r/rust_gamedev • u/Fastenough2 • Dec 28 '25
I developed a GPU-accelerated Turkish Programming Language and IDE from scratch using Rust and WebGPU (WGSL) :)
Hi everyone,
I'm sharing TürkçeKod, a project that started as a hobby but evolved into a full programming language with its own tensor engine. Unlike common Python wrappers, I wrote the engine from scratch using Rust and WebGPU.
Technical Features:
Custom Syntax: Since this is a localized project, it uses Turkish keywords like
yaz(print),eğer(if),matris(matrix), andcapraz_entropi(cross_entropy).WebGPU & WGSL: Matrix multiplications and activation functions (GELU, ReLU) run directly on the GPU via compute shaders for high performance.
Autograd Engine: I manually implemented an automatic differentiation (backpropagation) mechanism similar to PyTorch.
Integrated IDE: Built with
egui, allowing users to write code and see outputs/visual widgets instantly within the interface.
Status: The project is in the Pre-alpha stage. Naturally, there are bugs, and some parts (especially broadcast operations) are still being refined. It is fully open source (GPL v3.0).
If you'd like to try it out or contribute (or just inspect the Rust/WGSL code), here is the repo:
https://github.com/qweewq1888pop-a11y/Turkce-KOD-rust-ile-yap-ld-.git
r/rust_gamedev • u/IamRustyRust • Apr 16 '26
Hardware Reality of Quaternions
Rotating 3D objects in game engines has always been a math-heavy process. In the Initially, using Euler angles (Pitch, Yaw, Roll) seems easy, but we must strictly reject them. Their biggest flaw is Gimbal Lock a condition where your rotation axis collapses and the entire math breaks. After rejecting Eulars cause of this failure, an engine architect is left with only two hardcore ways to handle rotations: Quaternions and Rotation Matrices. The Quaternion (which is king of Rotation fro me), are preferred because it's math formula is flexible, Gimbal-lock safe, and it can be made cache-friendly. But on the other hand, the standard 3D math and rendering world runs by default on Rotation Matrices. The problem is that when you put these matrices into real-time physics and high-performance computation, then a new engineering horror starts.
This engineering horror first comes forward in the form of Non-Orthogonal Drift. In a rotation matrix there should always be three orthogonal axes means all axis should be on 90 degrees. When floating-point math is repeatedly multiplied in the entire frame, then due to rounding errors those axes do not remain at strictly 90 degrees. The result is this that your perfectly square character starts looking squashed or distorted or like a skewed box. To fix this drift Re-orthogonalization is needed. The new object became skewed, now the CPU will have to stop the game and make that matrix straight again with math. This CPU Penalty makes the game slow, especially then when you have 1000 objects on the screen.
This overhead of math is only half the story. The real bottleneck is hit then when the CPU has to read the data of these 1000 objects from memory and after fixing write it back, because from the perspective of memory a matrix is very heavy. Think, a standard 3x3 (f32) rotation matrix takes 36 bytes (288 bits). But in reality for the entire mathematical rotation the matrix is only 3x3, whereas in Game Engines we always use a 4x4 Matrix, so that along with rotation in that matrix Translation (movement) and Scaling (size change) can also be saved. Its total size becomes 64 Bytes. This is that very number which fits in an L1 Cache line and blocks the CPU bandwidth. Hearing this it feels like okay, a 64-byte matrix will perfectly fit into the 64-byte cache line of the CPU, so what is the problem in this? The problem is this that in engineering when the size of any data becomes exactly equal to the memory container, then the margin of error becomes absolutely zero.
If the starting address of this matrix in memory is not precise (aligned), then this perfect fit suddenly becomes a hardware nightmare. Understand this with the example of a bare-metal memory address: suppose the first Cache Line of the CPU is from address 0 to 63, and the second Cache Line is from 64 to 127. If your entire 64-byte matrix is perfectly aligned (means it starts from address 0), then it will fit inside 0 to 63 in a single shot. But if the memory allocator shifts it even a little bit and starts it from address 16, then the data will cross the boundary. Result? The initial 48 bytes of the matrix will remain in the first cache line, and the remaining 16 bytes will spill and go into the second cache line. To process this unaligned data now the hardware has to pick up two separate cache lines in a single fetch and stitch them. If you are using SIMD instructions, then upon not having strict alignment either the CPU will straight give a Segmentation Fault (crash), or if you used an unaligned load instruction (movups), then the pipeline will stall and the load latency will double. And if by mistake this unaligned data crossed a 4KB Page Boundary, then a TLB miss will trigger and the CPU will have to do a page walk which can literally drop your speed up to 100x.
After this battle of cache lines, when the data comes inside the CPU core for final execution, then another limit of hardware is hit: Registers. We have XMM registers which are only 128-bit wide. This directly means that in a single register only 4 floating-point values can come. When you sit to process a 4x4 matrix with 16 values, then you will have to do messy loading between multiple registers, which makes the pipeline slow.
On the other hand, how clean and fast Quaternion is in memory, this in itself is a masterstroke. In a Quaternion the range is absolutely precise: [w, x, y, z] together make 4 floats, and its size is exactly 16 Bytes. This very compact size saves us memory fetch. With this we avoid Gimbal lock anyway, but also use the L1 Cache very efficiently. In reality, the entire [w, x, y, z] (all 16 bytes) is a Native Hardware Fit. Modern CPUs have 128-bit registers (like SSE registers XMM in Intel, or NEON registers Q in ARM). Because 4 floats multiplied by 4 bytes = 16 bytes, and 16 bytes are exactly 128 bits. This directly means that the CPU in a single instruction can load the entire quaternion into the register and multiply it. Therefore its math is much faster than the Matrix.
But here is a very big catch. The perfect loading of data in the register is only an advantage of storage and bandwidth, but when it comes to computation like doing quaternion multiplication (qvq-1 - The Sandwich Approach) to rotate a 3D vector then the game changes. For multiplication the hardware has to do cross and dot multiply of w, x, y, and z among themselves. And right here memory layout becomes our biggest obstacle. When you fetch XYZ values, then hopping has to be done in memory because the data is in Rows (which we call AoS layout). You will do branchless programming by using SIMD, but if you started Horizontal processing (data manipulation inside a single register), then its overhead will be so high that the purpose of using SIMD itself will be finished. To solve real-time physics we have a window of only 2ms. There is only one way to hit this frame rate: ending the overhead of shuffling and aligning the data through swizzling in such a way that it can stream straight into the registers.
Efficient data alignment and SIMD execution itself is that bar which separates an average engine from a high-performance bare-metal engine.
r/rust_gamedev • u/jothedope • Sep 02 '22
Freshest videogame starter for everyone in the community ever made!
r/rust_gamedev • u/[deleted] • Dec 26 '21
I know that rust is still a growing ecosystem but I want to know if there are any rust game engines.
What I mean by game engine is something more of the likes of unity/unreal/godot (I know there are gdnative bindings but those feel clunky to me). These all have interfaces that push most of the code on a lower level of the code out of the way. I know none of these are probably fit for actual game development and are probably buggy as hell but I would like to try them out anyways.
r/rust_gamedev • u/erlend_sh • Dec 06 '18
Does rust have a future in the development of games?
r/rust_gamedev • u/Animats • Nov 18 '22
Kind of quiet. So, my wishlist
Two years into writing a metaverse client, here's my wishlist for Rust game dev:
More work on Rend3. I need the planned performance improvements for concurrency and the ones for VRAM usage reduction. One thread does rendering, and others do all updating. But the updating threads just queue transactions (load texture, load mesh, etc.) for the rendering thread, which slows way down when there are a lot of updates. So the concurrency that Vulkan and WGPU can deliver isn't exported out of Rend3 yet.
Egui works well with Rend3. Here's my example and library for that. It's a dummy game UI; no game, but brings up menus atop Rend3 3D. Egui is very low level. Each dialog takes a lot of code. Something to generate dialogs from some kind of template would be useful. I have many of those to do. Incidentally, does anyone have examples of good color themes for egui? The default is shades of black on black, which is a bit harsh. I'd like to see some examples where the aesthetics are better.
A fast, Rust, JPEG 2000 decoder. Details here. The available options have either performance, cost, or licensing problems. I just need the decode part for classic JPEG 2000 at multi-resolution. Don't need tiles or video.
Those are the big ones still ahead that are of general utility. The rest of what I have to do is application-specific. Comments?
r/rust_gamedev • u/Bat_kraken • Oct 24 '25
Are you winning, son? You don't die in this game, Dad! Wait, what? And it ends in less than a minute!
It's a free, third-person walking simulator that lasts 37 seconds, exclusive to Linux, made using Rust and OpenGL!
Who on earth would make something like that? I don't know, but it's available via the link for anyone who wants to try it:
r/rust_gamedev • u/Gullible_Gold_9156 • Nov 23 '25
Arena shooter prototype in Rust + macroquad (AI-assisted development experiment)
I’ve been experimenting with building a small arena shooter fully in Rust, using macroquad. The twist: I didn’t know Rust when I started, and I didn’t hand-edit a single line. Everything was built through iterative AI prompting (mostly Sonnet 4.5, GPT-5, some Grok and Gemini), 1–2 hours a day for about a month — generate, test, rewrite, repeat.
I’m an old-school dev (28+ years writing software, though not in gamedev), and since childhood I’ve been trying to make something that someone other than me would actually want to play. It never really worked out before — but this time, surprisingly, it did.
What it turned into: • Q3-inspired movement, weapons and feel • Dedicated server + client • Simple bots (basic awareness, navigation, shooting back) • Built-in lightweight map editor • Hotseat (NFK-style) local duel mode • A bunch of small effects and fun extras
The project is inspired by classic arena shooters, especially CPMA (arQon) and NFK (thanks 3D[Power]).
Code & installer: https://github.com/a-kuz/sas
r/rust_gamedev • u/Rogerup • Jun 30 '23
Simple Leaderboard System
Hello guys,
I've made a simple leaderboard system that is free and very easy to use. You can use it in any system/platform/engine/language, allowing the records to be shared among the various platforms.
If you want to try it, the link is that: Plassion Leaderboards
Best luck with your games, and ask me if you have any questions.
This system was made to run on any system, including the simplest and very old ones, that's the reason for using csv and accepting http and get. Of course, if you can, it's better to use it with https and post.
r/rust_gamedev • u/Pumpkin_King_7 • Apr 22 '26
Jobs as a Rust programmer
I'm learning Rust, as my first programming language (previous jobs were completely irrelevant). I am highly skilled in Excel (complex equations) and I think I'll pick it up faster than your average Complete Newbie. What can I expect in what is expected for a job ? Are the jobs paying well?
btw, I live close enough to Silicon Valley
r/rust_gamedev • u/rdalves • Nov 14 '25
Considering Iced for your game UI? Be aware of these red flags
For those evaluating UI frameworks for Rust game development, I wanted to share an experience that might be relevant to your decision-making.
I recently raised concerns in the Iced repository about how the maintainer handles community feedback. The response revealed some things about how this project is managed that I think game developers should be aware of before committing to it.
Key statements from the maintainer:
"The entire project depends on me and my mood. Isn't the new documentation clear about this?"
"iced is not a professional project. It's a personal project. A gift from me to everyone."
When I tried to discuss how this approach might affect community growth and project stability, the response was: "I don't care what you believe open source at its best is. This is my project and I manage it as I please."
Full thread: https://github.com/iced-rs/book/issues/20
For game developers choosing between Iced, egui, Bevy UI, or other options, this matters. If you build a game on Iced and later need to contribute fixes, report bugs, or suggest improvements, this exchange suggests your experience may vary depending on factors beyond the technical merits of your contribution.
I'm not saying don't use Iced - it's technically impressive. But I think this context is important for making informed decisions about what to build your project on. Has anyone else had experiences (positive or negative) contributing to or getting support from Iced?
