Giter VIP home page Giter VIP logo

android-tmx-loader's Introduction

TMX LOADER FOR ANDROID

Second beta release - 0.8.1 Written by David Iserovich

Decision of distribution license pending, meanwhile you are free to use the code if you attribute credit.

Tiled http://www.mapeditor.org/

The map editor Tiled produce files in .tmx format which is xml-based.

This library and its classes allow the loading of tmx files into a TileMapData object, and allow the creating of an Android Bitmap based on said TileMapData object

USAGE

TMXLoader/src/davidiserovich/TMXLoader/ contains the main source files. TMXLoader/assets/ contains an example tmx file and its tileset image.

Both directories are regular Eclipse Android projects, and can be imported.

The main activity TMXLoaderActivity in TMXLoaderExample uses the TileMapData object and Canvas to create a Bitmap containing the arrangment of tiles that the tmx specifies.

To use

-To import in Eclipse, choose File->Import->General->Existing Projects Into Workspace and select the folder of TMXLoader.

-To try the example app, do the same for the TMXLoaderExample directory

  • Right click the TMXLoader project you now have, choose Properties, select Android, and make sure Is Library is checked

  • To use TMXLoader in a project, go to the project's Android properties as above, and add a reference to TMXLoader

  • Import davidiserovich.TMXLoader.* and you should be ready to go!

FEATURE RESTRICTIONS/TODO

  • The only tilemap layout supported is 0 border, 0 margins, 0 spacing.

  • Map objects are not yet supported.

  • Tile rotations are not yet supported.

  • The only supported data format is CSV (This can be set in Tiled in Edit->Preferences->Store Tile Data As: CSV)


CHANGES

###6/20/2012 - 0.8.1

  • Separated Bitmap rendering into TMXLoader.java
  • Added support for layer selection
  • Changed project type to Android Library
  • Moved sample code into new, related project

TODO

  • Javadoc
  • Compressed file support
  • Other/newer TMX features

android-tmx-loader's People

Contributors

davidmi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.