r/rust_gamedev

Goofy, cartoonish, open-source multiplayer shooter written in Rust with Bevy 👻
▲ 51 r/rust_gamedev+2 crossposts

Goofy, cartoonish, open-source multiplayer shooter written in Rust with Bevy 👻

This is not a serious project; I just wanted to experiment with Bevy. 😄 It's the first game I've ever created, so I'm interested in learning about the aspects I could improve.
https://github.com/NiiightmareXD/golab

u/SoSmartFlow — 20 hours ago
▲ 175 r/rust_gamedev+1 crossposts

Usagi Engine v1.0.0 Released - Free & Open Source Lua 2D Game Engine Powered by Raylib

I've been working on a little 2D Raylib-powered game engine called Usagi. You code your games with Lua, and your game live updates as you save your code and assets. It has single-command cross-platform export for web, Linux, macOS, and Windows. Today I released v1.0.0 after making a handful of games with it and getting feedback.

https://usagiengine.com/

Raylib was the perfect choice for the foundations of Usagi Engine, making cross-platform rendering, input, and audio playback easier than I could have imagined.

I'd love to know what you all think! The engine is coded in Rust, and you can check the source out on GitHub: https://github.com/brettchalupa/usagi

u/brettmakesgames — 2 days ago
▲ 236 r/rust_gamedev+3 crossposts

bonsai-bt v0.12.0 released: live visualizations for AI behavior trees

We've just shipped v0.12.0 of `bonsai-bt`, and the big addition this release is live visualizations in the browser — you can now watch the state of your behavior tree update in real time as it ticks, including which nodes are running, succeeding, or failing.

For anyone unfamiliar: behavior trees are a great way to build deterministic AI — they're widely used for things like robotics control loops, game NPCs, and any agent that needs predictable, debuggable decision-making. The new visualizer makes it a lot easier to actually see what your tree is doing and catch issues without sprinkling print statements everywhere.

The visualizer is gated behind a feature flag. Add it to your `Cargo.toml` like this:

```toml

[dependencies]

bonsai-bt = { version = "0.12.0", features = ["visualize"] }

```

For more, see repo: https://github.com/Sollimann/bonsai

u/Sollimann — 4 days ago
▲ 19 r/rust_gamedev+2 crossposts

Bevy-s2n-quic initial version announcement!

After a year and a half of fighting with async Rust I'm finally ready to announce Bevy-s2n-quic. An Aeronet compatible Bevy networking plugin utillizing the incredibly powerful s2n-quic library by Amazon.

Currently working at the moment is:

  • Hosting a server
  • Connecting a client to a server
  • Opening connections and streams
  • Handling failed connections and streams

WIP/needs polish:

  • Full Aeronet event support
    • I believe we publish the correct events but are missing support for Aeronet command events (like opening a connection via events)
  • Performance
    • The management of async tasks is a very naive approach and results in poor performance at high connection counts (200+)
  • Maybe other things idk
    • Open source, lemme know what else I've screwed up lol

Project Links:
https://github.com/CorneliusCornbread/bevy-s2n-quic
https://crates.io/crates/bevy-s2n-quic

Related Links:
https://docs.rs/aeronet/0.20.0/aeronet/
https://crates.io/crates/s2n-quic

u/23Link89 — 4 days ago
▲ 5 r/rust_gamedev+1 crossposts

I coded a hardcore cyberpunk evasion game in Rust 🦀 (WINDJET: Kinetic Overdrive - Demo Out Now for Windows/Linux!)

Titre du jeu : WINDJET : Kinetic Overdrive

Lien jouable :  https://zlormack-studio.itch.io/windjet-kinetic-overdrive

Lien de la bande-annonce (YouTube) :  https://youtu.be/rX9f7Q0yM7Y

Plateforme : Windows et Linux (binaires portables autonomes)

Description : WINDJET : Kinetic Overdrive est un jeu d'arcade d'évasion en vue de dessus, entièrement développé en Rust avec la bibliothèque Macroquad. Le jeu est dépourvu de logiciels superflus, bénéficie d'une gestion de la mémoire optimisée et se compile sans aucun avertissement. Le gameplay principal repose sur une forte poussée d'adrénaline, des sensations de jeu à grande vitesse et une gestion cinétique intense. Votre vaisseau est dépourvu de freins, vous obligeant à déraper, glisser et anticiper votre trajectoire avec précision pour esquiver des vagues denses et rapides d'obstacles rouges mortels.

