Bevy Book
A hands-on reference for building a 2D game with Bevy 0.18 - from first window to procedural worlds, data-driven characters, collision systems, inventory, and weather effects.
Special shoutout to Febin John James — thank you for your support and contributions!
Table of Contents
Chapter 1: Getting Started with Bevy
- 1. Project Setup
- 2. Core Architecture - Thinking in Systems
- 3. Step-by-Step Implementation
- 4. Adding Sprite Graphics
- 5. Rust Concepts Quick Reference
- 6. Bevy Memory & Performance Notes
- 7. Recommended Crates for Expanding This Project
- 8. Tips for Further Improvement
- 9. Complete File Structure
- 10. Full Schedule Reference
Chapter 2: Procedural Tilemap Generation with WFC
- 1. Chapter Overview
- 2. Wave Function Collapse (WFC) - How It Works
- 3. Project Setup
- 4. Architecture Overview
- 5. Step-by-Step Implementation
- 6. Rust Concepts Introduced in This Chapter
- 7. Quick Weight Tuning Guide
- 8. Known Issues & Workarounds
- 9. Recommended Crates for Expanding Procedural Worlds
- 10. Tips for Further Improvement
- 11. Complete Layer Stack Visualization
Chapter 3: Data-Driven Characters
- 1. Chapter Overview
- 2. Project Setup
- 3. The RON Configuration File
- 4. Architecture - System Flow
- 5. Data Types
- 6. Animation Engine
- 7. Movement System
- 8. Spawn & Character Switching
- 9. Plugin Registration
- 10. Rust Concepts Introduced
- 11. Tips for Further Improvement
- 12. Recommended Crates
- 13. Spritesheet Layout Reference
- 14. Complete Component Hierarchy
Chapter 4: State Machines & Collision
- 1. Chapter Overview
- 2. Project Structure After This Chapter
- 3. Game States
- 4. Character State Machine
- 5. Architecture Refactor
- 6. Collision System
- 7. Player Collider
- 8. Debug Visualization
- 9. Y-Based Depth Sorting
- 10. Centralized Configuration
- 11. Complete Player Entity Components
- 12. Rust Concepts Introduced
- 13. Controls Summary
- 14. Known Issues & Tips
- 15. Recommended Crates
Chapter 5: Inventory & Camera
- 1. Chapter Overview
- 2. Project Structure After This Chapter
- 3. Inventory System
- 4. Camera System
- 5. World Scale Changes
- 6. Updated main.rs
- 7. Centralized Config - Full State
- 8. Rust Concepts Introduced
- 9. Controls Summary (Cumulative)
- 10. Tips for Further Improvement
- 11. Recommended Crates