Giter Site home page Giter Site logo

allegro_tiled's Introduction

allegro_tiled

allegro_tiled is an Allegro 5 module that adds support for parsing and using TMX map files. This means that Tiled, as well as any other program supporting the same map format, can be used to create and edit game worlds while the complexity of parsing and drawing them is completely taken care of:

ALLEGRO_MAP *map = al_open_map("data/maps", "level1.tmx");
al_draw_map(map, 0, 0, 0); // (map, dx, dy, flags)

Additional methods are provided to draw one map layer at a time and/or draw only a particular section. Layers, tilesets, tiles, and objects are all given types, with methods that make them easy to access and use.

screenshot

Currently, the following is supported:

  1. Orthogonal maps.
  2. Base64 encoding with gzip, zlib, or no compression.
  3. XML and CSV encoding. (though honestly, why would you?)
  4. Tile "flipped" flags, both vertically and horizontally.
  5. Objects.

The following is not yet supported:

  1. Isometric maps.

Compiling the Library

On Linux:

Make sure the following dependencies are installed:

  • allegro
  • allegro_image
  • xml2
  • zlib
  • glib

Then simply run make in the root folder to compile it, and optionally sudo make [install|uninstall] to handle (un)installation. To run the example, cd to the examples folder and type make run. Use the arrow keys to scroll and Space to reload the map file.

On Other Platorms:

No other platforms are supported yet, but this should change in the future. If you want to have this module available on your platform ASAP, then let me know!

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.