Just Game Engine
A comprehensive 2D game engine built for Flutter, providing everything you need to create high-performance games with rich visual effects, animations, and physics.
๐ Documentation
- Quick Start Guide - Get started in 5 minutes
- API Reference - Detailed API documentation for all classes
- Documentation - Just Game Engine documentation.
- Discord - Join our community
Screenshots
![]() |
![]() |
![]() |
![]() |
Features
Just Game Engine is a complete game development framework with 20+ major subsystems:
๐ฎ Core Engine
- Game Loop: Fixed timestep (60 UPS) with variable rendering for consistent gameplay
- State Management: Full lifecycle management (initialize, start, pause, resume, stop)
- Time Management: Delta time, time scaling, FPS tracking
- System Coordination: Centralized management of all subsystems
๐จ Rendering Engine
- 2D Canvas-Based Rendering: High-performance drawing with Flutter's Canvas API
- Renderable Objects: Circles, rectangles, lines, text, and custom renderables
- Ray Renderable:
RayRenderabledraws a glowing beam / laser / bullet trail with a two-layer glow effect and configurable fade lifetime - Camera System: Pan, zoom, and rotation with smooth transforms
- Layer Management: Z-order sorting for proper depth rendering
- Debug Visualization: Bounding boxes, coordinate grids, and performance metrics
- ECS Integration:
GameWidgetautomatically renders ECS entities viaRenderSystemalongside the classic pipeline
๐ผ๏ธ Sprite System
- Image Rendering: Load and display images with easy asset management
- Sprite Sheets: Efficiently manage multiple sprites in a single texture
- Sprite Batching:
SpriteBatchsubmits all sprites sharing an atlas in a singleCanvas.drawAtlas()call for dramatic draw-call reduction - Nine-Slice Scaling: Scalable UI elements that maintain corner details
- Flipping: Horizontal and vertical sprite flipping
โจ Animation System
- Sprite Animations: Frame-based animations from sprite sheets with customizable frame rates
SpriteAnimationclass for sprite sheet playbackfromSpriteSheet()factory for easy sprite animation creation- Independent frame count and duration per animation
- Automatic frame calculation from sprite dimensions
- Property Tweening: Animate position, rotation, scale, opacity, and color
- Easing Functions: 15+ built-in easing curves (linear, quad, cubic, elastic, bounce, etc.)
- Animation Sequences: Chain animations to play one after another
- Animation Groups: Run multiple animations in parallel
- Loop and Ping-Pong: Repeat animations infinitely or bounce back and forth
- Speed Control: Adjust animation playback speed dynamically (0.1x - 5.0x)
๐ฅ Particle Effects
- Particle Emitters: Configurable emission rate, lifetime, and spawning
- Visual Properties: Size gradients, color gradients, velocity, and gravity
- Particle Shapes: Circles, squares, and stars
- Built-in Presets: Explosion, fire, smoke, sparkle, rain, and snow effects
- Custom Particles: Create your own particle systems
โ๏ธ Physics Engine
- Rigid Body Dynamics: Semi-implicit Euler integration for reliable mass, drag, torque, and inertia simulation
- Advanced Collision Shapes: Circles, Rectangles, and arbitrary complex Polygons via SAT calculation
- True Impulse Resolution: Elastic collisions resolving linear constraints and Coulomb surface friction
- Broad-Phase Optimization: Performant $O(n)$ Spatial Grid queries with Object Sleeping features
- Physics Caching: Triangulation and expensive geometry processing can be reliably disk-cached
๐ฆ Ray Casting & Tracing
- Ray: 2D ray descriptor with origin, normalised direction, and max-distance;
Ray.fromPoints()convenience constructor - RaycastColliderComponent: ECS component marking an entity as hittable โ configurable
radius,tag,isBlocker,isReflective, andreflectivity - RaycastSystem: Query-only ECS system โ
castRay()(closest hit),castRayAll()(all hits sorted nearest-first), andhasLineOfSight()for LOS checks - RayTracer: Multi-bounce ray tracing against reflective surfaces โ configurable
maxBouncesandminReflectivity; returns aRayTracecontaining every path segment
๐ณ Scene Graph
- Hierarchical Structure: Parent-child node relationships
- Transform Propagation: Automatic world-space transform calculation
- Scene Management: Create, load, and manage multiple scenes
- Node Queries: Find nodes by name or traverse the tree
- Attachable Renderables: Link visual objects to scene nodes
๐บ๏ธ Tiled Map Support (via just_tiled)
- TMX / TSX Parsing: Full support for Tiled map editor files โ orthogonal, isometric, staggered, and hexagonal orientations
- Tile Layers, Object Layers, Image Layers & Group Layers: Complete layer hierarchy with custom properties
- GPU-Batched Rendering:
TileMapRendererusesCanvas.drawRawAtlasto submit all tiles in a single draw call for maximum throughput - Texture Atlas:
TextureAtlas.fromTileMap()builds a packed atlas from any loadedTileMap - Animated Tiles: Per-tile animation sequences driven by the engine game loop
- Spatial Hash Grid:
SpatialHashGrid<T>enables $O(1)$ AABB, point, and radius queries against map objects - Encodings & Compression: CSV, Base64, and XML tile data; GZIP, Zlib, and Zstandard compression (via
just_zstd)
๐งฉ Entity-Component System (ECS)
- Data-Oriented Architecture: Composition over inheritance for flexible entity design
- Entity Management: Create and destroy entities with generational IDs for use-after-destroy safety
- Component System: 34+ built-in components (Transform, Velocity, Physics, Health, RaycastCollider, Shape, UI, Audio, Tiled, Effect, Shader, Parallax, Particle, etc.)
- System Processing: 17+ built-in systems with standardized priorities for movement, rendering, physics, input, audio, ray casting, effects, post-processing, and more
- Query System: Find entities by component types with selective cache invalidation and integer-based hashing
- World Management: Centralized entity and system coordination with
LinkedHashSetfor $O(1)$ entity removal - Command Buffer: Deferred entity mutations via
world.commandsโ safe to call from within system updates - Event Bus: Typed inter-system messaging via
world.eventsโ subscribe withon<T>(), dispatch withfire() - Entity Prefabs: Reusable entity blueprints via
EntityPrefabโ batch-spawn withworld.instantiate() - Hierarchy Support: Parent-child entity relationships
- Reactive ECS (
src/reactive/): Signal-driven wrappers powered byjust_signalsโComponentSignal,EntitySignal,WorldSignal,ReactiveSystem, andReactiveComponentenable surgical UI updates without polling - Built-in Components (34+):
TransformComponent,VelocityComponent,RenderableComponent,SpriteComponent,PhysicsBodyComponent,PhysicsBodyRefComponent,RaycastColliderComponent,HealthComponent,LifetimeComponent,TagComponent,ParentComponent,ChildrenComponent,InputComponent,JoystickInputComponent,AnimationStateComponent,AudioSourceComponent,AudioPlayComponent,TileMapLayerComponent,TiledObjectComponent,UIComponent,TextComponent,ButtonComponent,LinearProgressComponent,CircularProgressComponent,EffectComponent,ShaderComponent,ParallaxComponent,ParticleEmitterComponent,CameraFollowComponent,CircleComponent,RectangleComponent,PolygonComponent,LineComponent,CapsuleComponent - Built-in Systems (17+):
InputSystem(100),PhysicsSystem(90),PhysicsBridgeSystem(89),MovementSystem(80),AnimationSystemECS(70),EffectSystemECS(65),GameplaySystem(60),HierarchySystem(50),RenderSystem(40),PostProcessSystem(35),BoundarySystem(30),ParticleSystemECS,CameraFollowSystem,LifetimeSystem,HealthSystem,AudioSystem,RaycastSystem,TileMapRenderSystem,TiledCollisionSystem
รฐลธโยท Shape Components
-
Self-Rendering ECS Components: Five components that extend
RenderableComponentand draw themselves every frame รขโฌโ no additional system beyondRenderSystemrequired -
CircleComponent: Circle centered on the entity's transform. Properties:radius,color,filled,strokeWidth -
RectangleComponent: Axis-aligned rectangle with optional rounded corners. Properties:width,height,color,filled,strokeWidth,cornerRadius. Conveniencesizegetter -
PolygonComponent: Convex or concave polygon defined by local-spacevertices(List<Offset>). Properties:vertices,color,filled,strokeWidth -
LineComponent: Straight line segment in local space. Properties:start,end,color,strokeWidth,roundCaps. Conveniencelengthgetter -
CapsuleComponent: Rectangle with semicircular end caps (orientation auto-flips based on aspect ratio). Properties:width,height,color,filled,strokeWidth. ComputedcapRadiusgetter
๏ฟฝ Input Management
- Keyboard Input: Key press, hold, and release detection with axis support
- Mouse Input: Position tracking, button states, scroll wheel, and delta movement
- Touch Input: Multi-touch support with pressure and size tracking
- Controller/Gamepad: Analog sticks, triggers, buttons, and D-pad support
- Virtual Joystick: Touch-based virtual joystick widget with
JoystickInputComponentECS integration - Event System: Callbacks for custom input handling
- Dead Zone: Configurable dead zones for analog inputs
- ECS Bridge:
InputSystemautomatically mapsInputManagerstate toInputComponentandJoystickInputComponenteach frame - Integrated: Automatic event capture through GameWidget with Focus and Listener
๐ต Additional Systems
-
Audio Engine: Complete audio playback system with multi-channel mixing
- Multi-Channel: Master, Music, SFX, Voice, and Ambient channels with independent volume control
- Sound Effects: Unlimited concurrent SFX via SoLoud's native voice management with automatic cleanup
- Music: Background music with fade in/out effects and seamless looping
- Audio Mixer: Per-channel volume control, mute/unmute, and master volume
- Integration: Built on
just_audio_enginefor low-latency, game-grade audio
-
Asset Management: Efficient loading and caching of game resources
- Image Assets: Load PNG/JPG images with memory tracking
- Audio Assets: Load MP3/WAV/OGG/FLAC audio files as binary data
- Text Assets: Load plain text files from asset bundle
- JSON Assets: Load and parse JSON configuration files
- Binary Assets: Load raw binary data for custom formats
- Caching: Automatic asset caching with memory usage statistics
- Asset Bundles: Group multiple assets for batch loading/unloading
-
Networking: Multiplayer and server communication (Not Implemented Yet)
๐ฌ Post-Processing
- Full-Screen Shader Passes:
PostProcessPasswraps the rendered scene in an offscreen layer and composites it through a customFragmentShader - Pass Ordering: Multiple passes chained by
passOrderโ lower order is innermost (closest to scene), higher is outermost - Per-Entity Shaders:
ShaderComponent(isPostProcess: false)wraps individual entities in acanvas.saveLayerwith a custom shader - ECS Integration:
PostProcessSystem(priority 35) bridgesShaderComponententities toRenderingEngine.addPostProcessPass/removePostProcessPasseach frame - Time Uniform:
RenderingEngine.elapsedSecondssupplies a time value for animated shader effects viasetUniformscallback
๐ Parallax Backgrounds
- Multi-Layer Scrolling:
ParallaxBackgroundcomposites any number ofParallaxLayerinstances using configurablescrollFactorX/scrollFactorYper layer - Auto-Scroll: Layers scroll continuously via
velocityX/velocityYindependent of camera movement (great for drifting clouds or rivers) - Tiling: Each layer can repeat seamlessly to fill the viewport (
repeat: true) - Visual Controls: Per-layer
scale,opacity,tint, andoffset - ECS Integration:
ParallaxComponentattaches aParallaxBackgroundto any entity;RenderSystemrenders it automatically
๐ Sprite Atlas
- Multi-Format Parsing:
AtlasParserauto-detects TexturePacker JSON Array, JSON Hash, multi-page, and Aseprite export formats โ no manual selection needed - Named Regions: Look up any frame by name via
atlas.createSprite('hero_idle_0')for one-liner sprite creation - Animation Clips: Define and register named
AtlasAnimationClipobjects; drive aSpritethrough variable-duration frames viaAtlasSpriteAnimation - Draw-Call Reduction: All sprites from the same atlas share a single GPU texture โ combine with
SpriteBatchfor maximum throughput - Quick Start:
SpriteAtlas.fromAsset('assets/heroes.json')loads and caches the atlas throughAssetManager
โจ Deterministic Effects
- Multiplayer-Ready: 11 tick-based effects (
MoveEffect,ScaleEffect,RotateEffect,FadeEffect,ColorTintEffect,SequenceEffect,ParallelEffect,DelayEffect,RepeatEffect,ShakeEffect,PathEffect) reproduce identically from integer ticks alone - Pure-Delta Contract:
applyTick(ctx, prevElapsed, currElapsed)is additive โ two effects on the same entity stack correctly; fast-forward viaapplyTick(ctx, 0, N)for late-join reconnect - Serialization:
EffectSerializer(JSON factory registry) andEffectBinaryCodec(little-endian v1 wire format) enable snapshot send over the network - ECS Integration:
EffectSystemECS(priority 65) manages per-entityEffectPlayerqueues; schedule effects viaeffectSystem.scheduleEffect(entity: e, effect: ...)) - Rollback Support:
EffectSnapshotcaptures mid-flight effect state;PredictionEffectRuntimedocuments the rollback API contract
๐ Localization
- Engine-Wide i18n:
LocalizationManagerserves string lookups to all subsystems including Narrative/Dialogue - Namespaces: Organize strings by domain (
ns: 'ui',ns: 'game') โ load separate JSON files per namespace and locale - Fallback Chain: For locale
fr_CA, lookups cascadefr_CA โ fr โ en(configurablefallbackLocale) before returning the raw key - ICU-lite Templating:
StringInterpolatorresolves{var}substitutions,{count, plural, =0{โฆ} =1{โฆ} other{โฆ}}plurals, and{gender, select, โฆ}selects - Signal-Driven:
LocalizationManager.localeSignal(aSignal<Locale>) lets widgets rebuild only when the locale changes - Flutter Widgets:
LocalizationScope,LocalizationBuilder,LocalizedText,LocaleSelector, andL10nContextextension forBuildContext
๐ฌ Narrative / Dialogue
- Yarn Spinner 2.x: Full parser and runtime for
.yarnscript files โ linear dialogue, branching choices, hub-and-spoke, and cutscene patterns - Condition & Command Registries: Register Dart callbacks for
<<if>>conditions and<<command>>blocks at runtime - Expression Evaluator: Handles variables, comparisons, and arithmetic in Yarn if-conditions
- Localization Bridge:
DialogueLocalizerdelegates all storage and signal handling toLocalizationManagerunder namespace'dialogue' - ECS Integration:
DialogueComponent+TriggerComponent+DialogueSystemlet entities own and trigger scripted dialogue - UI Widgets:
DialogueBoxWidgetandDialogueChoicesWidgetfor ready-made in-game dialogue UI; fully composable
๐งฎ Math Module
- Vec2: Mutable 2D vector type for zero-allocation hot-path physics โ in-place
add(),sub(),addScaled(),scale(),setZero(), andOffsetinterop - Quadtree: Spatial indexing for viewport culling with configurable
maxItemsandmaxDepth
๐๏ธ Memory Management
- Object Pool: Generic
ObjectPool<T>with configurablemaxSize,acquire()/release()lifecycle, andtotalAcquired/peakAvailablestatistics - Cache Manager: Multi-tier caching via
just_storage(key-value) andjust_database(binary) with LRU eviction, SQL-safe key validation, and configurablemaxBinaryEntries
Just Game Engine vs. Flame Engine
Both engines are strong options for Flutter game development, but they optimize for different workflows. Just Game Engine emphasizes explicit ECS/data-oriented control and a fixed-timestep simulation core, while Flame emphasizes a component-tree workflow and a broad ecosystem.
| Feature | Just Game Engine | Flame Engine |
|---|---|---|
| Architecture | ECS-first with scene graph support and explicit system ordering; includes a reactive ECS layer (just_signals). |
Flame Component System (component tree + lifecycle) with optional ECS-style integrations via ecosystem packages. |
| Game Loop | Built-in fixed-timestep simulation with accumulator clamping and interpolation support. | Default game loop updates with frame delta (dt); fixed-step behavior is typically implemented at game/app level when needed. |
| Physics | Built-in impulse-based 2D physics (SAT, broad-phase spatial grid, sleeping, ray queries). | Core includes collision systems; full rigid-body physics is commonly done with flame_forge2d (Forge2D/Box2D lineage). |
| Performance Model | Predictable simulation cadence from fixed updates; optimized for low-allocation hot paths and spatial partitioning. | Strong production performance; behavior depends on component counts, effect usage, and whether Forge2D/extra modules are in play. |
| Input Handling | Unified input manager with polling APIs (isKeyDown, mouse/touch/controller state) integrated each update tick. |
Primarily callback/mixin-driven input APIs; can also track state depending on architecture. |
| Ecosystem | Focused engine package with sibling packages (just_tiled, just_signals, etc.) for targeted expansion. |
Large, mature ecosystem (audio, tiled, physics, svg, spine, rive, and more) with extensive examples/community resources. |
| Learning Curve | Great for developers who want direct control and clear data flow through systems. | Great for developers who want fast iteration with established patterns, docs, and community support. |
Getting Started
Prerequisites
- Flutter SDK 3.11.0 or higher
- Dart 3.0.0 or higher
Installation
Add this to your package's pubspec.yaml file:
dependencies:
just_game_engine: ^1.5.2
Then run:
flutter pub get
Architecture
Just Game Engine
โโโ Core Engine
โ โโโ Engine (Main orchestrator + performanceStats)
โ โโโ GameLoop (Fixed timestep loop)
โ โโโ TimeManager (Delta time tracking)
โ โโโ SystemManager (Subsystem coordination + frame scheduler)
โโโ Math Module
โ โโโ Vec2 (Mutable 2D vector for hot-path code)
โ โโโ Quadtree (Spatial indexing for culling; cached bounds)
โโโ Memory Management
โ โโโ ObjectPool (GC-friendly object recycling)
โ โโโ CacheManager (LRU binary caching via just_storage/just_database; memory fallback)
โโโ Rendering Engine
โ โโโ RenderingEngine (Canvas rendering + post-process pass stack)
โ โโโ Camera / CameraSystem (View transformation)
โ โโโ Renderable (Base class)
โ โโโ SpriteBatch (Canvas.drawAtlas batching)
โ โโโ GameWidget (Flutter integration + debug HUD)
โโโ Post-Processing
โ โโโ PostProcessPass (Full-screen FragmentShader pass)
โ โโโ PostProcessSystem (ECS bridge; priority 35)
โโโ Sprite System
โ โโโ Sprite (Image rendering)
โ โโโ SpriteSheet (Texture atlas frames)
โ โโโ NineSliceSprite (Scalable UI)
โโโ Sprite Atlas
โ โโโ SpriteAtlas (Named-region lookup + animation clips)
โ โโโ AtlasParser (Auto-detect TexturePacker / Aseprite formats)
โ โโโ AtlasSpriteAnimation (Variable-duration frame animation)
โโโ Parallax Backgrounds
โ โโโ ParallaxBackground (Multi-layer compositor)
โ โโโ ParallaxLayer (Per-layer scroll factor + auto-scroll velocity)
โโโ Animation System
โ โโโ Animation (Base class)
โ โโโ SpriteAnimation (Frame-based)
โ โโโ TweenAnimation (Property lerp)
โ โโโ Easings (Curve functions)
โโโ Deterministic Effects
โ โโโ DeterministicEffect (Abstract tick-based base)
โ โโโ Effect types (Move, Scale, Rotate, Fade, ColorTint, Sequence, Parallel, Delay, Repeat, Shake, Path)
โ โโโ EffectSystemECS (priority 65)
โ โโโ EffectSerializer + EffectBinaryCodec (network wire format)
โ โโโ EffectSnapshot + PredictionEffectRuntime (rollback support)
โโโ Particle Effects
โ โโโ ParticleEmitter (Emission control)
โ โโโ Particle (Individual particle)
โ โโโ ParticleEffects (Presets)
โโโ Physics Engine
โ โโโ PhysicsEngine (Vec2-based simulation)
โ โโโ PhysicsBody (Rigid body with Vec2 internals)
โ โโโ CollisionEvent (Typed physics event)
โโโ Ray Casting & Tracing
โ โโโ Ray (Origin + direction descriptor)
โ โโโ RaycastColliderComponent (ECS hittable marker)
โ โโโ RaycastSystem (castRay / castRayAll / hasLineOfSight)
โ โโโ RaycastHit (Intersection result)
โ โโโ RayTracer / RayTrace (Multi-bounce reflection)
โโโ Tiled Map Support (just_tiled)
โ โโโ TileMapParser (async TMX/TSX parser)
โ โโโ TileMapRenderer (GPU-batched Canvas.drawRawAtlas)
โ โโโ TextureAtlas (Packed atlas builder)
โ โโโ SpatialHashGrid (O(1) spatial queries)
โ โโโ TileMap / Layer / MapObject (Data model)
โโโ Scene Graph
โ โโโ SceneEditor (Scene management)
โ โโโ Scene (Node container)
โ โโโ SceneNode (Transform hierarchy)
โโโ Entity-Component System
โ โโโ World (Entity management + CommandBuffer + EventBus)
โ โโโ Entity (Generational IDs, component container)
โ โโโ Component (Data storage + lifecycle callbacks)
โ โโโ System (Priority-ordered processing logic)
โ โโโ EntityPrefab (Reusable entity blueprints)
โ โโโ Built-in Components (34+):
โ โ โโโ TransformComponent, VelocityComponent
โ โ โโโ RenderableComponent, SpriteComponent
โ โ โโโ ShaderComponent, ParallaxComponent, ParticleEmitterComponent
โ โ โโโ PhysicsBodyComponent, PhysicsBodyRefComponent
โ โ โโโ HealthComponent, LifetimeComponent, TagComponent
โ โ โโโ ParentComponent, ChildrenComponent
โ โ โโโ InputComponent, JoystickInputComponent, CameraFollowComponent
โ โ โโโ AnimationStateComponent, RaycastColliderComponent
โ โ โโโ AudioSourceComponent, AudioPlayComponent
โ โ โโโ TileMapLayerComponent, TiledObjectComponent
โ โ โโโ EffectComponent
โ โ โโโ CircleComponent, RectangleComponent, PolygonComponent
โ โ โโโ LineComponent, CapsuleComponent
โ โ โโโ UIComponent, TextComponent, ButtonComponent,
โ โ LinearProgressComponent, CircularProgressComponent
โ โโโ Built-in Systems (17+):
โ โโโ InputSystem (priority 100)
โ โโโ PhysicsSystem (priority 90)
โ โโโ PhysicsBridgeSystem (priority 89)
โ โโโ MovementSystem (priority 80)
โ โโโ AnimationSystemECS (priority 70)
โ โโโ EffectSystemECS (priority 65)
โ โโโ HealthSystem (priority 60)
โ โโโ HierarchySystem (priority 50)
โ โโโ RenderSystem (priority 40)
โ โโโ PostProcessSystem (priority 35)
โ โโโ BoundarySystem (priority 30)
โ โโโ ParticleSystemECS, CameraFollowSystem
โ โโโ AudioSystem, RaycastSystem, LifetimeSystem
โ โโโ TileMapRenderSystem, TiledCollisionSystem
โโโ Reactive ECS
โ โโโ ComponentSignal (Typed property signal)
โ โโโ EntitySignal (Entity-level change tracking)
โ โโโ WorldSignal (Global world state signals)
โ โโโ ReactiveSystem (Dirty-only entity processing)
โ โโโ ReactiveComponent (Mixin with notifyChange)
โโโ Input Management
โ โโโ InputManager (Main coordinator)
โ โโโ KeyboardInput (Key states)
โ โโโ MouseInput (Position, buttons, scroll)
โ โโโ TouchInput (Multi-touch)
โ โโโ ControllerInput (Gamepad support)
โ โโโ VirtualJoystick (Touch joystick widget)
โโโ Asset Management
โ โโโ AssetManager (Loading & caching)
โ โโโ ImageAsset (PNG/JPG)
โ โโโ AudioAsset (MP3/WAV/OGG/FLAC)
โ โโโ TextAsset (Plain text)
โ โโโ JsonAsset (JSON config)
โ โโโ BinaryAsset (Raw data)
โ โโโ AssetBundle (Grouped loading)
โโโ Audio Engine
โ โโโ AudioEngine (Multi-channel mixer)
โ โโโ AudioClip (Playback control)
โ โโโ SoundEffectManager (SFX)
โ โโโ MusicManager (Background music)
โ โโโ AudioMixer (Volume control)
โโโ Localization
โ โโโ LocalizationManager (Namespace + fallback chain + plurals)
โ โโโ LocaleStringTable (Per-locale flat string map)
โ โโโ StringInterpolator ({var}, plural, select templates)
โ โโโ Flutter Widgets (LocalizationScope, LocalizedText, LocaleSelector)
โโโ Narrative / Dialogue
โ โโโ DialogueManager (Yarn Spinner facade)
โ โโโ YarnTokenizer + YarnParser (Yarn Spinner 2.x)
โ โโโ DialogueRunner (Condition + command registries)
โ โโโ DialogueLocalizer (delegates to LocalizationManager)
โ โโโ ECS (DialogueComponent, TriggerComponent, DialogueSystem)
โ โโโ UI (DialogueBoxWidget, DialogueChoicesWidget)
โโโ Additional Systems
โโโ Networking (Not Implemented)
Performance Tips
- Use Object Pooling: Reuse particles and projectiles instead of creating new ones
- Limit Renderables: Only render what's visible on screen
- Batch Rendering: Group similar draw calls together
- Profile Regularly: Use Flutter DevTools to identify bottlenecks
- Optimize Collision Detection: Use spatial partitioning for many objects
- Cache Calculations: Store frequently used values like cos/sin results
Examples
- Check out this page for all the examples showcase. (https://examples.engine.justunknown.com)
- Check out this repo for all the examples codes. (https://github.com/just-unknown-dev/just-game-engine-examples)
API Reference
Core Classes
Engine- Main engine singletonGameLoop- Game loop with fixed timestepTimeManager- Time tracking and delta time
Rendering Classes
RenderingEngine- 2D rendering systemCamera- Camera transformation and controlsRenderable- Base class for all renderablesCircleRenderable,RectangleRenderable,LineRenderable,TextRenderable,CustomRenderable
Animation Classes
Animation- Base animation classSpriteAnimation- Frame-based sprite animationPositionTween,RotationTween,ScaleTween,OpacityTween,ColorTweenAnimationSequence- Sequential animationsAnimationGroup- Parallel animationsEasings- Easing function library
Particle Classes
ParticleEmitter- Particle emission controllerParticle- Individual particle instanceParticleEffects- Built-in effect presets
Physics Classes
PhysicsEngine- Physics simulationPhysicsBody- Rigid body with collision
Ray Casting & Tracing Classes
Ray- 2D ray descriptor (origin, direction, maxDistance)RaycastColliderComponent- ECS component marking an entity as hittableRaycastHit- Intersection result (entity, point, distance, normal)RaycastSystem- On-demand query system (castRay,castRayAll,hasLineOfSight)RayTracer/RayTrace/RayTraceSegment- Multi-bounce reflective ray tracingRayRenderable- Glowing beam/laser visual with configurable fade lifetime
Tiled Map Classes (via just_tiled)
TileMapParser- Async parser for.tmx/.tsxfiles (CSV, Base64, XML; GZIP, Zlib, Zstd)TileMap- Parsed map data model with layers, tilesets, and propertiesTileLayer,ObjectLayer,ImageLayer,GroupLayer- Layer hierarchyTileMapRenderer- GPU-batched renderer usingCanvas.drawRawAtlasTextureAtlas- Packed texture atlas built from aTileMapSpatialHashGrid<T>- Generic $O(1)$ spatial hash for AABB, point, and radius queriesMapObject- Tiled object with geometry, type, and custom properties
Scene Classes
SceneEditor- Scene managementScene- Scene containerSceneNode- Hierarchical transform node
ECS Classes
World- Entity and system managerEntity- Component container with unique IDComponent- Base class for data componentsSystem- Base class for processing systems- Built-in Components (34+):
TransformComponent,VelocityComponent,RenderableComponent,SpriteComponent,ShaderComponent,ParallaxComponent,ParticleEmitterComponent,PhysicsBodyComponent,PhysicsBodyRefComponent,RaycastColliderComponent,HealthComponent,LifetimeComponent,TagComponent,ParentComponent,ChildrenComponent,InputComponent,JoystickInputComponent,CameraFollowComponent,AnimationStateComponent,AudioSourceComponent,AudioPlayComponent,TileMapLayerComponent,TiledObjectComponent,EffectComponent,UIComponent,TextComponent,ButtonComponent,LinearProgressComponent,CircularProgressComponent,CircleComponent,RectangleComponent,PolygonComponent,LineComponent,CapsuleComponent - Built-in Systems (17+):
InputSystem,PhysicsSystem,PhysicsBridgeSystem,MovementSystem,AnimationSystemECS,EffectSystemECS,HealthSystem,HierarchySystem,RenderSystem,PostProcessSystem,BoundarySystem,ParticleSystemECS,CameraFollowSystem,RaycastSystem,LifetimeSystem,AudioSystem,TileMapRenderSystem,TiledCollisionSystem
Shape Component Classes
CircleComponentโ Circle centered on the entity's transform; extendsRenderableComponent. Properties:radius,color,filled,strokeWidthRectangleComponentโ Axis-aligned rectangle with optional rounded corners; extendsRenderableComponent. Properties:width,height,color,filled,strokeWidth,cornerRadius.sizegetter returns aSizePolygonComponentโ Convex or concave polygon from local-spacevertices; extendsRenderableComponent. Properties:vertices,color,filled,strokeWidthLineComponentโ Straight line segment in local space; extendsRenderableComponent. Properties:start,end,color,strokeWidth,roundCaps.lengthgetter for segment distanceCapsuleComponentโ Rectangle with semicircular end caps (orientation flips by aspect ratio); extendsRenderableComponent. Properties:width,height,color,filled,strokeWidth.capRadiusgetter (half the shorter side)
Input Classes
InputManager- Main input coordinator with keyboard, mouse, touch, and controller accessKeyboardInput- Key press/hold/release detection with axis supportMouseInput- Mouse position, buttons, scroll, and delta trackingTouchInput- Multi-touch support with touch pointsControllerInput- Gamepad analog sticks, triggers, and buttonsMouseButton- Mouse button constants (left, right, middle)GamepadButton- Gamepad button constants (A, B, X, Y, etc.)GamepadAxis- Gamepad axis identifiers (left stick, right stick, triggers)
Asset Management Classes
AssetManager- Asset loading and caching coordinatorAsset- Base class for all asset typesImageAsset- Image asset loader (PNG/JPG)AudioAsset- Audio asset loader (MP3/WAV/OGG/FLAC)TextAsset- Plain text file loaderJsonAsset- JSON configuration file loaderBinaryAsset- Raw binary data loaderAssetBundle- Grouped asset loading/unloading
Audio Engine Classes
AudioEngine- Multi-channel audio playback coordinatorAudioClip- Individual audio source controllerSoundEffectManager- Sound effect playback wrapperMusicManager- Background music control with fade effectsAudioMixer- Volume and mute control interfaceAudioChannel- Audio channel enum (master, music, sfx, voice, ambient)AudioState- Playback state enum (stopped, playing, paused)
Post-Processing Classes
PostProcessPass- Full-screenFragmentShaderpass withpassOrderandsetUniformscallbackShaderComponent- ECS component for per-entity or post-process shadersPostProcessSystem- ECS system bridgingShaderComponententities toRenderingEngine(priority 35)
Parallax Classes
ParallaxBackground- Multi-layer parallax compositorParallaxLayer- Single layer withscrollFactorX/Y,velocityX/Y,repeat,opacity,tintParallaxComponent- ECS component attaching aParallaxBackgroundto an entity
Sprite Atlas Classes
SpriteAtlas- Named-region lookup, clip registration, and sprite/animation creationAtlasParser- Auto-detecting parser for TexturePacker JSON Array, JSON Hash, multi-page, and Aseprite formatsAtlasAnimationClip- Named clip with a list ofAtlasFrameentries (region name + duration)AtlasSpriteAnimation- Frame-by-frame animation that drives aSpritethrough anAtlasAnimationClip
Deterministic Effects Classes
DeterministicEffect- Abstract base; all effects implementapplyTick(ctx, prevElapsed, currElapsed)- Effect types:
MoveEffect,ScaleEffect,RotateEffect,FadeEffect,ColorTintEffect,SequenceEffect,ParallelEffect,DelayEffect,RepeatEffect,ShakeEffect,PathEffect EffectComponent- ECS component storing an entity'sEffectPlayerqueueEffectSystemECS- Advances all in-flight effects each tick (priority 65)EffectSerializer- JSON factory registry for serializing/deserializing effectsEffectBinaryCodec- Little-endian v1 binary wire formatEffectSnapshot- Mid-flight state capture for lock-step or rollback
Localization Classes
LocalizationManager- Central i18n service with namespace support, fallback chain, andlocaleSignalLocaleStringTable- Immutable per-locale flat string map with nested JSON flatteningStringInterpolator- ICU-lite template engine:{var},{plural},{select}LocalizationScope-InheritedWidgetexposingLocalizationManagerto the widget treeLocalizationBuilder- Rebuilds on locale change; exposest()helperLocalizedText- Drop-inTextreplacement that resolves keys viaLocalizationManagerLocaleSelector- Ready-made locale-switching UI widget
Narrative / Dialogue Classes
DialogueManager- High-level facade for loading and running.yarnscriptsYarnTokenizer/YarnParser- Full Yarn Spinner 2.x parserDialogueRunner- Executes a parsed dialogue graph; exposes condition and command registriesDialogueGraph/DialogueNode- Parsed script data modelDialogueLocalizer- Bridges dialogue string keys toLocalizationManagerDialogueComponent/TriggerComponent- ECS components for in-world dialogue ownershipDialogueSystem- ECS system processing trigger conditions each frameDialogueBoxWidget/DialogueChoicesWidget- Ready-made Flutter UI widgets for in-game dialogue
Contributing
Contributions are welcome! This engine is in active development. Join us on Discord to discuss ideas, ask questions, and connect with other developers.
License
This project is licensed under the BSD-3-Clause License - see the LICENSE file for details.
Acknowledgments
- Built with Flutter
- Inspired by Unity, Godot, and Flame engines
Libraries
- just_game_engine
- Just Game Engine for Flutter