Un arrière-plan vectoriel rétro-futuriste dynamique glisse en fonction de votre vitesse pour accentuer la sensation de vitesse, accompagné de spectaculaires explosions de particules cyan lorsque vous collectez des bonus néon. Entre les vagues, vous accédez à une Cyber-Boutique interactive où vous pouvez dépenser vos crédits pour recharger vos boucliers énergétiques ou augmenter la vitesse de vos propulseurs (+15 %) à l'aide de votre souris, clavier ou pavé numérique. La démo propose une courbe de difficulté progressive répartie sur 5 vagues : les vagues 1 à 3 offrent un rythme plus régulier pour accumuler des crédits, la vague 4 déclenche une alerte de surmultiplication rouge clignotante et la vague 5 présente un final chaotique et intense. L'architecture complète est conçue pour gérer jusqu'à 20 vagues.

Statut Free to Play : [ ] Gratuit

[X ] Démo/Clé disponible

[ ] Payant (Autorisé uniquement le mardi avec [TT ] dans le titre)

Participation : Je suis le développeur unique de Zlormack Studio. J’ai conçu le gameplay, programmé la physique, les graphismes et le système de boutique multi-entrées en Rust, et composé la bande-son électronique cyberpunk originale à 140 BPM.

📊 UPDATE: THE FREE DEMO IS NOW LIVE ON GAME JOLT! Want to join our expanding community and test the game on another platform? WINDJET Kinetic Overdrive has officially invaded Game Jolt! 

🕹️ Play the Free Demo on Game Jolt: https://gamejolt.com/games/windjet-kinetic-overdrive/1071130 

⚡ Join the Zlormack Studio matrix and follow my profile here: gamejolt.com/invite/Zlormack Download, challenge your reflexes, and don't forget to drop your high score in the Game Jolt comments!

u/ZlormackYT — 4 days ago
▲ 140 r/rust_gamedev+2 crossposts

Free demo live! I built a stable solar system generator & space colony sim from scratch in Rust with wgpu, N-body gravity, thousands of objects at 60fps.

I'm Dave :) I've been here a couple times before, showcasing my passion project Stella Nova, built in pure Rust using wgpu for rendering. It's a colony management simulator set in a procedurally generated solar system where every object follows real N-body gravitational physics. The custom engine (WarpCore) handles thousands of entities stably at once and ships under 500MB on disk!

Current functional demo systems:

Real Hohmann transfer planning for interplanetary travel
Modular station construction
Citizen AI with state machine behavior (think RimWorld, Dwarf Fortress)
Time dilation control, play with the laws of relativity- Secret programming menu (please ask)

The playable demo just went live on Steam: https://store.steampowered.com/app/4703440/Stella_Nova_Demo/

Happy to answer any architecture or other questions about the project!!

u/DavesGames123 — 7 days ago
▲ 159 r/rust_gamedev+1 crossposts

undoredo - crate for Undo/Redo using deltas, snapshots, or commands for any data structure

Hello! I would like to share with you a library that I created for my own needs.

undoredo is a Rust crate for implementing Undo/Redo pattern using deltas, snapshots, or commands on arbitrary data structures.

The library has derive macros to work with custom data structures and also has lots of convenience implementations for standard library and third-party types, such as HashMap, HashSet, BTreeMap, BTreeSet, Vec, StableVec, thunderdome::Arena, rstar::RTree, rstared::RTreed. There is also plenty of documentation.

Repository: https://github.com/mikwielgus/undoredo

Example:

use undoredo::{Delta, Recorder, UndoRedo};

#[derive(Delta)]
pub struct Entities {
    positions: Recorder<Vec<[f64; 2]>>,
    velocities: Recorder<Vec<[f64; 2]>>,
    healths: Recorder<Vec<i64>>,
}

fn main() {
    let mut entities = Entities {
        positions: Recorder::new(Vec::new()),
        velocities: Recorder::new(Vec::new()),
        healths: Recorder::new(Vec::new()),
    };
    let mut undoredo: UndoRedo<EntitiesDelta> = UndoRedo::new();

    entities.positions.push([0.0, 0.0]);
    entities.velocities.push([1.0, 0.0]);
    entities.healths.push(100);

    undoredo.commit(&mut entities);

    undoredo.undo(&mut entities);
    undoredo.redo(&mut entities);
}

Here's a demo animation showing Undo/Redo action over dynamically added and subtracted polygons with R-tree spatial indexing. Neither commands nor snapshots are stored, but all edits in history are made of sparse deltas of the polygon container and the associated R-tree:

Animation showing polygons being added and subtracted in the demo stored in `demos/polygon_set/` directory of the repository of the polygon_unionfind crate.

reddit.com
u/NoTrust8561 — 11 days ago
▲ 11 r/rust_gamedev+1 crossposts

VoidDrift — idle space mining game in Bevy 0.15, runs on Android + browser (no sprites)

Built a mobile idle game with Bevy 0.15 + egui. No sprites anywhere —

