Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't render .tmx file #223

Closed
VTHMgNPipola opened this issue Feb 21, 2019 · 3 comments
Closed

Can't render .tmx file #223

VTHMgNPipola opened this issue Feb 21, 2019 · 3 comments
Labels
Milestone

Comments

@VTHMgNPipola
Copy link

I'm using JDK 11 on Windows 10, with LITIengine 0.4.15 (and tried 0.4.12 too), and can't render any .tmx file, created using Tiled 1.1.6.

The map loads successfully on LITIengine 0.4.15, but when I try to render it an exception is thrown. Here is the full console log:

fev 21, 2019 9:31:35 AM de.gurkenlabs.litiengine.configuration.Configuration loadFromFile
INFORMAÇÕES: Configuration config.properties loaded
Feb 21, 2019 9:31:37 AM de.gurkenlabs.litiengine.DefaultUncaughtExceptionHandler uncaughtException
SEVERE: Game crashed! :(
java.lang.NullPointerException
	at de.gurkenlabs.litiengine.environment.tilemap.xml.Tileset.getSpritesheet(Tileset.java:154)
	at de.gurkenlabs.litiengine.environment.tilemap.MapRenderer.getTileImage(MapRenderer.java:138)
	at de.gurkenlabs.litiengine.environment.tilemap.OrthogonalMapRenderer.renderTileLayerImage(OrthogonalMapRenderer.java:96)
	at de.gurkenlabs.litiengine.environment.tilemap.MapRenderer.render(MapRenderer.java:28)
	at de.gurkenlabs.litiengine.graphics.RenderEngine.render(RenderEngine.java:280)
	at de.gurkenlabs.litiengine.environment.Environment.render(Environment.java:1111)
	at de.gurkenlabs.litiengine.environment.Environment.render(Environment.java:963)
	at de.gurkenlabs.litiengine.gui.screens.GameScreen.render(GameScreen.java:19)
	at de.gurkenlabs.litiengine.graphics.RenderComponent.render(RenderComponent.java:149)
	at de.gurkenlabs.litiengine.RenderLoop.run(RenderLoop.java:23)

I tried using utiLITI, but the map can't be opened and SEVERE Implementation of JAXB-API has not been found on module path or classpath. is shown in the console.

Here is the code (class and main method header excluded, also imports and package declaration):

GameConfiguration configuration = Game.config();
configuration.graphics().setEnableResolutionScale(true);
configuration.graphics().setReduceFramesWhenNotFocused(true);
configuration.client().setMaxFps(60);
configuration.client().setUpdaterate(60);
configuration.client().setCountry("BR");
configuration.client().setLanguage("pt_BR");

Game.init();

Game.world().loadEnvironment(new Environment("sample-map.tmx"));

Game.screens().add(new GameScreen());

Game.start();
@steffen-wilke
Copy link
Contributor

Seems like this is directly related to #162

@TheRamenChef
Copy link
Collaborator

Seems like this is directly related to #162

Only for the UtiLITI part. If JAXB wasn't working for the main engine, the map wouldn't load at all.

@steffen-wilke steffen-wilke added this to the v0.4.16-alpha milestone Mar 6, 2019
@steffen-wilke
Copy link
Contributor

Commit efcd2a0 should fix this. It will be distributed with v0.4.16-alpha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants