question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TMXHexagonalRenderer - rendering issue with Staggered maps

See original GitHub issue

OS 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: screenshot 2019-02-03 at 14 13 46 melonjs rendering screenshot: screenshot 2019-02-03 at 15 09 57

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:closed
  • Created 5 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
digitalbreedcommented, Feb 4, 2019

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

0reactions
obiotcommented, Apr 23, 2019

@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 !

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found