#68554 - Chaotic Harmony - Wed Jan 25, 2006 5:53 pm
Hi - I'm new to the GBA Dev scene. I've only been coding on it for about a week, so far I've just about managed to get sprites working and 128x128 tiled backgrounds. I've got a question about how to go about making bigger backgrounds than that.
Some background: I decided to get started by porting a simple game I made years ago to the GBA - a game I originally made in Qbasic, called "The Hunt".
[Images not permitted - Click here to view it] <- Screenshot
Click here to download (about 100KB, works in DOS and Windows) <- Game
It's a pretty simple game - nothing more that a few sprites, a scrolling background and some collision detection. Unfortunately, I've run into one technical problem - the game's map size is about 1500x20 (there's no vertical scrolling, just one big horizonal level).
Anyway, no doubt it's probably really easy to do, but I'm having trouble with making big maps. If I try to make a map buffer of even 32x32 tiles (256x256), I get an error from the comilper, saying something like that it's too big. It seems that I'm restricted to an array of 16x16, so I must be doing something wrong somewhere...
So basically I just want to know - how do you get really big arrays working? Do I have to split the map up and feed it into the tile memory? Am I doing something wrong? Is there an easier way to do it?
(I don't have the code on me right now, but I can bring it in tomorrow if nessicary... I'm hoping this is a kinda trivial problem that I can fix with one line...)
_________________
http://www.distractionware.com
Some background: I decided to get started by porting a simple game I made years ago to the GBA - a game I originally made in Qbasic, called "The Hunt".
[Images not permitted - Click here to view it] <- Screenshot
Click here to download (about 100KB, works in DOS and Windows) <- Game
It's a pretty simple game - nothing more that a few sprites, a scrolling background and some collision detection. Unfortunately, I've run into one technical problem - the game's map size is about 1500x20 (there's no vertical scrolling, just one big horizonal level).
Anyway, no doubt it's probably really easy to do, but I'm having trouble with making big maps. If I try to make a map buffer of even 32x32 tiles (256x256), I get an error from the comilper, saying something like that it's too big. It seems that I'm restricted to an array of 16x16, so I must be doing something wrong somewhere...
So basically I just want to know - how do you get really big arrays working? Do I have to split the map up and feed it into the tile memory? Am I doing something wrong? Is there an easier way to do it?
(I don't have the code on me right now, but I can bring it in tomorrow if nessicary... I'm hoping this is a kinda trivial problem that I can fix with one line...)
_________________
http://www.distractionware.com