From 683e17f76f3f96ac80e2c30b004bb7bb6c332e1b Mon Sep 17 00:00:00 2001 From: JMARyA Date: Fri, 13 Jun 2025 11:32:52 +0200 Subject: [PATCH] add bevy --- technology/dev/programming/frameworks/Bevy.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 technology/dev/programming/frameworks/Bevy.md diff --git a/technology/dev/programming/frameworks/Bevy.md b/technology/dev/programming/frameworks/Bevy.md new file mode 100644 index 0000000..bc08d6b --- /dev/null +++ b/technology/dev/programming/frameworks/Bevy.md @@ -0,0 +1,42 @@ +--- +obj: concept +website: https://bevyengine.org +repo: https://github.com/bevyengine/bevy +--- + +# Bevy Engine +Bevy is a modern, open-source game engine built in **Rust**. It emphasizes simplicity, modularity, and performance, making it an attractive choice for game developers looking for a data-driven, Entity-Component-System (ECS) architecture combined with modern rendering capabilities. + +## Entity Component System (ECS) + +* **Entity:** Unique identifier representing a game object. +* **Component:** Plain data attached to entities. +* **System:** Logic operating on entities with matching components, executed in parallel where possible. + +This design promotes separation of data and logic, enabling highly efficient, cache-friendly processing. + +## Basic Example + +A simple example creating a window and spawning a 2D sprite: + +```rust +use bevy::prelude::*; + +fn main() { + App::new() + .add_plugins(DefaultPlugins) + .add_startup_system(setup) + .run(); +} + +fn setup(mut commands: Commands, asset_server: Res) { + // Camera + commands.spawn(Camera2dBundle::default()); + + // Sprite + commands.spawn(SpriteBundle { + texture: asset_server.load("branding/icon.png"), + ..Default::default() + }); +} +```