Games with 16x16 background tiles

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Games with 16x16 background tiles

Post by jeffythedragonslayer »

Most/all of the games I am playing with in emulators and trying to reverse engineer to learn more use 8x8 tiles for the background. Can anyone recommend some games that use 16x16 background tiles? (That set bit4-7 of 2105h BGMODE?)
creaothceann
Posts: 611
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany
Contact:

Re: Games with 16x16 background tiles

Post by creaothceann »

Yoshi's Island is one game that uses large tiles.

You could use the tilemap viewer in Mesen-S to see the tile size while the game is running.
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
calima
Posts: 1745
Joined: Tue Oct 06, 2015 10:16 am

Re: Games with 16x16 background tiles

Post by calima »

What's your goal? It doesn't take very long to do your own ROM doing this.
iNCEPTIONAL

Re: Games with 16x16 background tiles

Post by iNCEPTIONAL »

creaothceann wrote: Thu Jun 30, 2022 10:58 pm Yoshi's Island is one game that uses large tiles.

You could use the tilemap viewer in Mesen-S to see the tile size while the game is running.
Unless Yoshi's Island's levels fit within the max 1024x1024 tilemap size (Or is that background size?), I don't quite understand the benefit of going with 16x16 tiles, if you eventually still have to update tiles as the screen scrolls anyway?

Also, is there a naming differentiation between the max tilemap (Am I actually just meaning background here?) and the tilemap for a level that ends up bigger than that?

Am I even using the correct name for those two things that are obviously slightly different?

I'm clearly still not quite understanding all this background vs tilemap vs level stuff fully.

Is it: The maximum single background size is 1024x1024 pixels (which requires using 16x16 tiles rather than 8x8 tiles), the tilemap is a way to visually tell the programmer how tiles in a level should be arranged (and can kinda be any size?), and the level is basically just the tilemap as it ultimaltely plays out in the final game (which visually looks exactly the same as the level [map] image I would hand the programmer)?

It's weird because what I've done so far and what I've handed the programmer seems to be fine, but all the online documentation, video, and talk in here just makes it extremely confusing and makes me question what I'm missing and or doing wrong, which might come back to bite me in the ass at some point if I don't get a full grasp on it now.

Note: I'm trying to understand this from a level design and art creation point of view, both the limits I have to stick within and what I actually have to give to the programmer.
User avatar
dougeff
Posts: 3079
Joined: Fri May 08, 2015 7:17 pm

Re: Games with 16x16 background tiles

Post by dougeff »

I don't quite understand the benefit of going with 16x16 tiles

One advantage is you can update the *visible tilemap with fewer writes to VRAM. Potentially giving you more VRAM time to do other things. Potentially saving you ROM / VRAM space required for tilemaps.

*ie. you only need 16x14=224 tiles in 16x16 tilesize mode to cover the entire screen... vs 32x28=896 tiles in 8x8 mode. That could save you space for the tilemap data... reduce how much data you need to transfer per frame, etc.

The tradeoff is that it's significantly more difficult to have small details, such as writing small text, in 16x16 mode. However, you can change the tile size per layer... having 16x16 background and 8x8 foreground layer, just for the text.
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
dougeff
Posts: 3079
Joined: Fri May 08, 2015 7:17 pm

Re: Games with 16x16 background tiles

Post by dougeff »

A lot of games would just not work in 16x16 tilesize mode.

Look at Tetris. Each piece is made up of 8x8 tiles that need to fit together in a 8x8 grid.

Or Simcity. Many of the things you place on the board are 8x8. It just wouldn't work with 16x16 tiles.
nesdoug.com -- blog/tutorial on programming for the NES
iNCEPTIONAL

Re: Games with 16x16 background tiles

Post by iNCEPTIONAL »

dougeff wrote: Fri Jul 01, 2022 6:04 am
I don't quite understand the benefit of going with 16x16 tiles

One advantage is you can update the *visible tilemap with fewer writes to VRAM. Potentially giving you more VRAM time to do other things. Potentially saving you ROM / VRAM space required for tilemaps.

*ie. you only need 16x14=224 tiles in 16x16 tilesize mode to cover the entire screen... vs 32x28=896 tiles in 8x8 mode. That could save you space for the tilemap data... reduce how much data you need to transfer per frame, etc.

The tradeoff is that it's significantly more difficult to have small details, such as writing small text, in 16x16 mode. However, you can change the tile size per layer... having 16x16 background and 8x8 foreground layer, just for the text.
Ah, this is interesting to know. Could come in handy at some point.

Now I'm wondering if the backgrounds for my game could just be done in 16x16 tiles (probably not, but I'm gonna have a look). . . .
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Games with 16x16 background tiles

Post by Oziphantom »

tilemap - this is how big of a tile map area you specify the SNES to use for a background.
it is either
32x32 tiles
32x64 tiles
64x32 tiles
64x64 tiles
no more no less. You don't have to use the entire area, but it will alloc and behave as if it does.

