Tile Demo


nathanielbabiak 2022-07-12 04:54 (Edited)

This is a demo for use with a tutorial I haven't published yet. It requires a tool available here.

[A] and [B] adjust the window size

[PAUSE] adjusts the cell size (the refresh speed is extra slow for the tutorial)

The tile map is from 1986's Legend of Zelda.

The tile map has a resolution of 4096x1408 pixels when using the most "zoomed in" view, but requires only 5828 bytes for the tile map. It's stored in ROM(10).

tile demo.nx | Open in app
2022-07-12 04:54

G-9 2022-07-12 09:24


SP4CEBAR 2022-07-12 13:20

Nice, diagonal movement is working smoothly too!

McPepic 2022-07-13 14:35

This is really cool! The map on the first Zelda game was really massive. I’m just wondering how you would store meta data for the tiles, like entrances, items, etc.

nathanielbabiak 2022-07-13 15:35 (Edited)

Each screen in Zelda was limited to having one cave entrance, one border palette, and one center palette. So that data was stored once per-screen, rather than per-tile.

The cave entrance information was stored as a coordinate-pair.

But, it wasn't merely data to indicate a "special" tile. This coordinate-pair was a memory pointer to some code that would run each frame. So it could show special items, moving rock tiles, statues becoming alive as enemies, etc.

nathanielbabiak 2022-07-13 15:56 (Edited)

What sucks is, I don't want to take this demo too far because Nintendo is litigious. So the tutorial will include what I wrote above, and some ideas for implementation (since this console doesn't have function pointers), but ultimately it'll be left as an "exercise to the reader".

I'm worried that if I take the demo much further, it won't be bona-fide educational, and Nintendo's lawyers would make Timo take it down, ya know?

Timo 2022-07-15 12:46

I wouldn’t worry too much about Nintendo. Yes, they shut down all the bigger fan projects, but I don’t think they care or will even notice little tech demos using their graphics.

Log in to reply.