| Crates.io | procedural_tilemaps_core |
| lib.rs | procedural_tilemaps_core |
| version | 0.2.0 |
| created_at | 2025-10-01 16:08:25.552889+00 |
| updated_at | 2026-01-14 07:51:47.348423+00 |
| description | Lightweight 2D tilemap generation with Wave Function Collapse / Model Synthesis for Bevy |
| homepage | |
| repository | https://github.com/jamesfebin/bevy_procedural_tilemaps |
| max_upload_size | |
| id | 1862807 |
| size | 188,899 |
This repository is a streamlined fork of Guillaume Henaux’s ghx_proc_gen, trimmed to focus on lightweight 2D tilemap generation with Wave Function Collapse / Model Synthesis for Bevy. The work powers the procedural-generation chapters of my upcoming Bevy game-development book—The Impatient Programmer's Guide to Bevy and Rust (Chapter 1 is already available here).
Highlights:
cargo add bevy_procedural_tilemaps
use bevy::prelude::*;
use bevy_procedural_tilemaps::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(ProcGenSimplePlugin::<Cartesian3D, Handle<Image>>::default())
// add your systems …
.run();
}
The core building blocks come from procedural_tilemaps_core::prelude (re-exported through the Bevy prelude):
RulesBuilder, SocketCollection, ModelCollection to describe adjacency rules.GeneratorBuilder / Generator to run Model Synthesis / WFC.CartesianGrid, GridDelta, Direction for cartesian grids.NodesSpawner and bundle inserters to spawn tiles in Bevy worlds.The workspace ships with a single Bevy example demonstrating layered tile generation:
cargo run -p bevy_examples --example tile-layers
It stacks multiple Z layers to render a top-down map while using Bevy’s 2D camera. Assets come from the “16x16 Game Assets” pack by George Bailey (OpenGameArt, CC-BY 4.0).
[dependencies]
bevy_procedural_tilemaps = "0.1.3"
simple-plugin – registers the minimal generator runner used by the example. Enabled by default; opt out with default-features = false if you want to wire systems manually.default-bundle-inserters – provides default BundleInserter impls for common Bevy asset handles (Handle<Image> and Sprite). Enabled by default; disable alongside the default features if you supply your own inserters.bevy feature on the core crate (automatically applied by this crate) derives Component for relevant types and is required when targeting Bevy.Henauxg) and contributors.Code is dual-licensed under either:
at your option. Contributions are accepted under the same terms.
bevy_examples/assets/tile_layers: “16x16 Game Assets” by George Bailey, CC-BY 4.0.