all visuals are procedural geometry drawn with egui's painter API.

Runs on Android and WASM.

You mine asteroids, automate a drone fleet, and receive transmissions

from something watching near the black hole.

One technical thing the Bevy community might find useful:

egui::Window click events are unreliable in bevy_egui 0.33. All

interactive UI uses painter + ui.interact() instead. Took a while

to land on that pattern but it's solid now.

Play in browser: https://rdug627.itch.io/voidrift

Source (MIT): https://github.com/rfd62794/VoidDrift

Prototype — more orbital rings and drone types in progress.

Mobile feedback especially welcome.

u/FamiliarAnxiety9 — 10 days ago

A Minecraft-like game being developed by me

Hello! I'll be using this subreddit to showcase the progress of my Minecraft-like game.

Why another Minecraft game? Well, it started as a personal project to learn how to interact with components through code, using graphics APIs such as Vulkan, but without using any game engine like Godot or Unity, just only with coding. I decided to use Rust because I wanted to learn the language, with a couple of libraries, and also learn about rendering, algorithms ...
Then my friend encouraged me to make it public and follow the Minecraft style, because it's hard enough to be considered a real project, but easy enough to handle by myself. So I started posting devlogs as a way to showcase the progress.
I'd like to make it public in the future and, who knows, maybe build a small community and get some support :)

If you are interested, I can share my YT channel where I try to explain all the technical implementation.
I still need a Game name since "Cubix" doesn't really give me any feeling right now (and I'ts also taken), I though about something related with "Crate" like "Cradle" or idk.

Here are a couple of screenshots showing the current state of the game.

The main menu

Flat world generation

Some blocks created

Debug metrics (in the future I will remove many of them once solved the performance issue)

reddit.com
u/seniorkekoo — 9 days ago

Rendering 1 Million Procedural Cubes

https://reddit.com/link/1tav6k1/video/upp9zug11o0h1/player

I’ve been working on my engine (Rust obviosly), specifically on Vulkan bindings. The main work was already done, and only testing remained. During testing, I usually prefer CSV and JSON because they give me a good grasp of the data, letting me easily see what’s happening and spot any unexpected behavior. This saves a lot of time since you don’t have to check every number individually you just need to confirm whether things are going as expected. Since continuous testing was already happening, I knew that for this stage I only needed an overall overview to ensure all components were working together properly, as individual component testing had been done earlier. So yesterday, I was testing, Today, I decided to share CSV graphs and visual testing results.

Here’s my result:

Workload: 1,000,000 procedurally generated cubes (8 million vertices / 12 million primitives).

Average frametime: ~1.43ms (consistently hitting 700+ FPS).

PCIe bandwidth used: exactly 0 bytes.

1% lows: extremely stable (max spikes under 2.5ms).

// Flushing data to disk without pollutng hotloop!!!!!!
if state_arc.lock().unwrap().mode == 0 {
    if let Ok(mut f) = std::fs::File::create("alu_throughput_log.csv") {
        let _ = writeln!(f, "Timestamp_Sec,Cubes_Generated_Per_Frame,Vertices_Computed_By_ALU,Triangles_Rasterized,Memory_Bandwidth_Used_Bytes");
        for t in &alu_log {
            let _ = writeln!(f, "{:.4},{},{},{},{}", t.timestamp_sec, t.cubes_generated, t.vertices_computed, t.triangles_rasterized, t.memory_bandwidth);
        }
    }
    
    if let Ok(mut f) = std::fs::File::create("frame_pacing_log.csv") {
        let _ = writeln!(f, "Frame_ID,Timestamp_Sec,Render_Latency_ms,Instant_FPS");
        for t in &pacing_log {
            let _ = writeln!(f, "{},{:.4},{:.2},{:.0}", t.frame_id, t.timestamp_sec, t.render_latency_ms, t.instant_fps);
        }
    }

    if let Ok(mut f) = std::fs::File::create("dispatch_consistency_log.csv") {
        let _ = writeln!(f, "Frame_Window_Start,Frame_Window_End,Avg_Latency_ms,Max_Latency_Spike_ms_1_Percent_Low");
        for t in &consistency_log {
            let _ = writeln!(f, "{},{},{:.2},{:.2}", t.window_start, t.window_end, t.avg_latency_ms, t.max_latency_spike_ms);
        }
    }
}

If you look at the cluster of dots in the graph, you’ll clearly see that despite the heavy render load, most frames are densely clustered around 1.5ms latency and a median of 661 FPS.

The system is processing 5 to 9 B triangles per second. (the right axis of the graph.) Render latency is consistently maintained between 1.5ms and 2.5ms (The solid dotted green line )

reddit.com
u/IamRustyRust — 10 days ago