https://github.com/jmecn/TMXLoader
Tiled Map XML (.tmx) asset loader for jMonkeyEngine
https://github.com/jmecn/TMXLoader
Last synced: 8 months ago
JSON representation
Tiled Map XML (.tmx) asset loader for jMonkeyEngine
- Host: GitHub
- URL: https://github.com/jmecn/TMXLoader
- Owner: jmecn
- License: bsd-3-clause
- Created: 2016-11-26T11:27:16.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-04-13T09:28:23.000Z (over 1 year ago)
- Last Synced: 2024-04-14T00:41:50.587Z (over 1 year ago)
- Language: Java
- Size: 6.59 MB
- Stars: 11
- Watchers: 5
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-JMonkeyEngine - TMXLoader
README
# Introduction
TMXLoader is used for loading .tmx assets created by [Tiled Map Editor](https://www.mapeditor.org/). It's a plugin for [jMonkeyEngine3](https://jmonkeyengine.org/).
You can download it here: https://github.com/jmecn/TMXLoader/releases.
Or use the [source](https://github.com/jmecn/TMXLoader).[](https://github.com/jmecn/TMXLoader/actions/workflows/build.yml)
## How to use
maven
```xml
io.github.jmecn
tmx-loader
0.6.0
io.github.jmecn
tmx-renderer
0.6.0
```
gradle
```groovy
repositories {
mavenCentral()
}dependencies {
implementation 'io.github.jmecn:tmx-loader:0.6.0'
implementation 'io.github.jmecn:tmx-renderer:0.6.0'
}
```## Example
```java
package io.github.jmecn.tiled.app;import com.jme3.app.SimpleApplication;
import com.jme3.system.AppSettings;
import io.github.jmecn.tiled.TiledMapAppState;
import io.github.jmecn.tiled.TmxLoader;
import io.github.jmecn.tiled.core.TiledMap;/**
* Test loading tmx assets with TmxLoader.
* @author yanmaoyuan
*
*/
public class TmxLoaderExample extends SimpleApplication {@Override
public void simpleInitApp() {
// register it
TmxLoader.registerLoader(assetManager);// load tmx with it
TiledMap map = (TiledMap) assetManager.loadAsset("Desert/desert.tmx");// render it with TiledMapAppState
stateManager.attach(new TiledMapAppState());TiledMapAppState tiledMap = stateManager.getState(TiledMapAppState.class);
tiledMap.setMap(map);
tiledMap.setViewColumn(20);
}public static void main(String[] args) {
AppSettings settings = new AppSettings(true);
settings.setWidth(1280);
settings.setHeight(720);
settings.setSamples(4);
settings.setGammaCorrection(false);TmxLoaderExample app = new TmxLoaderExample();
app.setSettings(settings);
app.start();
}
}
```## Screenshots
* Orthogonal Map

* Iso map

* Hex map

* Staggered map


* Parallax scroll
https://youtu.be/0OIIdxaAZjA