Game-agnostic 2D engine primitives. Pure data structures and algorithms.
engine2d/— import asimport engine2dorfrom engine2d.math import Vec2- Zero external dependencies for engine core
- Python 3.12+
| Module | UC | Key Exports |
|---|---|---|
| math.py | UC-MB-018 | Vec2, Vec2i, Rect |
| color.py | UC-MB-019 | Color |
| sprite.py | UC-MB-020 | Sprite, TextureRegion |
| animation.py | UC-MB-021 | AnimationClip, AnimationPlayer, AnimationController, LoopMode |
| tilemap.py | UC-MB-022 | Tilemap, TileRegistry, TileDef |
| particles.py | UC-MB-023 | ParticleEmitter, Particle, EmitterConfig |
| collision.py | UC-MB-024 | CollisionWorld, Collider, ContactManifold, AABBShape, CircleShape, PointShape |
| pathfinder.py | UC-MB-025 | Pathfinder, PathGrid, PathRequest, PathResult, HeuristicType |
| input.py | UC-MB-026 | InputSystem, InputMap, InputAction, KeyEvent, KeyCode |
| timer.py | UC-MB-027 | Timer, TimerManager, TimerMode |
| state_machine.py | UC-MB-028 | StateMachine, State, Transition |
| audio.py | UC-MB-029 | AudioEngine, AudioClip, PlaybackHandle |
| camera.py | UC-MB-030 | Camera2D, ShakeState |
| compositor.py | UC-MB-031 | LayerCompositor, Layer |
- Internal:
from .math import Vec2, Vec2i, Rect - Internal:
from .color import Color - Tests:
from engine2d.math import Vec2
python -m pytest tests/ -v