Files and presets
Two file formats, because they answer two different needs and one format handles both badly. A project is one sprite and the work you did on it. A preset is a look, meant to be applied to many.
Projects — .tnmap
File ▸ Save project (Ctrl+S) and File ▸ Open project… (Ctrl+O).
Save writes back to the file the project was opened from or last saved to, without asking. The first save of a new project asks where to put it, and after that Ctrl+S is silent. File ▸ Save project as… (Ctrl+Shift+S) always asks, and the project then belongs to the new file. The title bar shows which file you are working in, with an asterisk when there is something unsaved.
A project contains:
- The artwork, embedded rather than referenced.
- Every painted hint layer.
- All solver settings, including the export target.
- The light rig.
- Every frame, if you have a batch open. See Frames and animation.
The artwork is embedded on purpose. A project that referenced its artwork by path would be smaller and would break constantly — moved folders, renamed exports, a copy sent to a colleague, artwork since repainted so the hints no longer line up with it. Painted hints cost your time and are meaningless against different pixels, so a project reopens intact or it is not a project.
It is JSON, so it opens in a text editor and can be read. That is how anyone works out what a file claims when a program says it cannot load it.
There is no "Save as", and no notion of a currently-open file that Save quietly overwrites. Saving always asks where to put it. That is honest about what the platform actually guarantees, and one command is less to explain than two that differ in a way you cannot rely on.
Settings presets — .tnpreset
Edit ▸ Save settings preset… and Edit ▸ Load settings preset…
A preset holds only the settings — no artwork, no hints, no lights. That is what makes it reusable: a look dialled in on one character can reach the other two hundred, go into version control, and be handed to the batch tool, without dragging a copy of a sprite along.
Loading one applies the settings over whatever sprite is currently open.
Presets do not carry hints, because hints address particular pixels and would be meaningless on another sprite. They do not carry lights, for the same reason — a light's position is in sprite pixels.
The one setting that gets special treatment is Contrast radius. A preset saved with it left at measure per sprite will keep measuring per sprite when loaded, rather than freezing whatever the original sprite happened to measure.
Presets and the batch tool are the same thing
A preset is exactly the configuration the batch tool takes, which is the point:
tnmap sprites/ --preset knight.tnpreset
Flags given on the command line override the preset, and the echoed command line shows the merged result, so it doubles as a receipt of what actually ran. See Batch and the command line.
Edit ▸ Copy batch command does the same job from the other direction: it puts a complete command line on your clipboard with your current settings written out as flags. There is a submenu for the shell you are pasting into — Bash, Zsh, Fish, PowerShell or Cmd — because quoting, path separators and line continuations differ between them and a command that needs editing before it runs is not much of a convenience.
Exporting hint layers
File ▸ Export hint layers… writes one grey PNG per painted layer into a folder you pick, named
<sprite>.hint-<layer>.png.
Worth having for two things the application cannot do on its own:
- Seeing exactly what the solver was given. A hint is a mask, and looking at it settles arguments that a preview cannot.
- Handing the work over — to a colleague, or to version control — without a project file.
Reading them back in is not built. If that would be useful to you, it is worth asking for.
What a browser can and cannot do
The desktop build always gets a proper save dialog with a folder to choose and an overwrite prompt.
Run in a browser, that depends on the File System Access API: available in Chromium-based browsers, absent elsewhere. Without
it, files are downloaded instead — which goes wherever downloads go and silently renames the second copy project (1).tnmap.
The application tells you which happened rather than reporting a download as though it were a save.