Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noofbiz/tmx
A library for parsing TMX files
https://github.com/noofbiz/tmx
Last synced: about 1 month ago
JSON representation
A library for parsing TMX files
- Host: GitHub
- URL: https://github.com/noofbiz/tmx
- Owner: Noofbiz
- License: mit
- Created: 2018-09-02T06:48:49.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-05T16:09:13.000Z (almost 4 years ago)
- Last Synced: 2024-06-20T12:42:16.344Z (5 months ago)
- Language: Go
- Size: 46.9 KB
- Stars: 12
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tmx
A library for parsing TMX filesTo use:
```go
f, err := os.Open("test1.tmx")
defer f.Close()
if err != nil {
fmt.Println(err)
return
}
m, err := tmx.Parse(f)
if err != nil {
fmt.Println(err)
return
}
// Do stuff with your tmx map...
```If your tmx resources are in another folder, or are somewhere other than where
the binary is called, you can set it by setting `TMXURL` to the right path.
Doing this will allow you to use external tilesets and templates for the map.