This topic is 4042 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, our game is making progress every day now.. http://www.freewebs.com/prof_89/appletgame/spel.html But as you see inte the source code (SOURCE koden) i have stored all my maps in the main program, wich is very disturbing.. I have tried to put them in a "mapsDB.class" file, in it i put the maps (int[][] map = {1,1,1,,1,1.....}... ) then i made a "public int[][] getMap1(){ return map[][];} then, in the main loop i did like this "int[][] map1 = mapDB.getMap1();" but i cant get it to work, i have tried with different methods but still it wont work, anyone that have any better ideas that works...?

##### Share on other sites
You only need to
return map; // no [][]
. However you'll be much better off loading the map data from file, hardcoded levels aren't very nice to work with.

##### Share on other sites
yeah, i think i have tried it biut i will try again

anf, applets cant load data files.... or ?

##### Share on other sites
Quote:
 Original post by prof_89yeah, i think i have tried it biut i will try againanf, applets cant load data files.... or ?

##### Share on other sites

Hmm.. do you mean any applet or a like swing/JApplet thet can load files ?