mapeditor / tiled

Flexible level editor
https://www.mapeditor.org/
Other
11.09k stars 1.75k forks source link

libtiled-android tutorial #1344

Open NoeKey opened 8 years ago

NoeKey commented 8 years ago

I have been trying to create and Android rpg with libtiled. I have combed blogs, stackoverflow, etc. and I am haven't found anything enlightening. Does anyone know how to implement libtiled into and android game for reading json maps?

bjorn commented 8 years ago

Hmm, first of all libtiled-android (if you're talking about that version) was not developed by me. It is an old fork of the Swing-based libtiled-java that sits in the official Tiled repository in utils/java, which was adapted to use APIs available on Android. Unfortunately libtiled-android has not been maintained since 4 years now.

I have to admit, that I personally also neglected to update the official libtiled-java to include the latest features of Tiled. It is something I should try to get around to. At the same time, it would be nice if the library could be split into pieces, so that it is not necessary to fork it in order to use it on Android. However, I have personally no experience with writing Android Java code, and don't know which APIs should be avoided in that case.

But I think that most people writing games for Android in Java use libgdx. It is a game development library with lots of features, which includes support for loading and rendering Tiled maps. Maybe that could be useful to you as well?

Note that these libraries implement reading the TMX map format, not the JSON map format.

Unfortunately, I don't know of any tutorial specifically about this topic. I'll leave this issue open until maybe one is found or some tutorial / documentation is written about this.

ghost commented 8 years ago

I do not use libtiled-android myself now, because it was incompatible with gwt.

I make a simpler lib https://github.com/devnewton/libtiled-jpurexml which work with desktop java, android java and gwt.