I've been searching and can't get a clue on how to do this.
I'm creating a block-based game, let's say 3x3 blocks on screen, each block has a int associated to know which type it is:
int[][] blocksArray = {
{ 0, 0, 0 }
{ 0, 0, 1 }
{ 0, 0, 0 }
};
What I basically want to do is save like 50 multi-dimensional arrays like this one into a file let's say "levels.txt" just like this:
int[][] level1 = {
{ 0, 0, 0 }
{ 0, 0, 1 }
{ 0, 0, 0 }
};
...
int[][] level50 = {
{ 0, 0, 0 }
{ 0, 0, 0 }
{ 0, 0, 0 }
};
Is this a good way of approaching the problem? Are there better methods?
I really don't want to make a string of my arrays and save them into shared prefs, because I will need to edit a lot of level arrays manually and I want to have this format, or maybe a very similar way to do it?