Mario Morgenthum's Avatar

Mario Morgenthum

@morgenthum

Software architect at HUK-COBURG πŸ’» and math student πŸ§‘β€πŸŽ“

30
Followers
12
Following
32
Posts
16.03.2025
Joined
Posts Following

Latest posts by Mario Morgenthum @morgenthum

How to introduce layers into Bevy games A look at the layered architecture behind Wild Spikes, my survival game built with Rust and Bevy. Strict dependency rules, clear boundaries, and why it matters.

The first "real" post on my new blog.

morgenthum.dev/blog/introdu...

#gamedev #rust #bevy #bevyengine #indiedev #rustlang #architecture

10.03.2026 19:28 πŸ‘ 9 πŸ” 5 πŸ’¬ 0 πŸ“Œ 0
Preview
crates.io: Rust Package Registry

Released bevy_xray, a TUI tool to visualize Bevy state hierarchies, plugin dependencies, and schedule configurations.

crates.io/crates/bevy_...

#gamedev #rust #bevy #bevyengine #indiedev #rustlang

09.03.2026 18:30 πŸ‘ 13 πŸ” 3 πŸ’¬ 0 πŸ“Œ 1

Examples: an LOD crate based on VisibilityRange (defaults for high/mid/low poly, overridable per asset), plus navmesh generation via bevy_rerecast + landmass_rerecast. New video mainly shows LOD + vegetation scattering (bevy_map_scatter)..

24.02.2026 19:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

With that in place I could strip a lot of low-level Bevy specifics out of the game and push them into those mid-level abstractions. I'm also moving more towards a data-/asset-driven setup.

24.02.2026 19:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

On the engine side I now have self-contained crates like camera, controller, behavior, weather, etc., with schedules/configuration properly encapsulated. I also added a runtime layer for settings, window creation, and other runtime concerns.

24.02.2026 19:01 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Video thumbnail

The last update was a while ago, so here's the current status: Over the last few weeks I've been working a lot on Wild Spikes and introduced a layered structure to keep technical details out of the game code.

#gamedev #rust #bevy #bevyengine #procedural #indiedev #rustlang

24.02.2026 19:01 πŸ‘ 10 πŸ” 3 πŸ’¬ 1 πŸ“Œ 0
map_scatter Rule-based object scattering for games and tools.

I have published a documentation website for map_scatter: mapscatter.rs
Check it out.

#gamedev #rust #bevy #bevyengine #procedural #indiedev #rustlang

17.01.2026 20:52 πŸ‘ 8 πŸ” 2 πŸ’¬ 0 πŸ“Œ 0
Preview
crates.io: Rust Package Registry

map_scatter 0.4.0 is out!
Streaming and Bevy 0.18 support.
Check it out:

map_scatter: crates.io/crates/map_s...
bevy_map_scatter: crates.io/crates/bevy_...

#gamedev #rust #bevy #bevyengine #procedural #indiedev #rustlang

17.01.2026 19:55 πŸ‘ 12 πŸ” 4 πŸ’¬ 0 πŸ“Œ 0

I still have a few issues with the lighting. The world still looks quite empty with just a few birch trees, mushrooms, and flowers, but that'll change quickly once I have some vegetation models. By the way, those elements were placed using bevy_map_scatter based on certain rules.

#map_scatter

05.11.2025 19:54 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Video thumbnail

I switched my custom weather implementation to use Bevys atmosphere and sundisk features. I also added several atmosphere presets that I interpolate between during weather transitions - for example, from sunny to rainy

#gamedev #rust #bevy #bevyengine #procedural #indiedev #rustlang

05.11.2025 19:52 πŸ‘ 15 πŸ” 5 πŸ’¬ 1 πŸ“Œ 0

Released map_scatter and bevy_map_scatter in version 0.3.0! Serde and ron dependencies are now optional.

crates.io/crates/map_s...
crates.io/crates/bevy_...

#gamedev #rust #bevy #bevyengine #procedural #indiedev #rustlang #avian3d #avian #map_scatter

21.10.2025 19:39 πŸ‘ 15 πŸ” 4 πŸ’¬ 0 πŸ“Œ 0

It uses the avian3d physics engine (also used in the game for general physics) to top-down raycasts to the ground, to find the height/y-coordinate for the trees.

07.10.2025 15:20 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

Migrated the biome generation of Wild Spikes to bevy_map_scatter. Currently using a small scatter plan that only generates one type (one kind of tree). But everything works as expected!

