Skip to content

Autotiler v2.0.0 - #8

Merged
itsjavi merged 6 commits into
mainfrom
v2
Sep 26, 2026
Merged

itsjavi merged 6 commits into
mainfrom
v2

Conversation

@itsjavi

@itsjavi itsjavi commented Sep 25, 2026

Copy link
Copy Markdown
Owner

A rewrite from scratch: a TypeScript engine with tests, a new UI, a small native desktop app and a web version.

Added

  • Godot 4 export (Godot 4 support? #5): a TileSet with a terrain set, the peering bits of all 47 tiles and full-tile
    collisions. It's verified by painting every terrain combination in headless Godot 4.7. An option forces nearest
    filtering without touching the project settings.
  • Native Apple Silicon support ([Suggestion] Update electron version to support Arm 64 / Apple Silicon #7): one universal macOS app for Apple Silicon and Intel. It's about 4 MB,
    down from Electron's 100+ MB.
  • RPG Maker A2 templates as input, and conversion between the 13-tile and A2 templates.
  • Layouts: Godot 3×3 minimal (12×4), GameMaker 47 (8×6) and a 16-tile dual grid for the TileMapDual
    addon, next to v1's 11×5.
  • Exports: Tiled tilesets with a Wang set, and a PNG with an optional JSON map of every tile's neighbours.
  • A test map to paint with the tileset, fill randomly or fill with every combination.
  • Overlays for the grid, quarters, peering bits and collisions, plus a tile inspector that also works from the
    keyboard.
  • Drag and drop, pasting from and copying to the clipboard, examples, blank colour-coded templates, keyboard
    shortcuts and warnings for template problems (such as empty pieces).
  • Live updates: export straight into a folder, re-read the template when it changes and optionally re-export.
    When the folder is inside a Godot project, the app shows its res:// path.
  • Recent files and reopening the last file (desktop).
  • A web version that needs no install. Chrome and Edge also get folder export and live updates.

Changed

  • The default layout is now Godot's 3×3 minimal (12×4), the one in the Godot docs and most tutorials. Pick
    Autotiler v1 (11×5) to replace tilesets exported with v1.
  • The tile size can be anything from 2 px (v1 needed multiples of 8), and it's detected from both dimensions.
  • Godot 3 export is kept as legacy.
  • The desktop app is built with Tauri 2 instead of Electron 9 and runs on macOS 13 or later, Windows 10 or later
    and Linux.

Fixed

  • Transparent inner corners were filled in: the fill tile showed through their transparent pixels.
  • Colours shifted in PNGs with colour-space chunks (gAMA, cHRM, iCCP), because v1 let the browser
    colour-manage the pixels. v2 copies pixels exactly.
  • Tiles in 1-tile-wide strips used some quarters from the wrong template tiles, which showed as notches at small
    sizes (visible in v1's own 8 px example).
  • The Godot 3 tile with all eight neighbours had no collision shape.
  • Godot exports only worked when saved in the project root (hard-coded res:// paths). Exports now work in any
    folder.

With the Autotiler v1 layout, v2 puts every pixel where v1 did, except where v1 was wrong (above).

Remove the Electron 9 app (app.js, main.js, renderer, string-templated
Godot 3 resources, Makefile, publish script). v1 remains available at
tag 1.2.0.

Scaffold v2: pnpm 12, TypeScript 7 (solution tsconfig with a DOM-free
core project), Vite 8, React 19, Tailwind 4, Vitest 5, oxlint
(type-aware) and oxfmt, plus a CI workflow. Keep the demo templates as
examples and the favicon/icon for the new app.
…led and dual-grid export

The core works on raw RGBA buffers with a pure-JS PNG codec, so results
are identical in the browser, the Tauri webview and Node, and palettes
are never colour-managed (fixes v1's colour shifts).

- templates: Autotiler 13-tile (v1) and RPG Maker A2, both described as
  packings of the 20 quarter pieces; each output quadrant is copied
  exactly once (fixes transparent inner corners being filled in) and
  always from a quarter at the same corner (fixes v1's notched strips)
- layouts: Godot 3x3-minimal 12x4 (default), Autotiler v1 11x5,
  GameMaker 47 (8x6) and the 16-tile dual grid (TileMapDual order)
- exporters: Godot 4 TileSet (terrain set + peering bits, collisions,
  relative texture path, optional nearest-filter CanvasTexture), Godot 3
  legacy (all 47 collisions, v1-compatible tile id), Tiled .tsx Wang
  sets, PNG + JSON sidecar, deterministic zip
- source detection/validation, guide template, test-map rendering

Tests: unit tests, 23 pixel-exact golden images from the research
baseline, and a headless Godot 4 check that paints 141 cells with
set_cells_terrain_connect (skipped when Godot isn't installed).
React 19 + Tailwind 4 + Base UI, a Zustand store and a platform adapter
(web implementation here; the desktop one plugs in next).

- source panel: open, drag & drop or paste a PNG, template/tile size
  detection with actionable messages, slot overlay, examples and
  downloadable colour-coded blank templates
- tileset view: crisp device-pixel zoom, grid/quarter/peering-bit/
  collision overlays, hover inspector that highlights the source quarters
- test map: paint/erase, random terrain, all-combinations pattern, blob
  and dual-grid rendering
- export panel: layout (Godot 12x4 default, v1, GameMaker, dual grid),
  Godot 4 / Tiled / PNG (+JSON) / Godot 3, terrain name and colour,
  collisions, nearest filtering, file list preview; downloads (zip for
  several files) or writes into a folder where File System Access exists
- keyboard shortcuts, toasts, persisted settings and test map

Playwright smoke tests (Chrome + WebKit) check that the web build
exports the exact golden pixels and a valid Godot 4 zip.
…older exports

The same frontend runs inside Tauri; a lazily loaded desktop adapter
replaces the web one.

- native open/save/folder dialogs, drag & drop with real file paths
- watches the opened template and re-generates on save (optional
  auto-export into the chosen folder, so Godot reimports on its own)
- writes exports straight into a folder and remembers it; tells whether
  the folder is inside a Godot project and shows its res:// path
- settings in the store plugin, window size/position restored
- capability grants commands only, no static paths: a file or folder is
  reachable only after the user picks or drops it (persisted-scope keeps
  the grants across restarts); a real CSP instead of the template's none
- one small Rust command (godot_res_path) with a unit test

macOS builds are ad-hoc signed (no Developer ID), minimum macOS 13,
native Apple Silicon; the release .app is about 4 MB.
- "Save as RPG Maker A2 / Autotiler 13-tile": rearranges the pieces of the
  open template into the other layout (core repackTemplate; 13 -> A2 matches
  the research fixture, A2 -> 13 -> A2 round-trips)
- desktop: recent files (header menu and the empty source panel) and the
  file that was open at quit is reopened on the next launch; dropped and
  picked paths stay readable through persisted-scope
- accessibility: field labels and hints are tied to their controls (the
  switches and text inputs had no accessible names), h1 and main landmark,
  arrow keys inspect the tileset with a live status bar, muted text raised
  to >= 4.5:1 on every surface
- the export panel says why exporting is unavailable; the Godot texture
  filter tip shows once instead of after every export
- release.yml: on a v* tag (or by hand) tauri-action builds a universal macOS
  app, Windows (NSIS + MSI) and Linux (AppImage, deb, rpm) bundles into a
  draft GitHub Release; macOS stays ad-hoc signed, with the secrets for
  Developer ID signing documented in place
- pages.yml: deploys the web build from master to GitHub Pages
- itch.yml: pushes a published release and the web build with butler;
  inactive until the ITCH_GAME variable and BUTLER_API_KEY secret exist
- ci.yml: a desktop job runs cargo fmt, clippy and test
- README rewritten for v2 (features, templates, per-engine usage, install
  notes incl. macOS "Open Anyway", development); CHANGELOG lists what's new
  and the v1 bugs that are fixed
- scripts/screenshots.ts regenerates the README images
@itsjavi itsjavi added the enhancement New feature or request label Sep 26, 2026
@itsjavi itsjavi self-assigned this Sep 26, 2026
@itsjavi
itsjavi merged commit 6e6ccb8 into main Sep 26, 2026
4 checks passed
@itsjavi
itsjavi deleted the v2 branch September 26, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant