My web based level/nametable editor

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

zzo38
Posts: 1050
Joined: Mon Feb 07, 2011 12:46 pm

Re: My web based level/nametable editor

Post by zzo38 » Mon Oct 17, 2016 11:47 am

I just use Fossil repositories. It is easy to set up on nearly any computer.

I think "GNU Ethical Repository Criteria" are extra restrictive, although they may be reasonable for GNU projects. Some of their criteria are good for anyone, though. Specifically, good to have are: C0, C1, C2, C3, C4, B3, A0, A4, A5, A+0, A+5. In many cases, C6 should also be recommended (note: this does not mean HTTPS-only or HSTS), and A1 certainly helps. Furthermore, possibility to download with free command-line tools should also be possible, and A+2 should be followed as much as possible.
[url=gopher://zzo38computer.org/].[/url]

User avatar
gauauu
Posts: 646
Joined: Sat Jan 09, 2016 9:21 pm
Location: Central Illinois, USA
Contact:

Re: My web based level/nametable editor

Post by gauauu » Fri May 26, 2017 2:33 pm

Oh man, I was about to build something exactly like this, but decided to do a little more googling first. Glad I did, this looks like exactly what I've been looking for.
tokumaru wrote:The only way I can see a generic level editor working is if it uses user scripts for exporting the data. A hardcoded format is OK for people who are just starting and don't know any better, so anything is fine, but experienced coders have to deal with the specifics of their scrolling engines, collision attributes, storage limitations, and so on.
Actually, I prefer what tiled (and this editor) seem to do: give me some text format that represents everything the level editor knows about (and can easily be saved/loaded). I'll store that in my git repo. My build process will then have a script to generate what my build needs from that text format.

Because at the core of it is this: if a human (me) has to do an export step, there's always that question of which version is the canonical/correct one? And remember how to export. And remembering if I did the export after that last edit. I much prefer just hitting save in the level editor, and my makefile calls scripts to do the conversion *

(I learned this the hard way in the GBA version of Anguna. Fiddling with graphic data exporters was a huge pain, and a big source of mistakes and bugs)

* That is, unless I've written the entire tool, then the canonical format can just be source code, skipping any sort of export or conversion step.

User avatar
Sumez
Posts: 909
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: My web based level/nametable editor

Post by Sumez » Fri May 26, 2017 4:11 pm

In the end I think it's always best to make your own tools for your own needs. (which is essentially why I made this)
But if you do end up using this and feel like there's something important missing, let me know.

My biggest problem with Tiled, which is an otherwise great program, is not the format that it saves its maps in (like everyone's saying, you'd still be making your own pipeline for converting it), but that it's obviously not built to take the NES's limitations into account. It doesn't expect you to have to compress the data into metatiles (as I do in this, and figure most people creating multiple maps with recurring themes are probably doing), and it definitely doesn't know what an attribute table is :3

User avatar
dougeff
Posts: 2614
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: My web based level/nametable editor

Post by dougeff » Fri May 26, 2017 7:39 pm

For my ninja project. I used NES screen tool, and constructed the metatiles there. Took a screenshot. Saved it in GIMP. Opened that in Tiled. Each square in Tiled represents 1 metatile of data. Constructed the levels in Tiled. Exported as .csv. Wrote a Python script to re-organize the data and compress it.

The number of the metatile (high nibble) told my decompresser what attribute table each metatile should use.

It was a slow process.
nesdoug.com -- blog/tutorial on programming for the NES

User avatar
tokumaru
Posts: 11465
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: My web based level/nametable editor

Post by tokumaru » Fri May 26, 2017 8:12 pm

I was going to suggest something like what dougeff described to solve the metatile issue: first create a map containing only the metatiles, then export an image of them so they can be used to construct the actual map. Whenever you need to edit the metatiles, just export a new image afterwards.

That wouldn't help much with my level format that has several depths of metatiles though, that would be completely impractical. What I need to solve that problem is an editor that lets me copy and paste custom sized blocks, with the option to align to custom sized grids. The editor wouldn't even know that blocks are being reused, the encoding script would be the one responsible for finding for all the redundancies and creating all the unique metatiles at every depth.

As for the palette issue, you can always store 4 versions of the tiles/metatiles, and use the highest bits of the tile/metatile indices to select palettes when converting the data.

User avatar
Electronoob
Posts: 11
Joined: Mon Sep 29, 2014 3:28 pm

Re: My web based level/nametable editor

Post by Electronoob » Fri Oct 18, 2019 12:46 am

did this ever end up on github or whatever?

Post Reply