| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
| |
- Extract game engine from package main to engine/ library package
- Create examples/ package with registry, Entry type, and BuilderDeps
- Register default world as an example (moved from main())
- Add combat example: two teams of units facing each other
- Rewrite main.go as thin dispatch: go run . example [name]
- Update README with examples catalog one-liner
|
| |
|
|
| |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When a unit arrived exactly MOVE_SPEED away from its destination, it would
move there via moveToward rather than snapping. On the next tick, its own
cell appeared blocked in the moveMap, triggering a repath to an adjacent
cell — causing infinite oscillation. Fix by excluding the unit's own current
cell from the blocked check before repathing. Also adds repath-to-adjacent
logic so units that arrive while the destination is genuinely occupied by
someone else settle next to it instead of stopping mid-journey.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
| |
Introduces Input snapshot struct collected once per tick via CollectInput,
and UpdateSimulation(Input) as the ebiten-free simulation entrypoint.
Integration tests now drive the game through simulated inputs rather than
direct method calls.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
| |
|
|
| |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
| |
|
|
| |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
| |
|
|
| |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- New camera.go: Camera struct with arrow-key pan, scroll-wheel zoom toward
cursor, middle-mouse drag, exponential velocity decay, and world-bounds clamping
- Layout() now returns screen dimensions (960x640) instead of world size so
the camera GeoM transform drives all rendering
- All world entities, halos, text, path lines and spawn target converted via
camera transform in draw.go; banners remain in screen space
- selection.go: separate startScreen field so the drag-select box draws in
screen space while selection logic stays in world space
- Banner heights and font sizes scaled down to fit the 640px logical screen
- Three new integration tests: ScreenToWorld round-trip, bounds clamping,
zoom-toward-cursor stability
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
- Replace individual Entity structs with centralized component slices in Game struct (SoA layout).
- Implement bitmask-based component lookup (CM_Position, CM_Move, etc.).
- Convert logic from object-oriented Update() methods to standalone Systems (UpdateMoveSystem, UpdateGatherSystem, UpdateSpawnSystem).
- Update rendering, selection, and input handling to iterate over component arrays.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|