o
odinpkg.dev
packages / library / odin-tiled

odin-tiled

e55ec07library

A Tiled loader using JSON for the Odin programming language.

MIT · updated 3 days ago

odin-tiled

A simple Tiled map loader. Uses Odin's core:json to unmarshal data into structs.

How to use

Put the tiled.odin file into a tiled folder somewhere in your project. Then you can just do this (the path might be different):

import "../tiled"

And then:

tiled_map := tiled.parse_tilemap("path/to/your/map.json")

and/or

tileset_data := tiled.parse_tileset("path/to/your/tileset.json")

Thats all you need.

Note: Base64 is not supported, only CSV is.

Example

There are 2 examples in the example folder. The topdown example include spritesheet animations and wall collision. They both use raylib for the tilemap rendering.

Contributing

Contributions are welcome!