#20287 - CyberSlag5k - Thu May 06, 2004 4:27 pm
I am about to start porting my game brick assault to the gba. In preparing this I have come across a problem. The game is like a multiplayer version of breakout. There are two paddles at opposite sides of the screen that must protect the bricks behind them from a bouncing ball.
To give you an idea, here's the game itself:
http://homepages.udayton.edu/~pateramj/BrickAssault.html
Now the size and number of bricks is flexible, I don't mind adjusting them, however I am not really seeing a way of placing a reasonable number of bricks on the screen without exceeding sprite memory.
The amount of sprites you can have is dependent on the size of the sprites, correct? So lets say I have 3 rows of bricks per side. In order to fit well into the 240x160 viewing screen, I could do 30 8x8 pixel blocks. However, that comes out to 600 pixels...too many for the OAM to keep track of. So lets increase the size of the blocks to 30x8 pixels. Now I only need 8 blocks across, but the sprites are considerably bigger and won't (I think) fit into sprite memory). So it's a trade off between sprite number (overloading the OAM) or sprite size (overloading sprite memory). Either way I can't seem to get it to fit.
Now I could just make the blocks a background layer and change the data each time one is hit or I could place the blocks upon the sides of the board instead of the top and bottom, but I'd like to work out a solution here if possible (it'll look better and I'd still like to know how to do it for future situations).
Is it possible for me to do some sort of tiling effect with the sprites? All the blocks will look the same, so can I just have like half a block loaded into sprite memory and then each block will be twice the size of this, just draw two of the block tiles for every one block? This saves on the OAM and (if it's even concievably possible) saves space in sprite memory. Or am I just getting a little crazy here?
_________________
When you find yourself in the company of a halfling and an ill-tempered Dragon, remember, you do not have to outrun the Dragon...
To give you an idea, here's the game itself:
http://homepages.udayton.edu/~pateramj/BrickAssault.html
Now the size and number of bricks is flexible, I don't mind adjusting them, however I am not really seeing a way of placing a reasonable number of bricks on the screen without exceeding sprite memory.
The amount of sprites you can have is dependent on the size of the sprites, correct? So lets say I have 3 rows of bricks per side. In order to fit well into the 240x160 viewing screen, I could do 30 8x8 pixel blocks. However, that comes out to 600 pixels...too many for the OAM to keep track of. So lets increase the size of the blocks to 30x8 pixels. Now I only need 8 blocks across, but the sprites are considerably bigger and won't (I think) fit into sprite memory). So it's a trade off between sprite number (overloading the OAM) or sprite size (overloading sprite memory). Either way I can't seem to get it to fit.
Now I could just make the blocks a background layer and change the data each time one is hit or I could place the blocks upon the sides of the board instead of the top and bottom, but I'd like to work out a solution here if possible (it'll look better and I'd still like to know how to do it for future situations).
Is it possible for me to do some sort of tiling effect with the sprites? All the blocks will look the same, so can I just have like half a block loaded into sprite memory and then each block will be twice the size of this, just draw two of the block tiles for every one block? This saves on the OAM and (if it's even concievably possible) saves space in sprite memory. Or am I just getting a little crazy here?
_________________
When you find yourself in the company of a halfling and an ill-tempered Dragon, remember, you do not have to outrun the Dragon...