It is currently Sun Nov 19, 2017 9:14 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sun Jun 05, 2016 9:42 am 
Offline
User avatar

Joined: Thu Mar 31, 2016 11:15 am
Posts: 211
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.

Image


Attachments:
danmaku.nes [24.02 KiB]
Downloaded 111 times
Top
 Profile  
 
PostPosted: Sun Jun 05, 2016 10:57 am 
Offline
User avatar

Joined: Sat Jul 12, 2014 3:04 pm
Posts: 950
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.


Top
 Profile  
 
PostPosted: Sun Jun 05, 2016 12:49 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10113
Location: Rio de Janeiro - Brazil
As long as the collision mask is 8x16 pixels or smaller...


Top
 Profile  
 
PostPosted: Sun Jun 05, 2016 12:59 pm 
Offline
User avatar

Joined: Sat Jul 12, 2014 3:04 pm
Posts: 950
True. It's not uncommon for it to just be one pixel, though.


Top
 Profile  
 
PostPosted: Sun Jun 05, 2016 1:07 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10113
Location: Rio de Janeiro - Brazil
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!


Top
 Profile  
 
PostPosted: Sun Jun 05, 2016 1:43 pm 
Offline
User avatar

Joined: Sat Jul 12, 2014 3:04 pm
Posts: 950
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.


Top
 Profile  
 
PostPosted: Sun Jun 05, 2016 1:53 pm 
Offline
User avatar

Joined: Thu Mar 31, 2016 11:15 am
Posts: 211
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group