Ok my level editor for the adventures of pause uses a 3 Dimentional array to save its maps.
200 X
200 Y
5 Z (layers)
ok... well saveing that makes an array file thats about 900kb... Thats not good.
The underside level editor (wow i go on about that alot) The Almighty Paintbrush saves arrays about 8-16kb (considering that he saves the entities and maps as seperate files they are about 4-8kb each)
So... i decided he most probly doesnt use a 3D array and saves layers by useing a delimited value on a 2D array.
BUT that seems like a really weird way around it. OR somehow it compresses hes arrays and gets rid of the whitespace (unused array data).
--
If someone knows the awnswer to smaller array files please tell me.
Or if its to do with the level editor and have 5 layers thats the proplem, let me know a way around if you know one.
--
MMF arrays are mostly blank spaces. Like a huge box. Compression will shrink it significantly though.
Lol, best way around it is not to use them. Lua tables work like arrays, but don't use up space until you use the slot. It's a bit much to use Lua just for the array, though.
So, best way is just to plan our your maps to not need 200*200, methinks. Using just 100*100 will lower it by a fourth. Or you can compress the array when you're not using it.
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
Assault Andy Administrator
I make other people create vaporware
It's a level editor which uses the binary object. The result is that each 'tile' in your game will only take up 1 byte. So a 200 x 200 array would take up 40 000 bytes, ie 40kb. However (if I recall correctly), my method uses whitespace (0 where a tile is blank) so you would want to combine it with compression to remove that if you think the files are too big.
This example file isn't really practical for super intensive arrays (where cells contain long strings etc.) but it might be worth a look if saving space is very important to you.
You should also try the Associate Array object. That has built in compression and encryption.
Ah from mr lua man himself... i wish i knew as much about lua as you lol! I still need help with the reading line by line thing btw!!!!!!!!!!! GRRRR
um... yeah but the problem mainly results in needing it to be a small filesize so when i load it, it loads up pretty much staright away... where as now it can take about 3-5 seconds sometimes to load and then place all the tiles.
Where as the underside is pretty much imediate.
Hey, if you can give me a couple of your unwanted lua useing applications, i would be so greatfull, im reallying try hard to learn it all at the moment, its so damn powerfull when used with MMF.
Hmm. ive been fiddling with the ass array, and im gona be honest i dont understand it... how are you ment to make it 2d...let alone 3d... im dumb.
its all done with keys and adresses rather than X Y and Z positions.
You cant delimiter the adress coz it needs to be a value
You can use keys coz you cant save a string under a value... How am i ment to use this object.??