Giter Site home page Giter Site logo

Comments (11)

JSchrepp avatar JSchrepp commented on August 26, 2024

I notice a couple places is TilesetCreator.gd where the condition if _tileset_orientation == "orthogonal" was added that seem to transform some things about texture mapping. Removing those branches almost reverts behavior. The first tile still exhibits the shift but the rest are realigned. Perhaps this helps you narrow down the culprit.
image

from yati.

Kiamo2 avatar Kiamo2 commented on August 26, 2024

Hi, I'm sorry that you've just stumbled upon my current construction site (isometric tiles) and that I seem to have temporarily made things worse here as well.
Actually I am in the process of completely reworking isometric so that it is correct for all displacements and height/width ratios etc. including the collision polygons, whose .tmx/.tsx geometry data (in the case of isometric tilesets) the devil has seen.
Could possibly take more than a few hours, as I really want to be thorough this time.
Thank you for your example, that will help me a lot.

from yati.

Kiamo2 avatar Kiamo2 commented on August 26, 2024

Interestingly your .tsx is NOT set to 'isometric'.
That's one more combination (isometric map, non-isometric tileset) to be handled.
(And that's most probably the reason why in 1.1.2 it works but no longer in 1.2.1)

from yati.

JSchrepp avatar JSchrepp commented on August 26, 2024

Interestingly your .tsx is NOT set to 'isometric'. That's one more combination (isometric map, non-isometric tileset) to be handled. (And that's most probably the reason why in 1.1.2 it works but no longer in 1.2.1)

Interesting! I must have missed this property as it wasn't available on creation in Tiled like it is on maps. In fact, setting the tileset back to isometric with appropriate grid dimensions creates the exact collision-box distortion in the issue description.

When making this adjustment on my end to label the tileset as it should be, I notice my collision import is as desired, but the centering of the tile on the grid still exists, rather than snapping to the bottom as it used to. Updated tileset below works with tiled as expected but is still offset by half a tile vertically in godot.
testset.zip

from yati.

Kiamo2 avatar Kiamo2 commented on August 26, 2024

Concerning "... to label the tileset as it should be". I'm not sure that this is a strict 'should be'. I assume that it's depending weather one likes to have the automatically skewed rectangles or not. The overall map (in Tiled) seems to work both ways so I have to ensure that both ways are importable and have the absolutely same result.
The offset by half a tile is another animal having not exactly to do with the tileset being isometric or orthogonal.
It probably was introduced by the condition if _map_orientation == "orthogonal" in TilemapCreator.gd as well as that one mentioned by you.
I will remove that and find another way to correct that isometric test design of mine which is then off :-)
The challenge is: All contingencies must work.
Please give me some time...

from yati.

JSchrepp avatar JSchrepp commented on August 26, 2024

There's no rush, I'm just trying to give information that may help. For my own work, I've reverted to 1.1.2 as I can work with just that while I am still experimenting with my own project.

Honestly my goal is to be able to submit PRs for issues like these, but I don't understand tilemaps in these two programs that well yet and so don't have the knowledge to learn your codebase.

from yati.

Kiamo2 avatar Kiamo2 commented on August 26, 2024

Hi, just have released v1.2.2 and hope that the issues discussed here are solved.
Thanks for all your input.

from yati.

JSchrepp avatar JSchrepp commented on August 26, 2024

This solves most of the issue! Isometric tiles are once again properly aligned in the imported tileset. However, collision information is not properly transferred, as depicted below in the TileSet window in Godot. The reproduction assets I sent you should already have this collision info in the .tsx file, so I imagine you should be able to reproduce this.
image

from yati.

Kiamo2 avatar Kiamo2 commented on August 26, 2024

Ooops! I've typed in one single sign wrong when translating from C# to GDScript (I'm developing in C#).
And in the tests I must have missed exactly that, perhaps only checked the orthogonal version.
I'm very sorry for that, that really should not happen!!
(Edit: and this will not happen any more, from now on I'll compare the .tscn files)
Fixed in v1.2.3.

from yati.

Kiamo2 avatar Kiamo2 commented on August 26, 2024

I'd like to close the issue. Ok?

from yati.

JSchrepp avatar JSchrepp commented on August 26, 2024

I haven't had a chance to test this yet but it seems like you've identified and solved the issue. I can reopen if it doesn't work for me.

from yati.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.