Skip to content

feat: civ-style hex map with Kenney HD tiles#13

Merged
keanji-x merged 1 commit intomainfrom
feat/civ-style-map
Apr 13, 2026
Merged

feat: civ-style hex map with Kenney HD tiles#13
keanji-x merged 1 commit intomainfrom
feat/civ-style-map

Conversation

@keanji-x
Copy link
Copy Markdown
Collaborator

Summary

  • Replace procedural cartoon textures with Kenney Hexagon Pack 4x tiles (480×561 px, CC0 licensed)
  • Rewrite hex rendering: pointy-top grid, Civ-style culture borders (glowing lines at territory edges), territory color overlays (28% tint unifying same-owner hexes)
  • Per-owner roof recoloring: pixel-level green→owner-color swap on building tiles, preserving lighting
  • Add click-to-expand Portal modals for Memories, Inbox, Chronicle, Combat Log, and World Events panels
  • Territory hex list capped with scrollable overflow to prevent panel squeezing

Changes

Area Files What changed
Assets public/tiles/kenney/ (161 PNGs) Kenney 4x hex tiles — terrain, buildings, military, etc.
Hex grid HexGrid.ts Pointy-top, 480×561 base, 0.25x display scale, hex vertices
Terrain TerrainGen.ts 5 clean biomes (grass/sand/dirt/stone/mars) mapped to Kenney tiles
Map scene HexMapScene.ts Load individual PNGs, territory overlays, culture border algorithm
Buildings LocationCluster.ts Kenney building tiles + roof recolor per owner
Agents AgentSprite.ts Colored circle markers replacing meeples
Layout WorldLayout.ts Adapted to new hex dimensions
Roof recolor utils/recolorRoof.ts Canvas pixel manipulation for green→owner color
UI modals EntryModal.tsx React Portal full-screen expand for entry lists
UI panels AgentDetail.tsx, LocationDetail.tsx, Sidebar.tsx Click-to-expand on all entry panels

Test plan

  • Verify hex map renders with Kenney terrain tiles on Gravity testnet
  • Check territory color overlays and culture border lines between different owners
  • Confirm building roof colors differ per owner (red, blue, green, gold, etc.)
  • Click Memories/Inbox/Chronicle/Combat Log/World Events → modal opens centered, scrollable
  • Close modal via X button or clicking backdrop
  • Territory hex list scrolls within its card without squeezing other panels

🤖 Generated with Claude Code

Replace procedural cartoon textures with Kenney Hexagon Pack 4x tiles
(480×561 px, CC0). Rewrite hex rendering to use pointy-top grid with
culture borders, territory color overlays, and per-owner roof recoloring.
Add click-to-expand Portal modals for Memories, Inbox, Chronicle,
Combat Log, and World Events panels.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@keanji-x keanji-x merged commit 1b3e303 into main Apr 13, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant