TMXHexagonalRenderer - rendering issue with Staggered maps
See original GitHub issueOS platform / Browser
(irrelevant)
melonJS version
6.0.0
Bug description
TMXHexagonalRenderer
does not honour renderorder
property.
In Tiled (1.2.2), you can specify the “Tile Render Order” property, as certain tile-sets require rendering from bottom to top and/or from right to left.
Tiled screenshot:
melonjs rendering screenshot:
Steps to reproduce the bug
Create a map with “Left Up” tile render order, e.g. using CuddlyLover’s excellent Fantasy Hex Tiles: https://cuddlyclover.itch.io/fantasy-hex-tiles - observe that tiles are rendered in the wrong order with melonjs. Relevant code: https://github.com/melonjs/melonJS/blob/master/src/level/TMXRenderer.js#L693 Interestingly enough, the orthogonal renderer has support implemented: https://github.com/melonjs/melonJS/blob/master/src/level/TMXRenderer.js#L219
Console log Extract
(irrelevant)
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Hexagonal TMX Support
So the secret to rending any of the maps is; it's always rectangles. When rendering a staggered or isometric map, it's just an...
Read more >LibGDX HexagonalTiledMapRenderer wrong stagger index?
Solution: Make the map height odd, instead of 10 tiles I made it 11. You could make small changes to HexagonalTiledMapRenderer like
Read more >Support for Hexagonal maps added
In Tiled this map type is called “Hexagonal (Staggered)”, and the rendering code is now also used for the similar “Isometric (Staggered)” maps....
Read more >Java Tiled Map Game (LibGDX) | Episode 2 - YouTube
In this episode, we'll get an orthogonal and isometric map rendered on the screen.
Read more >java - LibGDX Tiled (TMX) Maps + Scene2D, bugs when ...
What I want to achieve is simple: draw a map (Tiled .tmx), draw a Sprite (soon-to-be "player") inbetween layers 1 and 2, and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Interesting, I didn’t go that deep. Maybe I am barking at the wrong tree?! Thanks for investigating!
Here’s a zip file with my boilerplate project. I’ve only added the map, played with scaling in game.js and added code for loading in play.js, nothing else.
hexagonal-rendering-issue.zip
@digitalbreed here is a link to the latest wip build : https://melonjs-builds.s3.amazonaws.com/index.html?prefix=artifacts/master/2532/build/ would be great if you could give it a try and confirm you are also happy about it 😃
thanks !