So if you have a 8x8 tile specified then you get
256x256 pixels
256x512 pixels
512x256 pixels
512x512 pixels
which is the background size

16x16 tiles you get
512x512
512x1024
1024x512
1024x1024

the level map is purely abstract and can be what ever size, feature function or form the game wants. It has nothing to do wih the hardware.
Last edited by Oziphantom on Fri Jul 01, 2022 10:20 am, edited 1 time in total.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Games with 16x16 background tiles

Post by Pokun »

iNCEPTIONAL wrote: Fri Jul 01, 2022 1:23 am Also, is there a naming differentiation between the max tilemap (Am I actually just meaning background here?) and the tilemap for a level that ends up bigger than that?

Am I even using the correct name for those two things that are obviously slightly different?

I'm clearly still not quite understanding all this background vs tilemap vs level stuff fully.

Is it: The maximum single background size is 1024x1024 pixels (which requires using 16x16 tiles rather than 8x8 tiles), the tilemap is a way to visually tell the programmer how tiles in a level should be arranged (and can kinda be any size?), and the level is basically just the tilemap as it ultimaltely plays out in the final game (which visually looks exactly the same as the level [map] image I would hand the programmer)?
A tilemap (AKA nametable) is a piece of memory (a part of VRAM) that is used to tell the PPU what background tiles to draw where on the screen. If you change a tilemap entry (which is 2 bytes) in the tilemap (which, like other VRAM changes, must be done during vblank, hblank or forced blanking), the corresponding tile on the screen will appear to change instantly to the player (if it's on the visible part of the background).

A background is a tiled layer of graphics that is not sprites. Moving a background around is called scrolling. The SNES has 4 backgrounds: BG1, BG2, BG3 and BG4 and their sizes can be set to be 1, 1x2 (arranged horizontally), 1x2 (arranged vertically) or 2x2 screens large. These sizes also directly affect how large the tilemaps are since a larger background must have more tiles (and therefore will need more VRAM). If your game for example only scroll horizontally you would pick the "1x2 (arranged horizontally)" size as "2x2" would be a waste of VRAM and "1" doesn't allow scrolling.
So in many cases "background" and "tilemap" may be used interchangeably, and I think that's possibly why you are confused.

A level is purely a conceptual thing and totally unrelated to the hardware. The SNES doesn't know or care how large your levels are. Since the background can only be 2x2 screens large, you have to keep switching out tiles that are outside view when scrolling to create the illusion that the scrollable area is much larger than the 2x2 screen large background actually is. Programming games is much about using the hardware to create illusions that appears as large living worlds to the players.
iNCEPTIONAL

Re: Games with 16x16 background tiles

Post by iNCEPTIONAL »

Thanks for that info guys.
creaothceann
Posts: 611
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany
Contact:

Re: Games with 16x16 background tiles

Post by creaothceann »

Oziphantom wrote: Fri Jul 01, 2022 9:49 am You don't have to use the entire area, but it will alloc and behave as if it does.
Pokun wrote: Fri Jul 01, 2022 9:50 am These sizes also directly affect how large the tilemaps are since a larger background must have more tiles (and therefore will need more VRAM). If your game for example only scroll horizontally you would pick the "1x2 (arranged horizontally)" size as "2x2" would be a waste of VRAM and "1" doesn't allow scrolling.
Slight correction: when rendering the screen, the PPU takes the current position and transforms it (via scroll registers etc.) to VRAM addresses. The parts of a tilemap that will never be shown on screen are never accessed, and can be used for other purposes.
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
iNCEPTIONAL

Re: Games with 16x16 background tiles

Post by iNCEPTIONAL »

Pokun wrote: Fri Jul 01, 2022 9:50 am
iNCEPTIONAL wrote: Fri Jul 01, 2022 1:23 am Also, is there a naming differentiation between the max tilemap (Am I actually just meaning background here?) and the tilemap for a level that ends up bigger than that?

Am I even using the correct name for those two things that are obviously slightly different?

I'm clearly still not quite understanding all this background vs tilemap vs level stuff fully.

Is it: The maximum single background size is 1024x1024 pixels (which requires using 16x16 tiles rather than 8x8 tiles), the tilemap is a way to visually tell the programmer how tiles in a level should be arranged (and can kinda be any size?), and the level is basically just the tilemap as it ultimaltely plays out in the final game (which visually looks exactly the same as the level [map] image I would hand the programmer)?
A tilemap (AKA nametable) is a piece of memory (a part of VRAM) that is used to tell the PPU what background tiles to draw where on the screen. If you change a tilemap entry (which is 2 bytes) in the tilemap (which, like other VRAM changes, must be done during vblank, hblank or forced blanking), the corresponding tile on the screen will appear to change instantly to the player (if it's on the visible part of the background).

A background is a tiled layer of graphics that is not sprites. Moving a background around is called scrolling. The SNES has 4 backgrounds: BG1, BG2, BG3 and BG4 and their sizes can be set to be 1, 1x2 (arranged horizontally), 1x2 (arranged vertically) or 2x2 screens large. These sizes also directly affect how large the tilemaps are since a larger background must have more tiles (and therefore will need more VRAM). If your game for example only scroll horizontally you would pick the "1x2 (arranged horizontally)" size as "2x2" would be a waste of VRAM and "1" doesn't allow scrolling.
So in many cases "background" and "tilemap" may be used interchangeably, and I think that's possibly why you are confused.

A level is purely a conceptual thing and totally unrelated to the hardware. The SNES doesn't know or care how large your levels are. Since the background can only be 2x2 screens large, you have to keep switching out tiles that are outside view when scrolling to create the illusion that the scrollable area is much larger than the 2x2 screen large background actually is. Programming games is much about using the hardware to create illusions that appears as large living worlds to the players.
The one thing that still confuses me is exactly what assets I give to the programmer if I have a level that's many screens long so he can actually put this in the game as intended by the artist and level designer:

So, for each background layer in the level, do I give him the tileset containing each of the unique tiles that will be used for everything in that full level background layer (up to 1024 unique tiles at 8x8 or 256 at 16x16, presuming I don't plan to load in any brand new tiles), the background/tilemap image (that's 1/1x2/2x1/2x2 screens large)*, and an image of the layer that shows the layout across the full level multiple screens wide so he knows where and when to actually place the tiles as the background scrolls by to match the level layout as I've designed it?

*And, if I got the stuff above correct, I don't really quite get why I need to give him the background/tilemap part anyway (or even have to think/worry about this at all for that matter), since wouldn't that technically be included in the full level image by default (be it a level one screen wide or twenty screens wide), unless I'm missing something here?
Last edited by iNCEPTIONAL on Sat Jul 02, 2022 12:12 am, edited 3 times in total.
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: Games with 16x16 background tiles

Post by jeffythedragonslayer »

Thanks it's time to touch fuzzy and get dizzy; I always loved that game on the GBA. If anyone knows of other games with 16x16 background tiles please share.
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Games with 16x16 background tiles

Post by Oziphantom »

you ideally with give the complete map and tile set. So you would make this in a map editor. It should support palletes and H and V flipped tiles. Pro Motion NG or Tiled for example.
No background image that is 1x1 -> 2x2 screens large that is a SNES hardware issue nothing to do with the level map it self.
iNCEPTIONAL

Re: Games with 16x16 background tiles

Post by iNCEPTIONAL »

Oziphantom wrote: Fri Jul 01, 2022 11:05 pm you ideally with give the complete map and tile set. So you would make this in a map editor. It should support palletes and H and V flipped tiles. Pro Motion NG or Tiled for example.
No background image that is 1x1 -> 2x2 screens large that is a SNES hardware issue nothing to do with the level map it self.
But, if the full [many-screens-wide] level map for the layer is made from the tiles in the tileset, and a level map can be basically any length, why do I need to think about the background/tilemap being no more than 1x1-2x2 screens at all? Is that background/tilemap not found within the level map and already limited per the tileset anyway?

Again, thinking of this from a level designer and artist point of view and what I have to give to the programmer and the restrictions I need to consider, where does saying having a "backround/tilemap" image no more than 2x2 screens factor in if the level map itself is way more than 2 screens wide? Isn't that technically just a background/tilemap larger than 2X2 screens?

I mean, if my level map is 20 screens wide with tiles from the tileset laid out in various configurations throughout to give the level its structure and visual variety (the individual tiles may be reused but the layout of structures could potentially vary across the whole level), which part of it is used as the 1x1-2x2 background/tilemap image then?

Let's pretend these are examples of what I'm talking about (pretend there are definitely no repeated tiles in the tileset or unnecessary gaps and so on):

So here would be the tileset made up of only unique tiles:
PretendTilesetOfUniqueTiles.png
PretendTilesetOfUniqueTiles.png (5.48 KiB) Viewed 1246 times
This would be the background/tilemap that's no larger that 2x2 screens (this one is a single screen)
PretendBackgroundTilemap.png
PretendBackgroundTilemap.png (5.15 KiB) Viewed 1246 times
And this would be the actual level that's five screen wide and using only the tiles from the tileset and a bunch of the same background elements placed in slightly different formation throughout the level for a bit of visual variety.
PretenedFullLevelMap.png
Note: This is all for just one of the layers, obviously.

What's the point of the 1x1-2x2 screen size background/tilemap here when it only use tiles from the tileset and is surely going to be contained within the level map, even if that stuff in the level is not necessarily laid out at any particular spot in the exact formation as seen in the background/tilemap (although it actually is here in the first 1/5th of the level map)?
Last edited by iNCEPTIONAL on Sat Jul 02, 2022 1:45 am, edited 13 times in total.
Post Reply