This POC is a tile-based overhead forest world where the visual tiles are the movement grid. Every square you see is a tile with a type (Grass / Forest / Path / Water / Rock). When you edit the environment, you are literally rewriting tile values, so what you see and what the game “is” remain identical.
It’s built to prove three things:
- Generation: you can create a readable forest world procedurally from a seed.
- Navigation: you can pan/zoom and inspect tiles with consistent world → tile math.
- Direct world editing: you can modify terrain live (paint, carve, stamp, dig) with undo/redo.
Core concepts
1) Tiles are the truth
- The world is a 2D grid (
MAP_TILES × MAP_TILES). - Each tile stores a number:
0 = Grass1 = Forest2 = Path3 = Water4 = Rock
- Rendering is just a visualization of that grid.
- Movement/collisions later will read the same grid.
2) Seeded generation
- The “Seed” field controls deterministic generation.
- Same seed + same sliders = the same world layout.
- Sliders influence the thresholds and carving rules:
- Water level controls how much low “height” becomes water.
- Tree density controls how easily tiles become forest.
- Rocks controls how often high/dry tiles become rock.
- Paths controls how many walkers carve trails and how long they run.
3) Decoration ≠ terrain
- Tiles define terrain and gameplay.
- Decoration (tree blobs, waves, rock chips) is drawn on top to make tiles readable and attractive.
- Decoration is stable per tile using
decoSeed[]so tiles don’t “wiggle” when you pan.
How to use it (player controls)
Camera / navigation
- Drag (right mouse button) pans.
- Mouse wheel zooms in/out.
- Minimap click jumps the camera to that location.
- G toggles the grid overlay (debug).
Edit mode
- E toggles Edit vs Navigate.
- In Edit mode:
- Left-click / drag applies the current tool.
- Shift = erase/clear behavior (usually forces grass).
- Alt = sample tile under cursor (sets “Paint tile type” automatically).
Undo/Redo
- Z undo last edit operation.
- Y redo.
Markers
- M drops a marker at the camera center (quick bookmarking).
- “Clear markers” removes them.
The edit tools (what each one does)
These tools are meant to simulate real environmental interaction—building and destroying features directly on the map.
1) Paint tile
- Writes the selected tile type (Forest/Grass/Path/Water/Rock).
- Brush radius controls area.
- Shift clears to grass instead.
2) Stamp forest patch
- Creates a forest cluster with softer edges (not a perfect square).
- Useful for “growing” forest naturally.
- Shift clears the patch to grass.
3) Dig pond
- Writes water in the center with a grass shoreline ring.
- Makes ponds/lakes quickly without hand-painting edges.
- Shift clears to grass.
4) Carve path (drag line)
- Click-drag draws a path line between start and end.
- Brush radius controls path thickness.
- Avoids overwriting water tiles.
- Shift + drag erases paths back to grass along the drag line.
5) Clear to grass
- Forces grass in the brushed area regardless of what was there.
- Fast way to make clearings.
Environment action buttons (macro edits)
These apply around the camera center and write real tiles:
- Grow Forest: stamps a larger forest patch.
- Make Clearing: clears a larger patch to grass.
- Flood Area: digs a pond-style water region with shoreline.
- Scatter Rocks: randomly converts tiles to rock in the area (won’t overwrite water).
These are “world-affecting abilities” — the exact kind of interaction you’d later tie to items, spells, machines, or events.
Why this matters (what this POC proves)
1) Visual grid == gameplay grid
No mismatch. If movement later says “this tile is water,” the display already shows water.
2) Deterministic world + mutable world
You can regenerate a world from seed, then permanently alter it with edits. That’s the foundation for:
- building roads
- cutting forests
- digging canals
- placing structures
- terraforming
3) Undoable world edits
Edits are stored as compact tile diffs (before/after), enabling:
- undo/redo
- potential replay history
- possible networking later (diff streams)