It is currently Fri Dec 15, 2017 4:43 pm

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: meta-meta-sprites
PostPosted: Sat Apr 08, 2017 1:29 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2428
As I've said at least once before, my dynamic sprite engine still has one limitation left, and that is it can't duplicate a sprite pattern within a meta-sprite without also duplicating it in VRAM. I'm using a linked list VRAM slot system, where the slots in VRAM link to each other (also with sprite attributes copied for easy indexing), so duplicated meta-sprites can find copies of themselves in VRAM. However, a sprite cannot be reused multiple times within the same meta-sprite, and a sprite cannot be reused in two separate meta-sprites.

So what I'm going to do is give each object it's own RAM table of entry points to the linked list so that it is possible to use the same sprite or batch of sprites more than once per object.


Top
 Profile  
 
 Post subject: Re: meta-meta-sprites
PostPosted: Sun Apr 09, 2017 12:20 am 
Offline

Joined: Tue Feb 07, 2017 2:03 am
Posts: 262
Your multiplexing the sprites? using HDMA chains down the screen?


Top
 Profile  
 
 Post subject: Re: meta-meta-sprites
PostPosted: Sun Apr 09, 2017 8:22 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2428
Oziphantom wrote:
Your multiplexing the sprites? using HDMA chains down the screen?


No, I'm swapping out graphics from VRAM depending on what's being animated onscreen. I want to add crushing pillars that has spikes on the bottom, and a brick pattern in the middle and top. For the brick body I should stack several 32x32 sprites on top of each other with the same pattern. Unfortunately, my dynamic animation engine was designed for players and enemies, which don't need repeating sprite patterns, so if I use it for a crushing pillar, my animation engine will treat it as a really big character and waste VRAM on it, when it should need just one copy of the brick pattern.


Attachment:
brick crusher example.png
brick crusher example.png [ 6.42 KiB | Viewed 1061 times ]


The thing on the left is a brick crusher. The thing in the middle is how much memory it will take up if every part of the brick crusher is stored in VRAM separately. The thing on the right is how much memory it will take up if it can recycle sprite patterns.


Top
 Profile  
 
 Post subject: Re: meta-meta-sprites
PostPosted: Sun Apr 09, 2017 9:01 am 
Offline

Joined: Tue Feb 07, 2017 2:03 am
Posts: 262
ah you are fixing the duplication of Tile data in VRAM not Sprite Settings in VRAM. Got it, I was thinking you were trying to avoid using the same sprite settings again and again to have repeated sprites...


Top
 Profile  
 
 Post subject: Re: meta-meta-sprites
PostPosted: Sun Apr 09, 2017 4:31 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2428
I just figured out something. Because I'm using 32x32 and 16x16 sprites, not every entry in the linked list would be used. So I can use the blank spaces for "repeat sprites" where instead of using the index as the CHR bits, it uses the CHR bits from the previous sprite. All I need to do is add a 3rd "sprite size" value that represents a repeated sprite.

Edit: HEY, GOT THIS WORKING ON MY FIRST TRY! AWESOME!


Last edited by psycopathicteen on Mon Apr 10, 2017 6:32 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: meta-meta-sprites
PostPosted: Mon Apr 10, 2017 3:47 pm 
Offline
User avatar

Joined: Sat Jul 12, 2014 3:04 pm
Posts: 950
psycopathicteen wrote:
not every entry in the linked list would be used.

Why are you using linked lists if you're having a fixed size?

This doesn't sound like meta-meta-sprites, just having part of the data of a metasprite being an index into a table rather than a full copy of said data.


Top
 Profile  
 
 Post subject: Re: meta-meta-sprites
PostPosted: Mon Apr 10, 2017 5:39 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2428
Myask wrote:
psycopathicteen wrote:
not every entry in the linked list would be used.

Why are you using linked lists if you're having a fixed size?

When did I say anything about having a fixed size?

It's kind of hard to explain, but my engine makes a temporary copy of the metasprite data in the form of a linked list, in order to keep track of where in VRAM the sprites of the meta-sprites are. Each onscreen metasprite is a different chain in the linked list, but it can't chain back to a previous tile without getting stuck in an infinite loop.


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: Google Adsense [Bot] and 10 guests


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