Hello friends.
I am working on a tile engine for my RPG and I am kinda in a dilemma at the moment for it.
I went through lots of thinking and calculations of how to do ceratin things right.
Right now I am using a 3 Dimentional byte array[][][].
I am using a byte array because of map size and memory. A 3 layer 500x500 map would take 750k of memory away, but since Java can’t
do unsigned bytes, which is kinda annoying, I am stuck with 127 DIffernet types of tiles for one map. I thought about going to a three dimentional short array, but that would be taking lots of memory away just for a map. (3 layers 500x500 would be 3MB.).
I have thought about splitting it in half. By having the byte layer for sprites and the short layers for tiles.
Which would be the best away to approach a tile system. And do you think it would be safe to use shorts for today machines. My target machines would be at least 32/64 MB of memory and up. (Do you think I am thinking to low for today?) For some reason I always try to get my programs to take not much memory.