r/bevy

▲ 47 r/bevy

Firefly 0.18.1 Out! (2D Lighting for Bevy)

https://reddit.com/link/1srrvl0/video/1axwpcjwfkwg1/player

Hello! Apologies for not posting anything in so long. I've spent the last few months toying with a bunch of experimental features for firefly, most of which didn't really pan out.

Mainly, I've tried to do a rework of the soft shadows which made them cast a proper penumbra and antumbra, but I didn't find a way to do it (for concave-shaped occluders) without resorting to raymarching or other complex techniques that would've made the crate slower (I am however considering adding an alternate rendering mode in the near-ish future, possibly using radiance cascades).

But now I'm back and more motivated than ever! I'm releasing firefly 0.18.1 which fixes a lot of critical bugs, visual glitches, adds support for HDR, light cores and angles, and many quality-of-life improvements.

Be sure to check the release notes for details on everything that's changed! And make sure to follow the ⁠bevy_firefly thread to be kept up-to-date with new updates and insights!

You can expect new fancy features soon!

Repo.

reddit.com
u/TheOneExpert — 24 hours ago
🔥 Hot ▲ 54 r/bevy

The Impatient Programmer's Guide to Bevy and Rust: Chapter 12 - Let There Be Networking

Tutorial Link

By the end of this chapter, you'll learn to:

  • Understand how multiplayer games actually work under the hood, the four systems every online game needs (identity, persistence, real-time sync, and server authority).
  • See why SpacetimeDB is a fundamentally different approach: instead of stitching together a web server, a database, a WebSocket layer, and an auth system, you write one Rust module.
  • Set up SpacetimeDB locally, publish your first server module.
  • Implement the server side: a player table that stores who exists in your world, and reducers that automatically handle players joining, leaving, and coming back.
  • Connect your Bevy game to the server so that clicking Multiplayer opens a live connection screen showing your player name and who else is currently online.
  • Run two instances of your game side by side and watch them recognize each other as separate players on the same shared server.
u/febinjohnjames — 24 hours ago
▲ 32 r/bevy

A game about gravity looking for a playtester or two

My game might be reaching a playable state. You are a humanoid black hole. You eat everything. Matter is mana. Excess matter is Exp. It features ROR2-like progression, Noita-like transmutation magic, and plenty of destruction.

I could need a playtester or two who is not an old friend! If that sounds like something you would play, stop by on the Discord https://discord.gg/KewQFtfEDZ or let me know here!

Any feedback is welcome, too, of course!

u/MolecularSadism — 1 day ago
▲ 2 r/bevy

How to synchronize two peers in a locksteep-based multiplayer

Hello. This questions is not specific bevy, but I'm not sure where else to ask.

I'm building 1v1 multiplayer game in bevy for browsers (WebRTC). The purpose of this project is to learn game networking a bit, that's why I'm not using crates like bevy_ggrs.

In my understanding of locksteep netcode, you basically have wait until inputs from both clients arrive (i.e. both peers ready to proceed to the next tick) and buffer those inputs for a few ticks to avoid freezing the game. That's what I understand from gafferongames' "Deterministic Lockstep" article. This is quite understandable.

What I don't understand is how do you synchronize two peers to start at the same time (tick). It seems impossible to me.

My current flow is to have a lobby (2 players), where one peer is marked as leader, the other as follower. Everyone knows who is who.

  1. Starting in NotReady state, both peers send 'readiness' packet to each other.
  2. After receiving readiness from the other peer, each peer transitions to Ready.
  3. When Ready, the leader schedules a start by sending a 'start tick' to the follower (current_tick + 30). Then goes to StartScheduled state.
  4. The follower receives the start ticket from the leader, saves it, transitions to StartScheduled and also waits.
  5. When the start tick is reached by both sides (tick advances in FixedUpdate), the game naturally starts.

This is very wrong. There is no guarantee about the current_tick being the same for both peers. And it seems like the 'Chicken or the egg' problem to me.

So how do you synchronize peers initially so they stay (hopefully) synchronized in future by using only deterministic systems?

reddit.com
u/lifeinbackground — 22 hours ago
🔥 Hot ▲ 220 r/bevy+1 crossposts

I made a tiny AtS clone with pixel-art graphics for a 2 week hobby gamedev project.

Many thanks to amazing people from Eremite Games for creating my now favorite city-builder. Two weeks ago I got tired with shuffling data in databases (which I do for a living) and decided to code something visual for a change in my spare time. All assets are drawn by me on a touchpad (except the background texture which I stole from one of the steam games I own, lol). The code is done in two layers - there is a deterministic simulation as a backend (I wanted to do a rollback multiplayer, but decided half way through for something less ambitious) and then the Bevy game engine handles all the visuals.

u/IronChe — 3 days ago
▲ 10 r/bevy

