Page 1 of 1

Saving data question

PostPosted: Fri Dec 02, 2011 7:56 am
by BlueLight
So i been trying to brain storm how do i save a Array of Array of Arraylist in a text file.

How my grid works is i have array of array and add new Array list to each of them at a later data. Then i'm adding Actors to the arrayList which are things that will be displayed on the map. At least 1 object should in every array list at any time for now. (in fact right now i am only adding one) Later on it's possible that 1000 items might be in one array list.

What i'm thinking of doing is making basically a HTML like format where i say <ArrayList> ROOM, SWORD </ArrayList>

So if i had 3 by 3 array[][] i might in the file say.

Code: Select All Code
3x3
<ArrayList>WALL</ArrayList> <ArrayList>WALL</ArrayList>WALL<ArrayList>WALL</ArrayList>
<ArrayList>WALL</ArrayList><ArrayList>FLOOR, SWORD, GOLD 100, BAG</ArrayList><ArrayList>WALL</ArrayList>
<ArrayList>WALL</ArrayList>WALL<ArrayList>WALL</ArrayList>WALL<ArrayList>WALL</ArrayList>

I can read data by Char, Word or line (well that as for as i want for this)