@city41/ardumap
This is a small node program that takes maps from the [Tiled Map Editor](https://www.mapeditor.org/) and converts them into data for ArduBoy games.
Last updated 2 years ago by mgreer .
MIT · Original npm · Tarball · package.json
$ cnpm install @city41/ardumap -g
SYNC missed versions from official npm registry.

ardumap

This is a small node program that takes maps from the Tiled Map Editor and converts them into data for ArduBoy games.

how to use

  1. npm install -g @city41/ardumap
  2. Export your map from Tiled as JSON
  3. ardumap -s <path to the JSON map file> -o <path to write the header file to>

ie: ardumap -s ../myGame/myMap.json -o ../myGame/myMap.h

The resulting data file

It's just a uint8 array containing the Tiled data, something like:

#ifndef mymap_h
#define mymap_h

const uint8_t PROGMEM mymap_map[] {
    // map width, map height (in rooms)
    4, 4,
    8, 0, 0, 0, 1, 2, 0, 0, 0, 8,
    ...
};

#endif

The array starts with a small two byte "header" of the map size in rooms. Currently this is hardcoded for my game, but I can make this generic if anyone else uses this tool.

Current Tags

  • 2.0.0                                ...           latest (2 years ago)

5 Versions

  • 2.0.0                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 6
Last Day 0
Last Week 5
Last Month 3
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |