rot.js
rot.js copied to clipboard
ROT.Display.Hex doesn't support image drawing
It appears that ROT.Display.Tile.prototype.draw will draw an image if passed in using tileMap and tileColorize for the tile, but hexes don't (likely because of the complex geometry of building a tile map of an image). Any suggestions on how best to add in similar capability for hexes so as to align to the functionality found in: http://ondras.github.io/rot.js/manual/#tiles
Right, the Tile
backend is closely coupled to the Rect
one, using inheritance: https://github.com/ondras/rot.js/blob/master/src/display/tile.js#L11
Technically, drawing image tiles in a hex layout is a more/less solved stuff: we have the math (Hex
backend), we have the image stuff (Tile
). The only real issue here is how to make this work API-wise, where the individual ROT.Display
backends form a hierarchy that is not exactly suited for plugging in this Hex+Tile newcomer.
However, I think that having this is a reasonable request, thus assigning myself to the issue.
Thanks so much. I'm excited!