jamesfebin/ImpatientProgrammerBevyRust
حول
The Impatient Programmer's Guide to Bevy and Rust : Build a 2D Game from Scratch
الألعاب والمحاكاةالنمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- +١
- خلال 15 يومًا
- +٥
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلThe Impatient Programmer's Guide to Bevy and Rust
Read the first 7 chapters free. The paid ebook includes chapters 8-14, and I'm actively working on more content. As an early access release, it's currently available at a discounted price. Chapter 12 is also free to read.
Chapters
Chapter 1: Let There Be a Player
Learn to build a video game from scratch using Rust and Bevy. This first chapter covers setting up your game world, creating a player character, and implementing movement and animations.
Chapter 2: Let There Be a World
Learn procedural generation techniques to create dynamic game worlds.
Chapter 3: Let The Data Flow
Learn to build a data-driven character system in Bevy. We'll use a RON file to configure character attributes and animations, create a generic animation engine that handles walk, run, and jump animations, and implement character switching.
Chapter 4: Let There Be Collisions
Let's make the player interact with the world properly, no more walking through trees, water, or rocks. We'll implement z-ordering so they can walk behind objects, giving your 2D game true depth. Also, you'll build a collision visualizer for debugging.
Chapter 5: Let There Be Pickups
Build an inventory system to collect items from the world, then zoom in and add smooth camera follow.
Chapter 6: Let There Be Particles
Learn to build a particle system with magical powers and create stunning particle effects. Learn custom shaders, additive blending, and how to make your game feel alive.
Chapter 7: Let There Be Enemies
Build intelligent enemies that hunt and attack the player.
Chapter 8: Let There Be Damage
Add health, damage, and combat mechanics that make your game feel dangerous.
Chapter 9: Let The World Scale
Break through Wave Function Collapse size limits by stitching multiple maps into one massive world.
Chapter 10: Let There Be Memory
Learn to save and load your game so players can pick up exactly where they left off.
Chapter 11: Let There Be Sound
Learn how to add background music and sound effects to your Bevy game.
Chapter 12: Let There Be Networking
Learn how to build multiplayer networking in Bevy with SpacetimeDB.
Chapter 13: Let There Be a Shared World
Learn how to make every multiplayer client generate the exact same procedural world using a server-owned seed.
Chapter 14: Let There Be Friends (Probably)
Make players visible to each other in the shared world. Send movement updates through SpacetimeDB, animate remote characters, and smooth their movement between updates.
Getting Started
Chapters 1–14 use Bevy 0.20 and require Rust 1.97.1 or newer. Install the toolchain with rustup toolchain install 1.97.1.
Each chapter has its own directory with a complete, runnable project. Navigate to the chapter directory you want to explore and run:
cd chapter1 # or any chapter directory, such as chapter14
cargo +1.97.1 run
Note for Linux users on Wayland: if you see rendering artifacts, run the app with the X11 backend:
WINIT_UNIX_BACKEND=x11 WAYLAND_DISPLAY= cargo +1.97.1 run
Community Tip: This optimization was pointed out by one of our community members, thank you for helping make this tutorial better!
Bevy's default debug configuration can lead to performance issues: scenes that should run smoothly might drop to unplayable framerates, or large assets might take minutes to load.
The Bevy team documents this issue and provides a solution.
Add these optimizations to your Cargo.toml:
# At the bottom of your Cargo.toml
# Enable a small amount of optimization in the dev profile
[profile.dev]
opt-level = 1
# Enable a large amount of optimization in the dev profile for dependencies
[profile.dev.package."*"]
opt-level = 3
Community
- Join our Discord community to get notified when new chapters drop
- Connect with me on Twitter/X
- Connect with me on LinkedIn
Assets
- assets/tile_layers: "16x16 Game Assets" by George Bailey, CC-BY 4.0.
License
The tutorial code in this repository is licensed under the MIT License. See the LICENSE file for details.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…