https://github.com/aybe/leveldecomposer
Converts a level bitmap to a tile sheet / level data and vice-versa.
https://github.com/aybe/leveldecomposer
Last synced: about 1 year ago
JSON representation
Converts a level bitmap to a tile sheet / level data and vice-versa.
- Host: GitHub
- URL: https://github.com/aybe/leveldecomposer
- Owner: aybe
- Created: 2014-09-16T18:58:34.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-09-17T14:37:35.000Z (almost 12 years ago)
- Last Synced: 2025-01-31T11:22:37.581Z (over 1 year ago)
- Language: PowerShell
- Size: 695 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
LevelDecomposer
===============
*Converts a level bitmap to a tile sheet / level data and vice-versa.*
**Binaries**
Pre-built binaries are available [here](https://github.com/aybe/LevelDecomposer/releases).
**NuGet package**
Get it [here](https://www.nuget.org/packages/LevelDecomposer/).
**Example**
An input level bitmap :

Gets decomposed to a tile sheet and JSON level data :

```
{
"SheetName": "decompose.png",
"SheetWidth": 256,
"SheetHeight": 112,
"LevelWidth": 40,
"LevelHeight": 24,
"TileWidth": 16,
"TileHeight": 16,
"Tiles": [
0,
1,
1,
1,
1,
1,
1,
1,
// etc ...
```
The other way around is also possible.
**Notes & limitations**
- the tile index uses a 32-bit integer, that should be enough for most purposes :D
- make sure that the tile sheet image is in the same folder than the JSON level data