editor rework & map editing groundwork
been working on the editor again
this update was mostly about cleaning up the editor architecture so I can actually keep adding features without everything turning into spaghetti. I also finally started laying the groundwork for proper map editing.
changes
editor
reworked the editor state system.
instead of instantly swapping between states, transitions are now deferred until a safe point during the update loop. this makes switching between Edit, Play, Map Edit, and the Hub a lot cleaner, and the editor now remembers which editing mode you were in before hitting Play.
(i’ll admit… i was getting a bunch of weird, seemingly unexplainable crashes before eventually realizing my mistake was instantly switching states while things were still being updated/rendered…)
also moved more UI responsibility into the individual states instead of having EditorLayer decide how everything should be drawn.
map editor
started putting together the map editor.
currently i have:
- map hover and tile selection working
- placeholder Paint / Erase / Select tools
- the beginnings of a tile palette system
- a placeholder tile editor panel
the actual editing logic isn’t implemented yet, but the foundations are there now :)
asset picker
ripped out the old “open a native file dialog for every asset field” flow.
instead, the editor now lets you pick existing textures, meshes, materials and shaders directly from the ResourceManager, which is a lot nicer to work with and also avoids accidentally importing duplicate assets.
(the old workflow would happily create a brand new object every time you imported something… which was fine for testing, but definitely wasn’t something i wanted to keep)
rendering
fixed a few editor rendering issues while i was at it.
- materials with invalid shaders now fall back to the default shader instead of silently disappearing
- fixed some edge cases with framebuffer entity picking
- currently unused, but functional shader hot reloading tests
misc
- smoothed out editor camera movement and zoom
- added a few helper utilities for the map editor
- reorganized the editor UI code a bit
doesn’t look massively different in screenshots, but makes future work alot easier/cleaner
map painting is next ?..
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.