It is currently Tue Oct 24, 2017 4:40 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: 8x8 vs 8x16 sprites
PostPosted: Tue Oct 23, 2007 7:15 am 
Offline

Joined: Thu Jul 13, 2006 3:15 pm
Posts: 177
I've started writing a basic fighting game and I've quickly realized that my fighters are going to be pretty limited in size and in how many different positions I can create for them.

So I'm looking into using 8x16 sprites since I can make them twice as big, and also access both CHR tile banks. I'll attempt to make the fighters as big as possible, but their size will eventually be constrained by how many tiles I need for all the different fighting positions.

Are there any special "gotchas" or just things I really need to be wary of as I start down the path of using 8x16 sprites?
Can I still use 64 sprites total? (Everything I've read indicates there shouod not be a problem)
Is the Sprite DMA longer? (I've not read anything that indicates the size of the sprites affects this)

Al


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 23, 2007 8:12 am 
Offline

Joined: Wed Mar 22, 2006 8:00 am
Posts: 354
The sprite limitations are unchanged when going from 8x8 to 8x16. Sprite DMA is the same length as well.

The main drawback with 8x16 sprites is flexibility. If you have a 16x16 object, it only takes two 8x16 sprites to draw it, but if you want to animate the lower portion of that object (i.e. if it's walking), you can't just change the lower half - you have to change everything. This means you tend to use more CHR tiles when setting up 8x16 sprites for animation. Also, the entire 8x16 sprite uses the same palette, which is another issue you may have to deal with when drawing up the graphics.

One other thing to watch out for is if you use mapper 4 (MMC3). That mapper's IRQ engine REQUIRES all sprites to come from the upper pattern table (PPU $1000-1FFF) and all background tiles to come from the lower pattern table ($0000-0FFF). This doesn't mean you can't use 8x16 sprites, but it does mean all 8x16 sprites must use the upper pattern table.

_________________
"Last version was better," says Floyd. "More bugs. Bugs make game fun."


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 23, 2007 8:21 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19122
Location: NE Indiana, USA (NTSC)
dvdmth wrote:
The main drawback with 8x16 sprites is flexibility. If you have a 16x16 object, it only takes two 8x16 sprites to draw it, but if you want to animate the lower portion of that object (i.e. if it's walking), you can't just change the lower half - you have to change everything. This means you tend to use more CHR tiles when setting up 8x16 sprites for animation.

Not to mention the overhead of smaller objects such as bullets.

Quote:
Also, the entire 8x16 sprite uses the same palette, which is another issue you may have to deal with when drawing up the graphics.

But you can still do like Contra does and draw the top half of a character with one palette and the bottom half with another.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 23, 2007 8:47 am 
Offline

Joined: Thu Jul 13, 2006 3:15 pm
Posts: 177
Thanks. I appreciate the info.
Al


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 04, 2007 1:16 pm 
Offline

Joined: Mon Oct 30, 2006 8:32 pm
Posts: 122
You might want to read up on the MMC2 and MMC4 mappers. The MMC2 was used in Punch-Out!!, which uses many sprites for the boxers, and the MMC4 is a revision of the MMC2 with more PRG-ROM, larger bank areas, and PRG-RAM. All I could find peculiar about MMCs 2 and 4 was that:
Quote:
When the PPU reads from specific tiles in the pattern table during rendering, the [mapper] sets a latch that tells it to use a different 4 KB bank number. This has the effect of setting a different bank for all tiles to the right of a given tile.


I don't know how you'd use this (help please?) but it worked for Punch-Out!!. Though from what I can tell, it would be hard to use this technique with other mappers. If you don't use MMC2/4, you could go the Rayman/Joy Mech Fight route and not draw limbs.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 06, 2007 8:41 am 
Offline

Joined: Thu Jul 13, 2006 3:15 pm
Posts: 177
I didnt know about Rayman. I noticed that for Yie Ar Kung Fu the enemy body is drawn using background tiles except for certain parts (face, arms, legs).

I had thought about doing that (and I may still) but I will need to figure out how many background tiles I can update during a single NTSC Vblank period in order to support movement. Since I'm invoking Sprite DMA, I have 1/4 less available cycles.

Its a lot simpler if I only use sprites since I can alter sprite RAM whenever I want without hosing the PPU (I'll be doing Spirte DMA each vblank anyways)


Al


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 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