#gamedev #rust #bevy #bevyengine #procedural #indiedev #rustlang #avian3d #avian #map_scatter

07.10.2025 15:20 πŸ‘ 24 πŸ” 6 πŸ’¬ 1 πŸ“Œ 0

Oh, because the relative link doesnβ€˜t work on crates.io. Need to fix it, ty!

Examples: github.com/morgenthum/m...

06.10.2025 18:52 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
crates.io: Rust Package Registry

Released bevy_map_scatter on crates.io.

Crate: crates.io/crates/bevy_...
Examples: github.com/morgenthum/m...

#gamedev #rust #bevy #bevyengine #procedural #indiedev #rustlang

06.10.2025 17:38 πŸ‘ 18 πŸ” 4 πŸ’¬ 1 πŸ“Œ 0

Jittered grid position candidates are filtered by a field graph using a simple texture. The scene features a camera with a Bloom component and 3D cubes with emissive colors. A separate system modifies the cubes Y-scale to create this effect.

01.10.2025 17:06 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Video thumbnail

After releasing map_scatter yesterday, I am working on bevy_map_scatter.

#gamedev #rust #bevy #bevyengine #procedural #indiedev #rustlang

01.10.2025 17:06 πŸ‘ 17 πŸ” 3 πŸ’¬ 1 πŸ“Œ 0
Preview
crates.io: Rust Package Registry

Finally released map_scatter on crates.io!

Crate: crates.io/crates/map_s...
Examples: github.com/morgenthum/m...

#gamedev #rust #bevy #bevyengine #procedural #indiedev #rustlang

30.09.2025 18:23 πŸ‘ 19 πŸ” 6 πŸ’¬ 0 πŸ“Œ 0

Candidate positions were generated with Poisson-disk sampling; grass uses a jittered grid. Actual species are placed layer by layer - trees first - by computing per-species probabilities from their own field-graph specifications.

18.09.2025 15:25 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

The water is the double sine wave in the middle of the image. It was constructed using the crates Texture-trait to generate the texture programmatically.

18.09.2025 15:14 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

A more concrete example using map_scatter: a forest with natural rules, such as "willows are more likely to be near water."

#gamedev #rust #bevy #bevyengine #procedural #indiedev #rustlang

18.09.2025 15:10 πŸ‘ 21 πŸ” 5 πŸ’¬ 1 πŸ“Œ 0

I’m not sure yet whether I should release map_scatter as engine-agnostic, or if I should first think more about bevy_map_scatter. I’d like to take the Bevy community’s knowledge into account for the Bevy crate.

17.09.2025 16:03 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Points are generated by a jitter grid (with no jitter, so it’s actually just a grid). The first texture is used as the basis for a Euclidean distance transform to calculate the points nearest to the text. These are then filtered with smoothstep and finally rendered as a PNG for this example.

17.09.2025 16:00 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image Post image

Working on final steps - documentation and examples!

#gamedev #rust #bevy #bevyengine #procedural #indiedev #rustlang

17.09.2025 15:54 πŸ‘ 8 πŸ” 1 πŸ’¬ 2 πŸ“Œ 0

Final polish is underway. Expect a release in a few days with docs and examples.

28.08.2025 18:31 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

If it looks too β€œgenerated”: use splat maps from texture paint (e.g., Blender) to drive or filter the rules - paint where to allow/boost/suppress types. Mix authored masks with procedural fields for control.

28.08.2025 18:28 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Works great for 2D - and for 3D too: sample a top‑down position, raycast to terrain for height, then spawn models at the hit. Same rules, different consumer. See my previous post for a 3D in‑game screenshot.

28.08.2025 18:28 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

In the example, the rules (grass near river, trees away, mushrooms near trees) are ~250 LOC total. You write small field‑graphs (distance, smoothstep, masks) and compose them into stages/layers. That’s it - rules, not hand‑placed points.

28.08.2025 18:26 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Post image

@bevy.org

Announcing map_scatter and bevy_map_scatter: a tiny, engine‑agnostic toolkit for rule‑based object scattering on maps. Build field‑graph rules, run multi‑stage placement, get reproducible results.

#gamedev #rust #bevy #bevyengine #procedural #indiedev #rustlang

28.08.2025 18:25 πŸ‘ 21 πŸ” 4 πŸ’¬ 1 πŸ“Œ 0

Of course, many species are still missing - just a first attempt.

26.08.2025 14:42 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0