I tried Bevy for the first time where every line costs $1.

Basically, I tried using Bevy for the first time with a challenge where every line of code I write costs $1, and at the end, I tallied the total.

Every time I passed a certain threshold, I would have to take a punishment, such as after 500 lines, I would have to use a light theme, and at 1.5k, I would use Notepad only.

The game is a vampire-survival-like game in which you cannot move but defend yourself against hordes of enemies, and after each wave you have the option of buying items in the shop.

Here's the GitHub if anyone's interested.

youtu.be
u/ChezyName — 3 days ago
▲ 6 r/bevy

Need help removing the artifact between sprites when the window is resized

Hi,

Just for fun, I started playing with Bevy in an attempt to rewrite one of my childhood favorite games "Road Fighter". Here the project: https://github.com/ufoscout/road_fighter

I have been stuck for a long time with a rendering issue that happens when I resize the screen. For example, with the original size, everything looks as expected:

https://preview.redd.it/mx7mpqp4gdwg1.png?width=512&format=png&auto=webp&s=1f31ceb2c7afaa6d3c1f044df82a7bc10a79e00d

but if I resize the window, then lots of artefacts appear between the sprites:

https://preview.redd.it/f868z34dgdwg1.png?width=1174&format=png&auto=webp&s=ad5d5c4e8ae90423ee7678c28d3b6d5b9b08e14b

As I have exactly zero experience with game programming, Bevy or graphics in general, I am not even able to understand if the issue is linked to how I manage the sprites or how the Bevy camera is configured or anything else.

I would genuinely accept any advice or criticism. This is a hobby project that would probably never be completed, but I am curious to know what I am doing wrong and what the correct approach should be.

I know I could hardcode a larger screen size by simply multiplying everything by a fixed factor, but I would really like to resize the window freely.

reddit.com
u/ufoscout — 2 days ago
🔥 Hot ▲ 55 r/bevy

I've added dynamic tire inflation/deflation, it also make it look like it is deforming like a (rubber) soft body but it's actually just multiple rigid bodies. I'm using bevy rapier.

u/ivanceras — 5 days ago
🔥 Hot ▲ 56 r/bevy

Isometric 2d sorting problem

Hi, what are the typical ways of solving a 2d isometric (diametric) sorting problems for large (more than a single unit of length) objects? See screenshot. I read online and people either split the sprite into stripes, or write a custom shader. Are those overengineering the problem, or is this really that difficult? Which one would be preferable?
Thanks in advance!

u/IronChe — 7 days ago
▲ 0 r/bevy

I built a Unity-like game editor for Bevy that runs in the browser — and you can control it with Claude AI

Hey r/bevy! I've been building SanBevyEditor, a full game editor for Bevy that compiles to WASM and runs directly in the browser — no install required.

Try it now: https://www.koolwww.com/SanBevyEditor

While we're all waiting for the official Bevy editor, this might scratch that itch.

What it does

- Entity hierarchy, Inspector, Gizmos (translate/rotate/scale)

- Mesh/Light/Camera/Splat/Terrain/Prefab spawning

- Undo/Redo, Save/Load scenes (.scn.ron)

- Code generation → exports a full Bevy game project

- WebGPU + WebGL2 (auto-detected)

- Multi-language (FR/EN/VI)

The Claude twist

The editor exposes a REST API that Claude Code can drive directly. You describe your scene in plain English, Claude builds it — entities, transforms, materials, terrain, the works. It's the closest thing I've found to "vibe-coding" a 3D scene.

There's a dedicated page in the editor that explains how to set it up with Claude Code.

Built entirely in Rust. Feedback welcome — there's a feedback page built into the site.

reddit.com
u/BendConstant9530 — 6 days ago
▲ 4 r/bevy

What's the proper way to get the raw window handle of a window?

So I'm trying to make a desktop game, previously wanted it to be a fullscreen, transparent window with cursor falltrhough, but that combination is Windows only so hell nah, I want my game to work everywhere, so I've decided to simply have many tiny windows here and there for each context, that way I can avoid transparency and falltrhough, but theres an issue. I've made my own renderer with wgpu to go around some silent bugs that I couldnt figure, but because of that I need to get the raw window handle to create the surface, I didn't know how you could do it but then I checked inside of bevy_render and apparently you can query a RawHandleWrapperHolder, an then do some shenanigans to get the handle out, and that worked fine when I was creating the window from the WindowPlugin in default plugins. Now the thing is, I don't have a primary window anymore, so I start the WindowPlugin without a primary window, because I want to start inserting the windows later on. So this is how I do it for now, I have a plugin with a startup system that uses commands to spawn a Window object, togheter with a label component to know what type of window it is, and then have a system that reads On<WindowCreated> events to try and set up the renderer for each type of window. So at first I though, ok, have a query for all the RawHandleWrapperHolder, and then use message.window to get the correct handle for that window, doesnt work, so out of curiosity I make it print the length of the query with .iter().len(), its always 0, even minutes after the window is created, with the window blatantly on screen. Then I've read about how I can use WinitWindows to get the window handle, so I do NonSend<WinitWindows>, and then .get_window(), again with message.window, it crashes saying WinitWindows was none and to wrap it in Option, so I do just that, Option<NonSend<WinitWindows>>, and make it print if its is some, it always prints false, again even after minutes after the creation of the window, even though its right there on screen, so now I'm out of options, I dont know if its something to do with my setup or its just the wrong way, but I dont see why the RawHandles wont appear when adding windows with commands, but one exists if I create a window using the WindowPlugin. Help pleasee

