Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
477d959
feat: add universal build script for easy project compilation
LyeZinho May 16, 2026
d65b19b
docs: add BuildSystem Integration design document
LyeZinho May 16, 2026
80d5611
feat: implement BuildSystem integration with 7-stage pipeline, BuildD…
LyeZinho May 16, 2026
81e8245
fix: add imgui_test_engine sources to doppio executable linking
LyeZinho May 16, 2026
0bf8067
feat: implement ProjectStartupDialog - critical project startup workflow
LyeZinho May 16, 2026
c1c7d67
feat: add drag-drop support to ScriptEditorWindow - drag .lua files f…
LyeZinho May 16, 2026
0413395
feat: add drag-drop support to AudioPreviewPanel - drag .wav/.ogg fil…
LyeZinho May 16, 2026
60d5957
feat: implement AnimationTimeline playback with delta time - add fram…
LyeZinho May 16, 2026
238637f
feat: implement TilemapEditor visual grid canvas with tile painting a…
LyeZinho May 16, 2026
e118639
fix: use BeginPopupModal for ProjectStartupDialog to ensure proper re…
LyeZinho May 16, 2026
d4e48d7
Fix ProjectStartupDialog: switch from modal popup to regular window, …
LyeZinho May 16, 2026
a135349
Fix: ProjectStartupDialog ImGui rendering
LyeZinho May 16, 2026
4cb2f45
docs: add ProjectStartupDialog tabs design specification
LyeZinho May 16, 2026
a4aef38
docs: add ProjectStartupDialog tabs implementation plan
LyeZinho May 16, 2026
6ef22e6
feat: add toast notification data structure to ProjectStartupDialog
LyeZinho May 16, 2026
946af26
feat: implement toast notification methods (showToast, updateToasts)
LyeZinho May 16, 2026
af1a708
feat: implement toast notification rendering with ImGui
LyeZinho May 16, 2026
fa5b334
feat: refactor render() into tab-based architecture with BeginTabBar
LyeZinho May 16, 2026
6e7b7f9
feat: add recent projects state variables to ProjectStartupDialog
LyeZinho May 16, 2026
690affe
feat: implement Open Recent tab with search filtering
LyeZinho May 16, 2026
4f1031f
feat: implement Browse Projects tab with results list
LyeZinho May 16, 2026
27177fc
feat: implement file picker for project creation and browsing
LyeZinho May 16, 2026
ba207d4
fix: prevent state pollution between multiple file pickers
LyeZinho May 16, 2026
6096d96
fix: file picker state management and integration
LyeZinho May 16, 2026
67e85c5
fix: prevent file picker from re-opening after cancellation
LyeZinho May 16, 2026
ec1a61b
fix: call ImGui::End() regardless of Begin() return value
LyeZinho May 16, 2026
feea0ee
fix: ImGui ID conflicts in Open Recent and Browse tabs
LyeZinho May 16, 2026
107ed2c
fix: close ProjectStartupDialog when project is selected
LyeZinho May 16, 2026
adf49c4
docs: add comprehensive session summary for ProjectStartupDialog impl…
LyeZinho May 16, 2026
23d3f57
chore: add .worktrees/ to gitignore
LyeZinho May 17, 2026
fc6094d
docs: add three-phase design for doppio editor integration + phase 2-…
LyeZinho May 17, 2026
45db648
docs: add detailed three-phase implementation plan with bite-sized tasks
LyeZinho May 17, 2026
fc4c941
feat: add CAP file browsing mode to Asset Browser
LyeZinho May 17, 2026
9abec52
feat: add audio waveform generator for Asset Browser previews
LyeZinho May 17, 2026
715a95c
feat: add drag-drop auto-pack import to Asset Browser
LyeZinho May 17, 2026
b2e2108
feat: add placeholder for game.cap auto-load on project open
LyeZinho May 17, 2026
5c2187b
feat: add Phase 1 integration tests with Catch2
LyeZinho May 17, 2026
bb5135d
chore: update caf-pack submodule reference (Task 2.1: Mesh Processor)
LyeZinho May 17, 2026
7ed1c73
chore: update caf-pack submodule reference (Task 2.2: Compression)
LyeZinho May 17, 2026
24a517c
Submodule: Update caf-pack to include Task 2.3 (Asset ID Header Gener…
LyeZinho May 17, 2026
4ad5118
Task 3.1: Implement async asset loading infrastructure
LyeZinho May 17, 2026
33ec08d
Task 3.2: Document complete ecosystem workflow
LyeZinho May 17, 2026
0c7f14d
Task 3.3: Add Phase 2 & 3 verification tests
LyeZinho May 17, 2026
9103dc0
fix: add missing CapLoader and AudioWaveformRenderer to DoppioTest
LyeZinho May 17, 2026
2a5de94
fix: update caf-pack submodule to use FNV-1a per specification
LyeZinho May 17, 2026
4596a2d
feat: add grid rendering to Scene Viewport
LyeZinho May 17, 2026
d5fb975
feat: add Camera2D and Camera3D components
LyeZinho May 17, 2026
45b9d6b
feat: add Light components (Directional, Point, Spot)
LyeZinho May 17, 2026
c5f5bd0
feat: add MeshRenderer components
LyeZinho May 17, 2026
770c4a0
feat: add entity type selector UI to Hierarchy Panel
LyeZinho May 17, 2026
99152ef
fix: rename ECS components to avoid namespace collisions
LyeZinho May 17, 2026
6eaad41
Fix namespace collision and build errors - remove using namespace Caf…
LyeZinho May 17, 2026
fa7b949
Fix caf-pack subdirectory reference in CMakeLists.txt
LyeZinho May 17, 2026
0ccdfb8
fix: make caf-pack submodule optional in CMake build
LyeZinho May 18, 2026
57bd09d
fix: make editor dependencies optional for headless build
LyeZinho May 18, 2026
88d768a
fix: wrap caf-pack dependencies in AssetBrowser and disable tests
LyeZinho May 18, 2026
e097e67
fix: resolve ProjectStartupDialog linker errors in doppio
LyeZinho May 18, 2026
2767410
fix: enable FilePicker on Windows for Browse and Recent tabs
LyeZinho May 18, 2026
40a575b
feat: apply cleaner default layout profile on IDE startup
LyeZinho May 18, 2026
05ef449
fix: increase FilePicker window size to reduce scrolling
LyeZinho May 18, 2026
417a0d4
feat: enable Lua scripting by default for editor build
LyeZinho May 18, 2026
ac7125a
feat(editor): add play mode state and system members to SceneEditor
LyeZinho May 18, 2026
d30b98d
feat(editor): implement play/pause/stop mode with entity snapshot and…
LyeZinho May 18, 2026
dd6e12f
feat(editor): add physics collider debug overlay to scene viewport
LyeZinho May 18, 2026
ae5161d
feat(editor): add script component inspector drawer with path and loa…
LyeZinho May 18, 2026
1f47794
feat(editor): add tileset asset loading with texture-based tile palette
LyeZinho May 18, 2026
59929fa
feat(editor): wire tileset load command into command palette
LyeZinho May 18, 2026
5f33437
feat(editor): add Collider2D, Velocity2D and Health inspector drawers
LyeZinho May 18, 2026
52ab107
fix(editor): sync recent projects list from ProjectManager on every r…
LyeZinho May 18, 2026
b0ddf27
feat: multi-select, copy/paste/duplicate, physics debug toggle, snap …
LyeZinho May 18, 2026
71ccdf6
feat: add GameObject primitives, UI components, and UISystem integration
LyeZinho May 18, 2026
3cd1d10
docs: add Inspector 2.0 implementation plan
LyeZinho May 18, 2026
092717e
feat(ecs): add Transform component and DisabledTag
LyeZinho May 18, 2026
0bdef6d
feat(editor): add InspectorWidgets helper library
LyeZinho May 18, 2026
71eef32
feat(editor): add ComponentRegistry with all component entries
LyeZinho May 18, 2026
7b4148c
feat(inspector): unified Transform drawer and ComponentHeader lifecycle
LyeZinho May 18, 2026
79fea16
feat(inspector): asset picker fields for Sprite, AudioSource, MeshFilter
LyeZinho May 18, 2026
8d97efe
feat(inspector): searchable Add Component menu via ComponentRegistry
LyeZinho May 18, 2026
9790e25
feat(hierarchy): new entities created with Transform component
LyeZinho May 18, 2026
70c0a23
fix: 4 editor bugs - transform sync, gizmo, component popup, tab flic…
LyeZinho May 19, 2026
de326a0
feat: dual script system - Lua and C++ scripts
LyeZinho May 19, 2026
60f61e2
refactor: move game scripts from scripts/ to assets/scripts/
LyeZinho May 19, 2026
3191715
feat(editor): move play/pause/stop buttons into main menu bar
LyeZinho May 19, 2026
b03e83f
fix(editor): add missing Position2D constraint in enterPlayMode query…
LyeZinho May 19, 2026
2e4979c
feat(editor): empty entities now include Transform/Position2D/Rotatio…
LyeZinho May 19, 2026
d4101f3
feat(viewport): draw diamond marker for empty entities with Position2…
LyeZinho May 19, 2026
59434b2
fix(editor): add Transform/Position2D to entities created via toolbar…
LyeZinho May 19, 2026
d035dac
feat(editor): collider debug color per-collider + ColorEdit4 in inspe…
LyeZinho May 19, 2026
800b1aa
fix(physics): remove Collider2D dependency from integrate/sleep; auto…
LyeZinho May 19, 2026
454fef1
fix(collider): world-unit sizes — default 1x1, drag step 0.01 so coll…
LyeZinho May 19, 2026
cdc2ad4
fix(physics): correct gravity (-9.81 not *60), disable sleep under gr…
LyeZinho May 19, 2026
b781a2f
fix(collider): default size 1x1 radius 0.5 in ComponentRegistry (was …
LyeZinho May 19, 2026
1d88045
feat(editor): Camera Preview dock panel — shows scene from camera POV…
LyeZinho May 19, 2026
1563e7a
chore: remove stale example script files
LyeZinho May 19, 2026
ad87924
feat(editor): Camera2D auto-adds Position2D; draw camera frustum in s…
LyeZinho May 20, 2026
ce447ae
feat(ecs): unify Transform component, remove Position2D/Rotation/Scale2D
LyeZinho May 20, 2026
5b6e004
feat(editor): add ViewMode + camera orbit state to EditorContext
LyeZinho May 20, 2026
1005469
feat(viewport): 3D/2D/Iso modes, XYZ gizmos, orbit camera, 3D grid
LyeZinho May 20, 2026
08b802a
fix(viewport): infinite grid, 3D pan, projected gizmo axes
LyeZinho May 20, 2026
654a565
fix(viewport): extend grid to horizon, normalize gizmo axis lengths
LyeZinho May 20, 2026
2269540
fix(viewport): depth-clip grid, arrow key navigation, revert middle m…
LyeZinho May 20, 2026
874e3e2
fix(viewport): arrow key ux, grid quadrant, gizmo Z fallback, nav wid…
LyeZinho May 20, 2026
1467b5c
fix(viewport): near-plane clip grid lines instead of skipping
LyeZinho May 20, 2026
2897f47
fix(viewport): camera-oriented mini gizmo, gizmo Z/Y overlap guard, a…
LyeZinho May 20, 2026
13d241a
docs: add formal LaTeX specification for Caffeine Engine internals
LyeZinho May 20, 2026
d478a11
refactor(docs): split caffeine-internals into folder structure with s…
LyeZinho May 20, 2026
2745396
fix(docs): prevent orphan headings and split lists with needspace + w…
LyeZinho May 20, 2026
91d2b3d
docs: complete caffeine-internals LaTeX spec with 11 new chapters
LyeZinho May 20, 2026
b455de7
fix(editor): TransformGizmo absolute drag, MaterialEditorPanel layout…
LyeZinho May 20, 2026
f118777
Changes
LyeZinho May 20, 2026
94be56e
docs(latex): fix LaTeX syntax errors in specbox environments and comp…
LyeZinho May 21, 2026
a6a7662
fix(gizmo): world-space axes \u2014 remove hardcoded screen-space fal…
LyeZinho May 21, 2026
bf30b8b
fix(editor): TransformGizmo analytic foreshortening for 3D world-spac…
LyeZinho May 21, 2026
21df694
fix(editor): drawGizmo 3D analytic foreshortening with depth sort and…
LyeZinho May 21, 2026
f249394
feat(editor): gizmo 3D rotate rings, axis hover highlight, X/Y/Z key …
LyeZinho May 21, 2026
50a45a6
fix(editor): gizmo local space + inspector 3D rotation/scale fields
LyeZinho May 21, 2026
12d4e94
feat(editor): entity hierarchy with transform inheritance
LyeZinho May 21, 2026
56092cd
feat(editor): auto-expand parent after drag-drop + Unparent action
LyeZinho May 21, 2026
943c412
feat(hierarchy): transform/disabled/layer inheritance
LyeZinho May 21, 2026
b63c0b1
feat(animation): named parameter system with SetBool/SetFloat/SetTrig…
LyeZinho May 22, 2026
5f59e97
feat(editor): AnimationTimeline ruler, scrubber and keyframe diamonds
LyeZinho May 22, 2026
1376a53
feat(editor): AnimatorController window with state machine canvas and…
LyeZinho May 22, 2026
a0b511d
feat(editor): wire AnimatorController into SceneEditor docking, comma…
LyeZinho May 22, 2026
56fe630
refactor(ecs): remove game-specific Health struct and migrate Velocit…
LyeZinho May 22, 2026
a90dcbd
refactor(editor): remove Health and Velocity2D from inspector, regist…
LyeZinho May 22, 2026
ee2c2e4
refactor(engine): remove Health and Velocity2D from scene serializer …
LyeZinho May 22, 2026
d9fbb23
feat(editor): AssetBrowser updates
LyeZinho May 22, 2026
d9fb901
docs(animation): add scripting reference chapter 11 covering animatio…
LyeZinho May 22, 2026
bf94a16
fix: support Position3D/Rotation3D in light gizmo rendering
LyeZinho May 23, 2026
4ab0a9d
docs: add chapter on polygons and 3D representations to internal refe…
LyeZinho May 23, 2026
3fb5eaa
feat: implement glTF/glb mesh encoding to .caf format
LyeZinho May 23, 2026
351e759
feat: add mesh asset resolution to runtime AssetManager
LyeZinho May 23, 2026
e925027
feat: add prefab asset resolution to runtime AssetManager
LyeZinho May 23, 2026
95c61e1
feat: enable mesh drag-and-drop in scene viewport
LyeZinho May 23, 2026
2892631
feat: add 'Save as Prefab' command to inspector
LyeZinho May 23, 2026
01aa9cd
fix: update PrefabSerializer to use CAF format instead of custom binary
LyeZinho May 23, 2026
3ee31f7
feat: complete mesh and prefab pipeline wiring with editor integration
LyeZinho May 23, 2026
883b45a
wiring: integrate mesh and prefab components with editor systems
LyeZinho May 23, 2026
0f33e1d
feat: Implement 3D glTF mesh rendering in viewport
LyeZinho May 23, 2026
03d5d30
feat: add mesh caching system to avoid reloading per frame
LyeZinho May 23, 2026
dbc6319
feat: integrate mesh cache into viewport rendering
LyeZinho May 23, 2026
0d222a3
feat: add filled geometry rendering with semi-transparent blue fill
LyeZinho May 23, 2026
d6568a9
feat: load and display embedded glTF textures in viewport
LyeZinho May 23, 2026
826fae3
feat: add LOD level generation framework for mesh simplification
LyeZinho May 23, 2026
53bfd40
docs: add detailed implementation plan for gizmo raycasting with VP-i…
LyeZinho May 23, 2026
6737367
feat(gizmo): add screenToWorldRay helper for VP-inverse raycasting
LyeZinho May 23, 2026
a4dd94e
feat(gizmo): add rayToAxisSegmentDistance for finite axis picking
LyeZinho May 23, 2026
bafbc47
feat(gizmo): integrate raycasting into intersectTest for world-space …
LyeZinho May 23, 2026
561ec8e
fix(gizmo): add edge case handling for VP inverse and axis length val…
LyeZinho May 23, 2026
9a569f3
docs(gizmo): add performance & threshold tuning analysis
LyeZinho May 23, 2026
3d8c1a9
feat(selection): add rayIntersectsAABB and raycastSelectEntity functions
LyeZinho May 23, 2026
3044f14
feat(selection): integrate click detection and raycasting into viewport
LyeZinho May 23, 2026
6f200fc
fix(selection): add edge case handling for invalid AABBs and point en…
LyeZinho May 23, 2026
f76d062
feat(editor): add delete key to remove selected entity with undo
LyeZinho May 23, 2026
f3e8a10
feat(editor): add multi-select with Shift+Click (toggle selection)
LyeZinho May 23, 2026
638db40
feat(editor): add double-click to focus camera on selected entity
LyeZinho May 23, 2026
3ce2bf0
feat: add TestUIMapper and TestRequestHandler headers for UI test fra…
LyeZinho May 23, 2026
ccb42ea
feat: implement TestUIMapper::captureViewportState and clickAtCoordinate
LyeZinho May 23, 2026
91b0f7e
feat: implement TestRequestHandler JSON parsing and response generation
LyeZinho May 23, 2026
2d0886b
feat: integrate TestRequestHandler into SceneViewport render loop
LyeZinho May 23, 2026
3b7346c
feat: add JSON-based UI test framework with headless Doppio
LyeZinho May 24, 2026
5950274
Content update
LyeZinho May 24, 2026
38668c8
fix: correct 3D rendering pipeline and add automated UI tests
LyeZinho May 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ compile_commands.json
# Test output
Testing/
CTestTestfile.cmake

# Git worktrees
.worktrees/
287 changes: 287 additions & 0 deletions .planning/CAFFEINE_STATUS_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,287 @@
# Caffeine Engine - Current Status & Implementation Roadmap

**Branch**: `121-44-audio-preview-spatial-placement`
**Date**: 2026-05-18

---

## 1. BUILD & IDE STATUS ✅

### Completed
- ✅ doppio.exe fully builds and launches (1.2 MB)
- ✅ All executables built: doppio, caf-encode, caffeine-combined
- ✅ SDL3 integrated and working
- ✅ Clean default UI layout (Hierarchy + Viewport only)
- ✅ File picker works for project creation
- ✅ Project manager operational

### Known Issues to Fix
- ⚠️ FilePicker window requires scrolling (fixed window size ~600x400)
- **Fix**: Make window resizable and increase default size
- **File**: `src/editor/FilePicker.cpp` line 96-97

---

## 2. ARCHITECTURE OVERVIEW

### ECS (Entity Component System)
**Status**: ✅ Fully implemented and working

**Core Files**:
- `src/ecs/Entity.hpp` - Entity definition
- `src/ecs/World.hpp` - World/scene management
- `src/ecs/Components.hpp` - Basic components (Position2D, Velocity2D, Rotation, Scale2D, Sprite, Health, Tag, ParticleEmitterComponent)
- `src/ecs/ComponentID.hpp` - Component type system
- `src/ecs/ComponentQuery.hpp` - Entity querying

**Current Components Available**:
1. **Transform**: Position2D, Velocity2D, Acceleration2D, Rotation, Scale2D
2. **Visual**: Sprite (name, frameIndex only - minimal)
3. **Audio**: AudioComponents.hpp (exists but not integrated)
4. **Animation**: AnimationComponents.hpp (exists)
5. **Camera**: CameraComponents.hpp
6. **Light**: LightComponents.hpp
7. **Particle**: ParticleEmitterComponent
8. **Mesh**: MeshComponents.hpp (3D, not priority for 2D)
9. **Health/Tag**: For basic game mechanics

---

## 3. FEATURE GAPS & PRIORITIES

### 🔴 CRITICAL (Blocking Game Development)

#### 1. **Inspector Panel - Minimal (15-20% complete)**
- **Current State**:
- Only 6 component drawers implemented (Transform, Sprite, Camera, RigidBody2D, AudioSource, Script)
- Sprite drawer is basic: just name + frameIndex
- No property discovery/reflection system
- Hard-coded drawer registration

- **What's Missing**:
- Dynamic component property inspection
- Proper enum selection UI (e.g., for ColliderShape, ToolMode)
- Vector/color pickers
- Asset reference selectors
- Dropdown selectors for components
- Undo/redo support

- **File**: `src/editor/InspectorPanel.hpp/cpp`
- **Priority**: 🔴 CRITICAL - Can't edit entities without this
- **Effort**: ~3-5 days

#### 2. **Physics System - Incomplete (30% implemented)**
- **Current State**:
- Components exist: RigidBody2D, Collider2D, PhysicsMaterial
- PhysicsSystem2D has 700+ lines of implementation
- Collision detection logic exists
- Force/impulse system exists

- **What's Missing**:
- Physics simulation not hooked into editor/game loop properly
- Collision callbacks not firing (callOnCollision exists but untested)
- No visual debugging (collision visualizers)
- No physics settings UI in editor
- Sleep optimization incomplete

- **Files**: `src/physics/PhysicsComponents2D.hpp`, `src/physics/PhysicsSystem2D.hpp`
- **Priority**: 🔴 CRITICAL - No game without physics
- **Effort**: ~2-3 days to integrate properly

#### 3. **Scripting System - Scaffolding only (5% usable)**
- **Current State**:
- ScriptEngine exists with lifecycle hooks: onCreate, onUpdate, onDestroy, onCollision
- ScriptEngine can load scripts and call them
- Script watcher for hot-reload

- **What's Missing**:
- **No script binding** - engine classes not exposed to scripts
- **No runtime** - what language? (Lua? C#? Custom?)
- **No entity access** - scripts can't modify entities
- **No API documentation**
- Script component UI in inspector

- **Files**: `src/script/ScriptEngine.hpp/cpp`, `src/script/ScriptSystem.cpp`
- **Priority**: 🔴 CRITICAL - Game logic impossible without this
- **Effort**: ~5-7 days (depends on language choice)

#### 4. **2D Tools - Partial (40% usable)**
- **Tilemap Editor**:
- ✅ Brush, Bucket, Eraser, Picker tools defined
- ✅ TileLayer and Tilemap classes exist
- ❌ No tileset loading/display
- ❌ No rendering
- ❌ No grid visualization
- ❌ No tool UI integration

- **Sprite Handling**:
- ✅ Sprite component exists
- ❌ No sprite atlas/sheet support
- ❌ No frame animation UI
- ❌ No sprite preview in inspector

- **Files**: `src/editor/TilemapEditor.hpp/cpp`
- **Priority**: 🔴 CRITICAL for 2D - Can't make 2D games without tilesets
- **Effort**: ~4-6 days

---

### 🟡 HIGH (Important for full feature set)

#### 5. **Component Registration/Discovery**
- **Current State**: Components are discoverable via ECS but Inspector doesn't auto-discover them
- **Need**: Reflection/metadata system so inspector can show all component properties
- **Priority**: HIGH - Unlocks dynamic UI generation
- **Effort**: ~2-3 days

#### 6. **Asset Pipeline**
- **Current State**: Basic asset browser exists
- **Missing**:
- Texture import/settings
- Sprite atlas creation
- Tileset definition files
- Audio asset metadata
- **Priority**: HIGH
- **Effort**: ~3-5 days

#### 7. **Scene Serialization**
- **Current State**: Likely partial
- **Missing**: Save/load entity hierarchies with full state
- **Priority**: HIGH
- **Effort**: ~2-3 days

---

### 🟢 MEDIUM (Nice to have)

#### 8. **Particle System Integration**
- ParticleEmitterComponent exists but likely not wired to renderer
- **Effort**: ~1-2 days

#### 9. **Animation System**
- AnimationComponents exist
- **Effort**: ~2-3 days

#### 10. **3D Support**
- Components3D.hpp exists
- **Effort**: Defer - focus on 2D first

---

## 4. IMMEDIATE NEXT STEPS (Priority Order)

### Week 1:
1. **Fix FilePicker window sizing** (1 hour)
- Make resizable, increase default size to 800x600

2. **Expand Inspector with property types** (2-3 days)
- Add UI for all basic property types (float, int, bool, Vec2, color, enum)
- Test with Transform and Sprite components
- Add component add/remove UI

3. **Integrate Physics visually** (2 days)
- Hook PhysicsSystem2D into scene editor
- Add collision debug visualization
- Test RigidBody2D + Collider2D on entities

### Week 2:
4. **Basic Scripting Integration** (3-5 days)
- Choose scripting language (recommend: **Lua** for simplicity, or **C#** if .NET available)
- Create bindings for basic engine functions
- Allow attaching scripts to entities
- Test onCreate/onUpdate lifecycle

5. **2D Editor Tools** (4-6 days)
- Implement tileset editor
- Implement tilemap painter
- Grid visualization
- Basic rendering integration

---

## 5. REFERENCE ARCHITECTURE (Unity-inspired)

### Inspector (Property Editor)
```
Entity: "Player"
├─ Transform
│ ├─ Position: (0, 0) [Vec2Drawer]
│ ├─ Rotation: 45° [SliderDrawer]
│ └─ Scale: (1, 1) [Vec2Drawer]
├─ Sprite
│ ├─ Texture: [AssetSelector]
│ ├─ Frame: 0 [IntDrawer]
│ └─ Color: white [ColorDrawer]
├─ RigidBody2D
│ ├─ Mass: 1.0 [FloatDrawer]
│ ├─ Gravity Scale: 1.0 [FloatDrawer]
│ ├─ Constraints: [FlagDrawer]
│ └─ Collision Matrix [LayerMaskDrawer]
├─ Collider2D
│ ├─ Shape: AABB [EnumDrawer]
│ ├─ Size: (32, 32) [Vec2Drawer]
│ ├─ Layer: 0 [LayerDrawer]
│ └─ Is Trigger: false [BoolDrawer]
└─ [+ Add Component...]
```

### ScriptAPI (example Lua)
```lua
-- Player.lua
entity:getComponent("RigidBody2D").velocity = {100, 0}
entity:getComponent("Sprite").frameIndex = 1
input.isKeyDown("w") -- true/false
```

---

## 6. FILE CHECKLIST

### Core Systems (Check/expand these)
- [ ] `src/ecs/Components.hpp` - Add missing component types
- [ ] `src/editor/InspectorPanel.cpp` - Expand with property drawers
- [ ] `src/physics/PhysicsSystem2D.hpp` - Wire to main game loop
- [ ] `src/script/ScriptEngine.cpp` - Add engine bindings
- [ ] `src/editor/TilemapEditor.cpp` - Implement rendering
- [ ] `src/editor/FilePicker.cpp` - Fix window sizing

### Next Exploration
- [ ] How scenes are serialized (look for SceneSerializer)
- [ ] How assets are loaded (look in `src/assets/`)
- [ ] Render pipeline (look in `src/render/`)
- [ ] How systems integrate into main game loop (look in `src/engine/`)

---

## 7. BUILD & TESTING

### Current Build Status
```bash
cd build && cmake --build . --config Release
# doppio.exe ready in build/Release/

# Test game creation:
./build/Release/doppio.exe
# → Create project → Open scene → Edit entities
```

### What to Test Next
1. Create new 2D project
2. Add entity with Sprite + RigidBody2D + Collider2D
3. Verify inspector shows all properties
4. Save/load scene
5. Run game with physics

---

## SUMMARY

**Caffeine Engine is a solid skeleton** with ECS, physics, scripting, and 2D tools scaffolding in place. The critical path to usable game development is:

1. **Inspector expansion** (15-20 hours) - Make it show/edit all component properties
2. **Physics integration** (10-15 hours) - Hook to game loop, add debug visualization
3. **Scripting bindings** (20-30 hours) - Expose engine API to script language
4. **2D tools completion** (25-35 hours) - Tileset editor, tilemap painter
5. **Testing & bug fixes** (ongoing)

**Realistic timeline**: 3-4 weeks for a usable 2D indie game editor at Unity-lite feature level.
Loading