Sub graphics engine layers?

Aethex
Posts: 6
Joined: Fri Mar 27, 2009 9:14 pm

Re: Sub graphics engine layers?

Post by Aethex » Sun Mar 29, 2009 3:49 pm

Awesome! This helped a lot. Thanks!
So now, I can have two bmp backgrounds, using the full 128 k of VRAM_C?
BTW, how much space would tiled backgrounds take up?

Sylus101
Posts: 179
Joined: Wed Dec 24, 2008 5:08 am

Re: Sub graphics engine layers?

Post by Sylus101 » Sun Mar 29, 2009 6:11 pm

At 8bit, yes you can have 2 bitmap backgrounds, but not a whole lot more :)

The space Tiled backgrounds take up varies greatly depending on how many repeating tiles you have. For top down view rpgs (older final fantasy type for instance, particularly in dungeons) the backgrounds likely take up very little memory as things like wall and floor tiles are re-used over and over again.

To get an idea on the actual space, if you have a single 8x8 tile made up of 8bit palette entries, that's a 64 byte tile. Lets just say I was able to make an entire background with 8 different tiles. So now that's just 512 bytes, half of only 1K. Palettes go in their own separate location in memory (palette memory or VRAM allocated to extended palettes) so we'll just skip counting them.

So if we add in map data for a 512 x 512 size background, since the tiles are 8x8 that's a map that's 64*64 large, or has 4096 entries. What I'm not sure on is the size of those entries... if they're 16 or 8 bit. I think they're 16 bit, because you should be able to have 1024 different tiles at max (I think... I haven't actually used tiled bgs much yet.....). So if 16bit, that's 2 bytes * 4096 entries giving just 8K total for the map.

8K for the map, 512 bytes for the tiles. That's in comparison to just a 256x256 sized background at 8 bit taking up half the entire VRAM bank, 64K.
-Sylus "Not Stylus..." McFrederickson

Come visit my web site.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests