ShadowEngine2D ShadowEngine2D is a modular 2D game engine written in Rust, designed with flexibility and modularity in mind. It includes systems for rendering, physics, audio, UI, tilemaps, animations, and more.
✨ Features Entity–Component–System (ECS) architecture
Renderer with batching and texture management
Windowing powered by configurable WindowConfig
Input for keyboard, mouse, and custom bindings
UI System with layouts and button styles
Physics with rigid bodies and collision events
Particle emitters for visual effects
Tilemap loading from CSV with TileId
Audio system with backend abstraction
Scene management for menus, levels, etc.
Profiling tools for performance metrics
Save/Load functionality
Animation system for transforms and colors
🚀 Quick Start rust Copy Edit use shadowengine2d::prelude::*;
fn main() -> EngineResult<()> { AppBuilder::new() .with_window(WindowConfig { title: "My Game".into(), width: 800, height: 600, ..Default::default() }) .build()? .run(); Ok(()) } 📦 API Reference (Modules) engine Core game loop & engine lifecycle.
Engine – main engine struct
Game – trait for defining your game logic
run_game – starts the game
renderer Drawing sprites, shapes, and batching.
Renderer – manages draw calls
Sprite batching, vertex/index buffers
window Handles OS windows & configuration.
Window – main game window
WindowConfig – width, height, title, VSync
input Keyboard & mouse handling.
Input – query keys and mouse state
InputResource – ECS resource wrapper
math Math types and utilities.
Vec2, Rect, Color, Position, Size
entity ECS entity and components.
EntityId, Transform, Sprite, Velocity
entity_builder Fluent API for entity creation.
EntityBuilder – chain .with() calls
EntityManagerExt – helper extensions
resources Global resource storage.
Resources – store/retrieve ECS resources
systems Reusable ECS systems.
PhysicsSystem, ClearScreenSystem
SystemSet – batch multiple systems
ui UI rendering & layout.
UiContext, Widget, Layout, ButtonStyle
time Time & delta tracking.
Time – elapsed and delta time
TimeResource – ECS integration
output Debug/logging output.
Output, output_print, output_enabled
text Font & text rendering.
TextComponent, TextRenderer, FontConfig
physics Physics and collisions.
RigidBody, Collider, CollisionEvent
PhysicsWorld, CollisionShape
tilemap Tilemap management.
Tilemap, TileLayer, TileDefinition
profiler Performance profiling tools.
PerformanceProfiler, ProfileSection
saveload Save/load system.
SaveManager, GameSave, Saveable
particles Particle effects.
ParticleEmitter, ParticleEmitterConfig
Prebuilt emitters: fire(), smoke(), etc.
scene Scene management.
MenuScene, GameScene
Switching between scenes
animation Transform & color animations.
EntityAnimations, AnimationLayer
Keyframe animations with easing
assets Asset loading and file watching.
AssetId, FileWatcher
Hot-reload support