Here's a little demo I made this morning. It displays up to 100 bullets on the screen at once using the backround layer to prevent flicker.
Hold the A button to spawn bullets. Hold the B button to destroy bullets.
I'd been thinking: from there, when you add a player character, you can have it collide with those with less than ten cycles (check sprite-0 hit per-frame). And you can have the collision be pixel-perfect, not shaped like the displayed character, however you like.
As long as the collision mask is 8x16 pixels or smaller...
True. It's not uncommon for it to just be one pixel, though.
Myask wrote:
True. It's not uncommon for it to just be one pixel, though.
But aren't we talking about the player's collision mask here? The bullets are in the background, and there are many of them. If you're gonna use sprite 0 hits for this, sprite 0 will have to represent the player, which is often larger than 8x16, unless it's a lemming!
Ah. Yes, if the collision is "being pixel-perfect", the sprite has to be 8x16 or smaller. I think I didn't clearly distinguish between my options there.
It's not uncommon in danmaku games for the player-sprite to be much larger than its hitbox, and the hitbox to be only a single pixel (or 3x3, or similarly tiny). This is unlike Gradius and "classic" shmups where the entire ship can take damage.
The nametables get updated at 15 FPS so you would have time to do four sprite-0 checks. This means that the collision rectangle could be 16x32.
However, the bullets are actually moving at 30 FPS because the game uses palette switching to double the framerate. This has two downsides: 1) the bullets have to be a single color. 2) sprite-0 hits could happen a frame before the bullets actually collide.