odd numbered background tiles vs monster tiles

Rob Burrito

New member
so i went ahead to see what i could make purely from memory after the tutorials, and went for a desert pedestrian theme. first great stumbling block was remembering background tiles are 16x16 and not 8x8. turns out pretty much every asset i rendered is an odd number of tiles and wont work with meta tiles. tried to get around it in the pathing to line them up in single row form, but that seemed like a can of worms for now. gonna make em monsters so they're able to be walked 'behind' with a short bounding box for more of a 3d effect. as a reminder for your background they have to be 16x16! i went ahead and made them monsters, and was able to place them with a few updates and interesting results like monster tiles showing up in the HUD screen, and monster 1 never being able to display correctly in testing.

for example the cactus as drawn:
odd tile number assets.PNG

as i thought they would fit:
View attachment 1

as they actually fit:
 

Rob Burrito

New member
[ATTACH type="full" alt="monster placement with special HUD not sure what's up with the pics in the forum here, but here's the in game screen the best i could get. note the HUD monster tiles, and couldn't place monster 1. any tips there lmk, figured i was over a tile limit considering how large the monster(cactus) was, but it would place monster 3 as well without issue.

in test:

[attachment=0]monster placement with special HUD appearance.PNG"]0[/ATTACH]
 

Attachments

  • monster placement with special HUD appearance.PNG
    monster placement with special HUD appearance.PNG
    37.9 KB · Views: 2,155

Rob Burrito

New member
and in the monster screen. had to add a second black to the monster palette so it wasn't blank as previously drawn with the desert palette:

cactus as monster.PNG
 

RadJunk

Administrator
Staff member
The short answer is, NES doesn't handle depth layers. That's not how it works. It doesn't even arrange objects by y value to give depth, that has to be handled through clever scripting. Right now, it isn't observed in this beta, so even if you were to get monsters working (and yes, it could be size, amount of sprites, or even just more than 8 sprite tiles on a scan line creating the problem), it wouldn't work as you'd expect it to.

There IS something called the sprite priority trick, however it involves getting into sprite bits and specific writes in the drawing function, AND using up space on both the sprite side of things AND background side of things. The best suggestion that I have is...don't plan on your game having depth like that...consider it a pretty deep advanced feature. Most games did not do this for the NES. Every once in a while, you'd find games where the player went behind the entire background (when you ducked behind a white tile in Super Mario 3, for instance), or went behind square shaped tiles (like doorways in zelda), but having tile assets that behaved in the way that we see in modern 'retro inspired' games to invoke depth is not really something the NES handled easily.
 
Top Bottom