Full notes
Full Dungeon Flop update
Read the full published notes in a cleaner layout. The original post stays linked below.
What changed
- Gameplay
- UI and audio
- Fixes
zomg i hate chat gpt so much some times. AHHHHH! burn it with fire. I decided to move the level editor into the application proper, so its a matter of moving things from "editor script world" to a "runtime script world". So it SHOULD be simple, just moving logic from A to B. But, no such luck. However, i think if i just keep with it I should have it done either later tonight or tomorrow. Then users will be able to implement their own rooms for dungeons. And as i also allow users to generate their own stories (the visual novel/play thing that happens in between dungeon runs), that lets them set flags. Little strings, like, BossRoom. Then, if a room is tagged, BossRoom, and the party has that flag, the dungeon generation algorithm will then bias the spawning of that room. This way you can have both multi-act stories (storyA -> dungeon -> storyB unlocked by storyA) ... and have those stories effect dungeon generation. So i think thats cool.
Its really easy to train chat GPT to rewrite/generate stories as it. But obviously (as i hate chat gpt today) that has issues, sometimes you'll want to get in there and fix stuff yourself. As much as i love looking at code, i suspect not everyone shares that view. so i'll have to write up a little story editor that can load up the dialogue modules and let you edit, or just start from scratch and generate. So thats another thing i'll have to make. That should be a few more days, and then back to abilities and modifying them for direct control. At that point, i think i'll be ready to put up a demo or something? so, man, i'm still shooting for before my birthday, which is in febuary. Not far off. I'll really have to work hard to do that, but i can.
Hard work only sucks when you're doing it, fun to laugh about after. Here is what i did today according to butt face chat Grand Pappy Twit-a-bit
High-level summary
Today was about stabilizing the Runtime Tile Foundry by:
Removing fragile UGUI dependencies
Unifying editor + runtime behavior
Fixing shape tools at the algorithm level
Separating concerns (UI vs logic vs math)
Eliminating race conditions, silent failures, and GC churn
A lot of time was spent undoing accidental complexity so the system behaves deterministically again.
1. UI direction change (important pivot)
Problem
Generated UGUI (top/left/right bars) was:
brittle
order-dependent
racing core initialization
silently failing (layouts disappearing, brushes breaking)
Decision
Stop fighting UGUI
Match the Editor TileFoundry architecture
Go IMGUI-only for runtime tooling
Result
Top bar, grid, and sidebars now:
self-contained
deterministic
layout-driven by RectTransforms only
zero serialized UI wiring required
This was the right call.
2. Right sidebar (tile palettes)
What was wrong
Layouts “disappearing” were caused by:
bad directory assumptions
timing issues
stale preview caches
Brushes broke because tile lookup + preview cache drifted out of sync
Fixes
Made the sidebar:
passive
poll-based
layer-aware
Explicit refresh + timed refresh
Hard cache invalidation
No guessing paths — [c]Resources.LoadAll[/c] only
Result
Tile palettes are now stable
Brush selection is explicit
No silent “nothing selected” states
3. Grid rewrite (core of the day)
Problems found
Painting sometimes did nothing
Shapes behaved incorrectly (square radius bug, line inconsistencies)
Runtime logic diverged from editor logic
Shape previews allocated lists every frame
Grid zoom could collapse below usable size
Fixes
Grid is now:
IMGUI-only
single source of truth
validated loudly ([c]LoudValidateOrDisable[/c])
Added minimum zoom enforcement based on panel + grid size
Fixed panning math
Ensured hover, drag, shapeStart, lastPaint are reset correctly
4. Shape tools: the real win
This was the most important technical cleanup.
Before
Shape logic duplicated in multiple places
Preview logic ≠ paint logic
Square tool was actually a radius-based diamond
Line tool inconsistently used Bresenham
Preview = allocation-heavy ([c]List.Contains[/c] every cell)
What we did
We extracted all shape math into:
TileFoundryShapes
This now contains:
Line
[c]Line_Bresenham(a, b)[/c] → paint
[c]Line_Contains(a, b, p)[/c] → preview (no alloc)
Rectangle
[c]Rect_Fill(a, b, size, visit)[/c]
[c]Rect_Contains(a, b, p)[/c]
Circle
[c]Circle_Fill(center, edge, size, visit)[/c]
[c]Circle_Contains(center, edge, p)[/c]
Hex
[c]Hex_Fill(center, edge, size, visit)[/c]
[c]Hex_Contains(center, edge, p)[/c]
Result
Editor and Runtime now share identical math
Preview and commit use the same geometry
No GC during preview
Shapes finally behave correctly
This fixes:
broken squares
broken lines
inconsistent circles
hex preview mismatch
5. Architectural outcome
You now have a clean separation:
UI
IMGUI layout
No state mutation beyond intent
Panels define bounds only
Grid
Handles interaction
Calls shape helpers
Owns painting rules
Shapes
Pure math
No Unity state
Reusable everywhere
This is the structure you were aiming for from the beginning.
6. Why this felt painful (but was necessary)
You were carrying editor legacy logic into runtime without isolating it
UI rewrites masked core bugs instead of fixing them
Shape bugs were math bugs, not UI bugs
Once we stopped touching UI and went straight to:
“given two points, which cells should be affected?”
Everything started snapping back into place.
Source
Changelog.gg summarizes and formats this update. How we read updates.