bevy = { version = "0.18.1", default-features = false, features = ["default_app", "default_platform"] }
reddit.com
u/_The_Master_Baiter_ — 6 days ago
▲ 29 r/bevy

Railroad Strategy Game: Nile Express

Over the past year I have created a Railroad Strategy Game. By constructing Railroads and then transporting Passengers and Goods, the aim is to stay economically solvent. It plays in the early days of Railways in Egypt.

By transporting certain Goods or amount of Passengers Levels can be completed.

To add some challenges, Trains can derail or crash into each other, which they then need to be replaced.

For this Game I have started with bevy 0.16, but earlier versions for kind of Prototypes, or just for learning only.

I desperately wanted to use a Physics Engine, and started with rapier and then changed to avian3d.

I haven't got a Demo yet. But I wanted to publish before I run out of patience and motivation and see if anyone would be interested in this kind of Game.

https://preview.redd.it/yntz4fiwhsug1.png?width=3839&format=png&auto=webp&s=34ec42967368087f0ffa8a7bcbf786474fca11ae

https://store.steampowered.com/app/4265280/Nile_Express/

reddit.com
u/oerliman — 10 days ago
▲ 34 r/bevy

Rebuild an unfinished Angel Studios/Rockstar Games PS2 prototype in Bevy

For the past few weeks, I have been working to re-implement an unreleased/canceled PS2 game developed by Angel Studios for Rockstar Games way back in 2002 in Bevy!

I've got the textures, animations, collision, sound, levels, custom scripting system, skinned models, particle systems all essentially re-implemented.

https://github.com/weatheredclown/Oni2Rebuilt

Animation/gameplay/AI/some remaining scripting features are all significantly harder and more nuanced to recreate, but there's something pretty cool looking that you can play with and run around in!

Read more about the prototype: https://wiki.oni2.net/Oni_2_(Angel_Studios)

u/Timlikestech — 10 days ago
▲ 16 r/bevy

Books and other resources to learn rendering techniques

Hi all,

I'm trying to create a CFD program (some details in this question https://www.reddit.com/r/bevy/comments/1sgpx92/comment/ofuaiv5/?context=1) it looks like this is going to require a bunch of custom rendering and/or programming to determine what is sent to the GPU. I'm a fairly decent rust programmer but haven't done any of this stuff in the past.

One of the fellas over there recommended real time rendering fourth edition https://www.amazon.co.uk/Real-Time-Rendering-Fourth-Tomas-Akenine-M%C3%B6ller/dp/1138627003 which looks good but is getting a little old (8 years) so I'm not sure if there'll be some newer stuff missing.

What would people recommend I read/watch/look into to learn rendering and/or CPU/GPU programming (my main problem is that CFD meshes have millions of cells so I'll need to be swapping a lot of stuff in/out of the GPU for visualisation based on what can be seen)

Thanks,

P.S.

If there are any specific techniques I should look into advice on that would be great too, thanks

reddit.com
u/Pioneer_11 — 9 days ago
▲ 4 r/bevy

Can you make inputs go through the window?

I don't really know how to put it, but Im trying to make one of those games that become part of the desktop in some way, so im guessing is like fullscreen plus transparency, and thats fine, but now I need for the input to go through, otherwise its blocking everything, is there a way to do so?

reddit.com
u/_The_Master_Baiter_ — 7 days ago
▲ 49 r/bevy

Tzelem is up on Steam!

https://i.redd.it/raftg0imbeug1.gif

Go wishlist it and try out the demo!

https://store.steampowered.com/app/4556050/Tzelem/

When I started developing in Bevy about two and a half years ago, it said somewhere on the main page that it's not production-ready. Well, it is.

Now, after two and a half years, Bevy is my favorite engine by far, and Rust is my favorite language by far, both to such an extent that when I go back to working in other engines as a freelancer and on jams I feel like I lost a finger or two (and for a programmer, that's a lot).

I love both Bevy and its community, and plan to keep working in it whenever I can (and at least for another year or so until Tzelem is complete).

reddit.com
u/Rabbival507 — 12 days ago