Jump to content
IGNORED

"Tall sprites" question, best practice...


Recommended Posts

Hey All!

 

I have a game that uses 'set' sprites in each DL, meaning that (for speed in execution), all sprites are already defined in the DL and they are just moved on and off the screen, depending on their vertical position. (This is so the High Sprite Address and the Horizontal Position are the only two things changed in each DL for each frame).

This game is using twelve 16-high DLs.

 

However, I am running into an issue:  I have some sprites that are 48 scanlines high, and they need to use the same DL 'slot' for each zone.  Is there a sneaky way to do this?  When I did Bentley Bear's Crystal Quest, for the 32 scanline high sprites (like the player) I used the entire $4000-$7FFF area for the sprite definitions...  blacking out above and below, and not using 'holey' DMA.  I'd rather not waste ROM space for that this time.

Any thoughts?

 

Thanks!

Bob

Edited by PacManPlus
Link to comment
Share on other sites

It's not an answer to your question, but when you used cart RAM before how did you pack the graphics in? Rather than blanking out both top and bottom as would be the case with holey DMA I've found it much more efficient to duplicate some of the graphics so as you offset them MARIA will just fill the gaps with what you want to draw anyway. This way you don't need to double-up DL entries for objects when vertically scrolling like you would 'normally'. It's allowed me to pack way more on screen than I otherwise could and with a big performance boost.
image.thumb.png.ac4090dfa2954304e1c0bba73ed95e59.png


image.gif.93a0ae023440afea27c3af22eb2fa7e0.gif

  • Like 4
Link to comment
Share on other sites

Hey Bob, I don't think there's a way to have your cake and eat it here. If you want to use DMA holes to preserve graphic rom space (i.e. doing things the usual way) you'll need to use 2 objects in each DL for each of your tall sprites. So 2 "slots" in each zone, per sprite, to use your wording, which also means twice the sprite updates per zone.

 

1 hour ago, SmittyB said:

[...] I've found it much more efficient to duplicate some of the graphics so as you offset them MARIA will just fill the gaps with what you want to draw anyway. This way you don't need to double-up DL entries for objects when vertically scrolling like you would 'normally'. It's allowed me to pack way more on screen than I otherwise could and with a big performance boost.

It's a great technique. :thumbsup:  I think that's essentially what Bob is referring to with his approach with Bentley Bear... it sounds like he drew the whole tallsprite at the same byte offset across several graphic blocks, and only added transparent padding above the top sprite graphic and below the bottom sprite graphic.

Link to comment
Share on other sites

Posted (edited)
1 hour ago, RevEng said:

Hey Bob, I don't think there's a way to have your cake and eat it here. If you want to use DMA holes to preserve graphic rom space (i.e. doing things the usual way) you'll need to use 2 objects in each DL for each of your tall sprites. So 2 "slots" in each zone, per sprite, to use your wording, which also means twice the sprite updates per zone.

Yeah, that's what I was afraid of.  I was playing around with High Address offsets and placements, and couldn't get anything workable. :(

 

1 hour ago, RevEng said:

It's a great technique. :thumbsup:  I think that's essentially what Bob is referring to with his approach with Bentley Bear... it sounds like he drew the whole tallsprite at the same byte offset across several graphic blocks, and only added transparent padding above the top sprite graphic and below the bottom sprite graphic.

That's exactly what I did... Wish I was better at explaining things 😕 Unfortunately there's all that 'blank space' though above and below the actual sprites...  It's kind of a waste to me...

 

 

Thanks guys!

Edited by PacManPlus
  • Like 1
Link to comment
Share on other sites

58 minutes ago, PacManPlus said:

It's kind of a waste to me...

 

If that memory isn't ever looked at by the DMA and transferred to the screen, you could put small subroutines there. 

  • Like 1
Link to comment
Share on other sites

Could you use regular DMA for the interior parts of the 48px high sprite, and holey DMA for just the top and bottom?

 

The 'holeyness' would of course affect everything else in the same display list zone, so it wouldn't work if you have multiple 48px high sprites with overlapping and different Y positions...

 

Edited by Ben_Larson
  • Like 1
Link to comment
Share on other sites

16 hours ago, CPUWIZ said:

If that memory isn't ever looked at by the DMA and transferred to the screen, you could put small subroutines there. 

I actually do this with PMC 40th :)

 

14 hours ago, Ben_Larson said:

...so it wouldn't work if you have multiple 48px high sprites with overlapping and different Y positions...

Which I actually do (six of them) :( 

 

Thanks guys!

Link to comment
Share on other sites

Dynamic Display List is the only way :D 

 

But I would like to mention about something else.

You can modify DL entry any time on the screen, all you need is waiting 7 cycles after WSYNC to make sure that your changes will not affect current LineRAM

 

Bellow small example of just ONE DL entry 16 line height repeated every zone .

I'm changing only x pos, but you can do this same with low/high address, pallet, width

I found it several uses for demo effect, but someone may find useful for game?

 

 

 

 

  • Like 5
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...