Tiled Map Editor: https://www.mapeditor.org/
Go package for TMX-files parsing: https://github.com/salviati/go-tmx
What to support:
Engo package for example: https://engoengine.github.io/tutorials/05-tilemaps
This is an interesting idea, but I'd want this in another package rather than in Ebiten core.
This is an interesting idea, but I'd want this in another package rather than in Ebiten core.
It is good solution. Not all developers need TMX, but those who need just will install addon package.
Just want to add that I have a tmx parser here the one you listed is a couple versions behind and doesn't support external tilesets or resources in folders other than the one the tmx is in. Using that, it shouldn't take much work at all to get it working with ebiten
https://gitlab.com/beoran/ebsgo/-/blob/master/engine/tile/io.go
This uses allegro through al5go, but could be adapted to Ebiten relatively easily. Chances are that I will do that, eventually.
Just want to add that I have a tmx parser here the one you listed is a couple versions behind and doesn't support external tilesets or resources in folders other than the one the tmx is in. Using that, it shouldn't take much work at all to get it working with ebiten
Thank you! I will take a look on this package.
I've coincidentally been working on exactly this over the past couple of days. Not nearly as well written or full featured as the other options mentioned here, but it's Ebiten (functions use ebiten.Image, DrawImageOptions, GeoM, etc.), which might be of interest.
Package tiled in https://github.com/jwlarocque/engine/
Very early WIP example: https://github.com/jwlarocque/game/
(Note that at the moment file paths in the Tiled .tmx/.tsx/.json files need to be relative to main.go, not the file in which they are found.)
BTW, as there are already some TMX parsing libraries [1], I think we'd need a library to render TMX structs using Ebiten or other libraries like Engo or Pixel.
[1] https://github.com/salviati/go-tmx, https://github.com/fardog/tmx, https://github.com/ilikeorangutans/tiled/tree/master/tmx, etc. Of course @Noofbiz's, @beoran's and @jwlarocque's are ones of them.
how
But don't you think a native support for tmx would be good like pixel and engo does
I'm not sure what a native support means, but having a third party library that parses TMX and works with Ebiten sounds good.
In case this helps, I am doing a small tool that parses tmx files and gets the useful information so it can be rendered by Ebiten.
I've added an example on how to use the lib and render a basic TMX file with Ebiten.
Feel free to use the lib or copy the code! https://github.com/Rulox/ebitmx
Most helpful comment
In case this helps, I am doing a small tool that parses tmx files and gets the useful information so it can be rendered by Ebiten.
I've added an example on how to use the lib and render a basic TMX file with Ebiten.
Feel free to use the lib or copy the code! https://github.com/Rulox/ebitmx