How big can a tile array be?
Can anyone tell me how big a an array I can make for displaying 64x64 tiles. At the moment my array is [30][30] with no loss of scrolling quality, but before I embark on more artwork I need to know if I am likely to run into problems if I try and create a world that is too big.
tnx
You can make the array as big as you want. I like to load my images into a separate array, and then in my tile array have a reference number to an image.
- Daniel
my homepage
- Daniel
my homepage
That''s the way I have been doing it, using numbers to represent an image. I do find it quite tricky setting up the array because I have a fairly large amount of different tiles so the numbers are uneven because some are 3 digit.
It takes a bit of fiddling around. I suppose it will become more difficult the bigger the array becomes.
It takes a bit of fiddling around. I suppose it will become more difficult the bigger the array becomes.
I have a tile array struct in mine.
struct TILE{
{
//many things in here, tile type, is there a city here, a structure, forest, are there any units on the square, or magical effects affecting the square?,
} tile [100][100]
you can make this as large as you please, and only being confined by memory. I beleive my whole tile array only takes up about 1 meg of ram, which is not very much at all when you have 64 megs of ram. and the tile array contains most of the data in the game.
Possibility
struct TILE{
{
//many things in here, tile type, is there a city here, a structure, forest, are there any units on the square, or magical effects affecting the square?,
} tile [100][100]
you can make this as large as you please, and only being confined by memory. I beleive my whole tile array only takes up about 1 meg of ram, which is not very much at all when you have 64 megs of ram. and the tile array contains most of the data in the game.
Possibility
hiya,
I also use a sturcture for my map, read something about it in an article somewhere
my structure is something like this :
struct TILE {
char type; // what sort of tile refers to pictures.
char flags; // tells if it''s walkable and a bunch of // other stuff.
};
I also started using linked lists in my array to be able to use multiple layers, thought linked lists would be better then just use an map[4][500][500] array but that''s not this topic well anyway just thought of sharing a few thoughts
chris
I also use a sturcture for my map, read something about it in an article somewhere
my structure is something like this :
struct TILE {
char type; // what sort of tile refers to pictures.
char flags; // tells if it''s walkable and a bunch of // other stuff.
};
I also started using linked lists in my array to be able to use multiple layers, thought linked lists would be better then just use an map[4][500][500] array but that''s not this topic well anyway just thought of sharing a few thoughts
chris
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement