9248755 / 2d-java-game-engine

Automatically exported from code.google.com/p/2d-java-game-engine
0 stars 0 forks source link

Maps created with the mapeditor cant be loaded (r64) #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Because of not beeing able to open a map i created one myself with the Editor 
and once i tried to open it (game.engine.debug) it crashed

(Exception in thread "Thread-2" java.lang.NullPointerException
        at engine.game.objects.WorldTile.<init>(WorldTile.java:23)
        at engine.game.gameMain.loadLevel(gameMain.java:521)
        at engine.game.gameMain.initialize(gameMain.java:162)
        at engine.game.gameMain.run(gameMain.java:203)
        at java.lang.Thread.run(Thread.java:662))

Original issue reported on code.google.com by bastian....@googlemail.com on 22 Jan 2011 at 10:47

GoogleCodeExporter commented 9 years ago
level files neet to have at least 2 background images and one tilesheet. 
Without these, the output will be corrupt. Also, the images cant be in the same 
directory as the editor. (this is actually the real bug that has to be fixed 
... )
The  thing that needs to be done is the following:
while saving a level, the images are not moved to the editor directory, but a 
temp folder with a random name, that will be deleted afterwards.
while loading the "test.level", the images are extracted to a "test" directory 
that lies within the editor directory ("test/tilesheet.png").
So the Level loader need to be slightly ... adjusted.
Until things get fixed ill upload a test level.

Original comment by phil...@dr-jean-jacques.de on 23 Jan 2011 at 12:43