DevLog #1
NamiEngine » Devlog
NamiEngine — Devlog
This entry is a big one. The project crossed the line from “a platformer with editable levels” into “a game engine you build inside the browser” — and earned a real name along the way: NamiEngine.
🚀 New Features
Transform Gizmo (Unity-style Move / Rotate / Scale)
- Added a proper on-canvas transform gizmo for the selected object.
- Move — red X / green Y arrows plus a center handle for free 2-axis movement.
- Rotate — a ring handle with a live degree readout.
- Scale — axis squares for non-uniform scaling plus a center handle for uniform scale, with a live W×H readout.
- Switchable via toolbar buttons or keys
1/2/3. - Works on platforms, objects, UI elements, and the player spawn.
- The selection box, resize handles, and collider gizmo now rotate with the object instead of staying axis-aligned.
Voxel / Mesh Shape Editing
- New Mesh tool (
N) for per-cell shape editing on platforms and objects. - Left-drag to build cells, right-drag to carve — constructive and destructive 2D editing.
- Carved shapes are physically real: cells are merged into solid sub-rectangles and fed through the collision system, so holes and ledges actually behave.
Editable Polygon Shapes
- New Polygon tool (
Y): drag vertices to reshape an object freely. - Double-click an edge to insert a point; right-click a point to remove it (min. 3).
- Polygons render filled, scale with the object (points stored as fractions), and collide accurately via the same unified solid-rect path as voxels.
- Voxel and polygon modes are mutually exclusive per object — switching one clears the other.
Prefab System
- Save any scene object as a reusable prefab (platforms, objects, enemies, items, coins, UI, empties, XP orbs, checkpoints, the goal flag).
- Drag a prefab from the panel straight onto the canvas to place it.
- Linked prefabs: push an instance’s changes back to the template and re-sync every other instance (keeping each one’s position).
Project Tab
- A dedicated Project panel grouping Prefabs, Scripts, and Images.
- Folder organization for each section with inline folder creation.
- Right-click menus throughout (place, rename, move to folder, delete).
Scene Hierarchy & Parenting
- Full scene tree with stable UIDs, rename, and enable/disable per object.
- Unity-style transform parenting via drag-to-parent / drop-to-unparent.
- Empty objects as group anchors.
- Right-click context menu: Duplicate / Save as Prefab / Delete.
Lua Scripting (object-attached)
- Scripts attach to individual objects as components and only run when attached.
- Public variables — declare
public("name", default)and they surface as editable fields in the Inspector. - Script folders, a full editor, live console, and an in-app API reference.
UI Element Editor
- Drag-to-place HUD elements: button, text, panel, input field, image, raw image.
- 8-handle resize/move, rendered live in play mode.
- Buttons fire Lua hooks; input fields are typeable and save to variables.
- Image components support upload (base64) or URL.
Dockable, Customizable Editor UI
- Tabs (Inspector, Hierarchy, Level & Rules, Lua, Project) can be reordered, split side-by-side or top/bottom, and closed/reopened via right-click.
- Save Layout persists the panel arrangement.
- Foldable sections across the whole editor.
Adblock Detection
- Heuristic detection (bait element + ad-network probe) shows a soft, dismissible “please consider supporting” banner. A nudge, never a gate.
🔧 Improvements
- Autosave — debounced save after edits, with a toggle and a save indicator.
- Grid snapping is now optional — a Snap toggle (key
4) plus hold-Altfor a temporary free-move on any drag. Free placement now works for every object, including the player spawn. - Rotation-aware editing — resize-handle hit-testing now accounts for object rotation, so grabbing a corner of a tilted platform lands where you actually see the handle.
- Collider gizmo now follows the object’s real bounding box and hides itself on voxel/polygon shapes (where collision comes from the shape, not a box) — no more stale, misaligned green box.
- Play-test quality of life — reaching the goal flag in editor play-test mode no longer ends the session, so you can keep testing the rest of the level. (Real play mode still ends and shows the win screen.)
- “Decor” renamed to “Objects” throughout the UI for clarity (internal data untouched, old levels still load).
- Editor viewport polish — the playable area is now clearly framed: the grid is clipped to the world bounds and everything outside is dimmed, so empty space no longer looks like a rendering gap.
- Code cleanup — removed a duplicate
luaConsoleCleardefinition that silently broke console-overlay clearing, hardened several crash points, and dropped a hackyarguments[]access in favor of proper parameters.
🐛 Bug Fixes
- Prefab saving crashed with
Cannot read properties of undefined (reading '8')— caused by a name-lookup that read a property off an object that wasn’t passed in. Rewrote the capture to read names safely; saving any object type works now. - Folder creation didn’t work in the Project tab — it relied on
prompt(), which is blocked in this environment, and the scripts folder tried to drive a modal that wasn’t open. Replaced both with inline input fields. - Right-click did nothing in the Project tab when clicking empty space or sections with no cards. Added a project-wide context menu (New Prefab/Script Folder, Save selection as Prefab) so right-click always does something useful.
- Stray horizontal scrollbar appeared across the tab strip once all tabs couldn’t fit. Tabs now wrap to a second row with a sensible minimum width instead of scrolling.
- Gap between the side panels and the status bar let the canvas grid peek through at the bottom corners. Panels now extend to the bottom and the opaque status bar covers the seam.
- Hierarchy delete was incomplete — it didn’t handle several object types and could orphan parent/child links. Replaced with comprehensive
deleteRef/duplicateRefhelpers covering every type, with parent-link cleanup.
🏷️ Rebrand → NamiEngine
The project got its name. Renamed every player-facing string and all internal identifiers (localStorage keys, the multiplayer room, the dev console, export tags, the adblock helper) to the NamiEngine namespace. Added a one-time data migration so existing players keep their saved levels, coins, character, and settings across the rename.
🗺️ Roadmap
- True smooth-slope physics — collision is currently 8px-cell resolution, so diagonals collide as fine staircases rather than smooth ramps. Edge-normal collision is the next step.
- PvP — same-screen first, online later.
- WebGL prototype on itch.io for an early public build.
- Per-instance prefab overrides (so re-syncing a linked prefab doesn’t wipe instance tweaks).
Leave a comment
Log in with itch.io to leave a comment.