From b2ca89d8193d98aa21e9637257c3e7a7216b9bd8 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Thu, 7 May 2026 10:31:42 +0200 Subject: Add viewport/camera system with pan, zoom, and world-space cursor conversion - 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 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 8954ce6..d9b96d9 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,7 @@ - [ ] see the current action (debug?) - [ ] spawner: show queue - [ ] keyboard config -- [ ] bigger map -- [ ] move the map view +- [ ] display selected entity name in bottom banner - [ ] ecs array: on delete, replace by last and update id->index map - [ ] collision based move w smaller accuracy - [ ] perf: look for nil comparison -> more data oriented @@ -26,6 +25,7 @@ - [ ] getMoveMap could be a maintained index - [ ] entityAt could be a maintained index - [ ] KeyPatrolRequest shortcut should be Q +- [ ] mise task manager ## Bugs -- cgit v1.3