Something I'm working on requires storing just over 3 million tiles (1800x1800) and as of yet I can't sort a way of even filling an array that large. I'm sure somehow you could, so if anyone can think of it, add me on MSN conformnow@hotmail.com talk to me on IRC (]Darkstar[, in #K&p, on irc.blitzed.org) or just reply to this message. Don't ask why I need 3 million tiles, because that's irrelevant and perhaps if you help and become more involved you'll find out anyway. Thanks.
Show me the power child,
I'd like to say,
That I'm down on my knees today,
Gives me the butterflies,
Gives me away,
'Til I'm up on my feet again,
I'm feeling outshined.
I guess I'll have to limit the amount, what's the biggest feasible amount? (Only 10,000 or so will be displayed at any one time, but I need the array to store all the information)
I sorted out a way to do it, by storing 9 values in each array, the array can be 200x200 (200*9 = 1800, 1800x1800=3,240,000). It's hard to explain what it's for. Basically, it's a tile engine. Each tile is 10x10, each 'sector' is made up of 12 tiles by 12 tiles, and each 'map' is made up of 150 sectors by 150 sectors. That's the size we wanted and so it looks like it'll work out now
Could you explain in more detail what you want done with so many tiles or whatever?
By the sounds of it you're over complicating something that should be simple.
MUGGUS
Come and annoy me more at
www.muggus69.tk STOUT ANGER!!!
Less a game, more an organizer for a campaign of a tabletop game I play called Micro Armour (WW2 Based). We play it on a map of 4 inch tiles put together to form a 48 inch map, so 12x12. 150x150 of these, 3 million tiles. Although even though I can represent 22,000 sectors that may be a little excessive but atleast I've found a means to do so.
I think I get what you mean. There's a better way though I think. Professional games like Diablo II and Dungeonsiege load the tiles as you move, so they don't need nearly as much memory.
In Jamagic you could do this by the following method:
Tile = 10x10
Sector = 12x12 tiles (so 120x120)
Load 25 arrays of "sectors" (covering a 600x600 zone)
Assuming you're using 320x240 resolution, and assuming that sectors are labeled like this...
As soon as you pass halfway though sectors 02,07,12,17,22, etc., it scraps sectors 05,10,15,20,25, and loads new sectors into memory to the left or 01,06,11,16,21, etc.
In such a way you can avoid having so many tiles in memory at once. Also, only store values in the arrays, then link the values to a tileset.
If you have a 120x40000 tileset, for example, then you would use the following:
Hope this helps. Oh, and if you actually need 3 million unique tiles, then you're screwed. I don't think even C++ would be able to help you with that very efficiently.