Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Animating Sprites   Message List  
Reply | Forward Message #14595 of 15019 |
Re: Animating Sprites

Hi Ronald

I can give you a bit of info on the sprite stuff as I know it.

Our engine builds composite sprites all over the place w/o any real
slowdown. We currently double buffer our sprite VRAM such that it
doesn't matter when we load the it. While this 1/2's available
sprite VRAM, it allows us much more freedom in our VBlank for other
things such as palette loads, OAM updates, scroll registers, or
other fancy effects. Originally, we did just as you are suggesting
(loading directly during VBlank), but found that it made it very
difficult to render all the sprite VRAM we needed in the alloted
interrupt as we have other things we wish to do in VBlank. One
other very big reason to double buffer is that it gives you time to
compress/decompress the char/oam data of your sprites. As sprite
chars can take up a good portion of your cart space (some of our
games have sprite data running 40%+ of available space compressed!)
compression is a necessity.

On other issues you touched on - as long as we operate only in the
HBlank period during sprite redraw, we have free reign to do
whatever we want with VRAM - or whatever for that matter. We don't
encounter any CPU/Bus contention that we can detect. Beware of
using DMAs though. It locks the CPU down for the entirity of the
transfer (so it's not actually a true DMA, just a real fast
transfer.) Also, if an interrupt comes along it and it also wants
to DMA, bad things occur. Stick with CpuFastCopy or ldm/stm
commands if at all possible.

BTW, do to weird round off, when we rotate/scale a multi-part sprite
around, the sprite tends to break up a little. Have you guys
figured out the trick to fixing this?

Hope this helps!

Mike





Sat Nov 8, 2003 5:34 am

miked0801
Offline Offline
Send Email Send Email

Forward
Message #14595 of 15019 |
Expand Messages Author Sort by Date

Hi GBAList! Experimenting with big composite sprite-based characters, we realized that it was very heavy to render them on the GBA using many rotating parts...
Ronald Chenu Abente
ronald_chenu
Offline Send Email
Nov 7, 2003
11:08 pm

... Yes. ... There might be a couple cycles of "wait states", but you'll usually get far fewer than one per read or write on average. More importantly, GBA...
Damian Yerrick
yerricde
Offline Send Email
Nov 8, 2003
9:47 am

Hi Ronald I can give you a bit of info on the sprite stuff as I know it. Our engine builds composite sprites all over the place w/o any real slowdown. We...
miked0801
Offline Send Email
Nov 8, 2003
9:47 am

... Either that, or cache decompressed cels in EWRAM. ... The GBA expects sprite coordinates on whole number pixel boundaries. Try overlapping the parts of...
Damian Yerrick
yerricde
Offline Send Email
Nov 8, 2003
3:11 pm

Thanks for the replys. Overlapping by 1 pixel is the method we are considering, but it'd be nice to know exactly how the hardware decides where to put each...
miked0801
Offline Send Email
Nov 9, 2003
2:37 am

... Yeah, we gave a thought about double buffering as a way to avoid the constraint of updating VRAM during vblank only, but (having read Mr. Yerrick's paper)...
ronald_chenu
Offline Send Email
Nov 9, 2003
2:35 am

... A 32bit RLE system running out of cpumem in arm can be actually be faster than DMA transfer if enough data gets repeated and is generally not any slower....
Kriss
yah_kriss
Offline Send Email
Nov 9, 2003
12:09 pm

... GBA interrupts are IRQ by nature, not FIQ. You can still switch ARM to fast interrupt mode manually using msr, but anyway, real interrupts will never be...
Alexandre BACQUART
fedmahnkassa...
Offline Send Email
Nov 9, 2003
12:08 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help