#48006 - vexon - Fri Jul 15, 2005 10:39 pm
Hi,
I'm new with programming GBA stuff. I am currently using HAM and i'm trying to get a 40 frame 128 x 128 image into my project. But I figured that 64x64 is the max you can use. How can I solve this problem?
Tile it using 4 x 64 x 64 sprites or any other method?
#48008 - sajiimori - Fri Jul 15, 2005 11:07 pm
Yeah, tile them. But dang, that's a lot of sprite data! A third of a megabyte...
#48009 - vexon - Fri Jul 15, 2005 11:19 pm
Heh I know I might cut it in halve or change the animation using functions like blending if possible. Might make it look even better :)
#48010 - sajiimori - Fri Jul 15, 2005 11:23 pm
If it has much repetition (including empty areas), maybe you could use a background instead. Then repeated tiles can be reused.
#48030 - vexon - Sat Jul 16, 2005 9:00 am
Well it's for an animation in the main menu so I guess I can make a tile background with the animation thing in it. Replacing the tiles with the next ones in the animation cycle would work i guess.
Oh btw does anyone happen to know a way to give multiple seperate images the same pallete. Like a function with photoshop that let's you select all images and then set the pallete for them?
#48033 - wintermute - Sat Jul 16, 2005 9:19 am
you could always use 4 64x64 sprites if necessary
#48034 - Mighty Max - Sat Jul 16, 2005 9:31 am
Basically you have two choices combining two palettes.
One (the simple) would be to create a general palette which works a lot like n-bit direct data. where you have 2-3-3 bits for each color. But that might look ugly. (complex with O(n))
The second is to create a larger palette and put all colors in, then step for step find the colors that are the nearest to each other (Thats about O(n^2) complex) and combine them to one. [ maybe use the pixelcount of this color to weight the interpolation when combining them. Like (palette[a] * weight[a] + palette[b] * weight[b]) / (weight[a]+weight[b]) ] Now replace in all images this palette entry with the new created one, and remove the old entries. Do this while you have >255 palette entries.
In both cases you might loose quality.
#48035 - vexon - Sat Jul 16, 2005 9:34 am
I could also combine all the images into one so I get uh (128 x 40) x 128 bitmap with a 256 color palette I think IrfanView would do that right. And then tile it.
#48056 - vexon - Sat Jul 16, 2005 6:49 pm
I've made a strip of the animation now it's 2688x128 in size and sharing one pallete of 256 colors. How do I tile this using gfx2gba?
edit: nevermind I figured it out... But my raw file still is 2 mb and that's a tad big :/
#48105 - tepples - Sun Jul 17, 2005 5:05 am
Remember that you can always copy new sprite cels into VRAM during vblank time. Some games will decompress cels to EWRAM during draw time and then copy them to VRAM during vblank time.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.