I'm just wondering, if I use 16x8 sprites do I still get 8 per scanline? Or because the sprites are double the width do I only get four?

The reason I ask is my ship is 3 sprites wide, bullet is 1 with max 2 bullets on screen so that only leaves me with two sprites for any enemies without having to code in some ugly flicker. If I get 8 bigger sprites that seems the way to go.

You don't get double width (unless you turn your monitor 90 degrees), you get double height.

Even if one sprite is made of two tiles in this mode, it's still one sprite. You get 8 per scanline, since the special internal/indirect scanline memory in PPU can hold up to 8 sprites.

16x8 8x16 mode increases the likelyhood of sprites intersecting the same scanline geometrically (since they're bigger), but lessens the amount of sprites doing so. It varies a lot if it's beneficient or not, depending on game design.

The PC Engine's sprite system (which allows for 16 sprites on a scanline) counts sprites with double width as two sprites when it comes to the scanline limit. On the other hand sprite size is set per individual sprite, so you can mix and match sprite sizes however you want.In Nintendo's consoles, sprite size is usually a global setting but each sprite is always counted as one sprite towards the scanline limit I think (I mean for Game Boy, SNES etc).

Like the NES, the Game Boy has only one sprite width. But it allows ten 8-pixel-wide sprites on a 160-pixel-wide picture, or 50% coverage. This is twice the effective coverage of the NES, which allows eight 8-pixel-wide sprites on a 256-pixel-wide picture, or 25% coverage.

Like the TurboGrafx-16 (aka PC Engine), the Sega Genesis and Super NES have a sprite coverage limit close to 100 percent of a scanline. But they also limit total sprite count per scanline regardless of size. And because they allow 8-pixel-wide sprites, sprite count can become the limiting factor on a scanline that contains mostly 8-pixel-wide sprites.

Super NES: 32 sprites or 34 8-pixel-wide sliversCoverage with 8x8 pixel sprites is 100%; coverage with larger sprites is 106%.But because all sprites are square, sprites often have to include more blank space at the top or bottom, reducing coverage on adjacent lines. TG16 suffers from this as well because of the 16x16 pixel minimum sprite size.

You don't get double width (unless you turn your monitor 90 degrees), you get double height.

Even if one sprite is made of two tiles in this mode, it's still one sprite. You get 8 per scanline, since the special internal/indirect scanline memory in PPU can hold up to 8 sprites.

16x8 8x16 mode increases the likelyhood of sprites intersecting the same scanline geometrically (since they're bigger), but lessens the amount of sprites doing so. It varies a lot if it's beneficient or not, depending on game design.

Edit: 8x16

Ah you answered another question I had... whether sprites had to be at the exact same height or any part of them on the scanline would count.

In Nintendo's consoles, sprite size is usually a global setting but each sprite is always counted as one sprite towards the scanline limit I think (I mean for Game Boy, SNES etc).

I don't know for other Nintendo's consoles, but the SNES there is two limits, one for number of sprites (32 per line), and one for number of equivalent 8x8 sprites (34 per line). So it's effectively false to say each sprite is counted as one sprite towards the scanline limit. Using a size larger than 8x8 is basically hardware metasprites made of 8x8 sprites, and you only gets two extra 8x8 sprites per line doing that. Still better than nothing, considering 34 sprites allows to simulate for a horizontally scrolling background, wheras 32 sprites only allows to simulate a non-horizontally scrolling background.

Quote:

This is twice the effective coverage of the NES, which allows eight 8-pixel-wide sprites on a 256-pixel-wide picture, or 25% coverage.

While this is true, the coverage doesn't indicate everything. For example if you know your metasprites are going to be 16x16, Gameboy only allows 5 objects, one more than the NES.

Oh I see, it's not much different from PC Engine then which is also effectively using hardware metasprites to make bigger sprite sizes then the default one by combining neighbouring patterns in the pattern table into a metasprite. Although the PC Engine's smallest sprite size is 16x16 instead of 8x8 (which is both good and bad I guess).

Quote:

Ah you answered another question I had... whether sprites had to be at the exact same height or any part of them on the scanline would count.

I remember wondering about this for the longest time too. Everyone said "you can only have 8 sprites on a scanline". On a scanline? A sprite is bigger than a scanline so what does it mean exactly? Then I learned it means that more than 8 sprites can't have any of their pixel lines sharing the same scanline at the same time.

As far as the PPU is concerned, sprites are only one scanline tall, because it draws the picture line by line. The PPU does a little math in order to know which lines of which sprites it has to show on each scanline (if scanline - sprite_y < sprite_height, that's the line to show), but it only has time to draw 8 sprite lines per scanline.

A nice trick is to have each sprite one pixel below its neighbour, and it becomes possible to have as many sprites as you want diagonally, as there will always be exactly 8 sprites per line. This effectively allows to write any arbitrary text with sprites only, at the only "cost" that is should have this weird diagonal lining.

On the other hands, sprites partially hidden by the 8-sprites per scanline limitation are useful to partially hide sprites, as seen in Castlevania II - Simon's Quest when simon enters a swamp and his feet are hidden, for example.

Who is online

Users browsing this forum: No registered users and 9 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum