New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GMX-Exporter] Add 1000000 to layer depth of tiles #1814

Closed
TrunXGIT opened this Issue Nov 9, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@TrunXGIT
Contributor

TrunXGIT commented Nov 9, 2017

In GameMaker 0 is the standard depth value for new objects.
The standard depth value for a new tile layer is 1000000.

So it's quite common to use values between -1000 to 1000 to order your objects.
Values around 1000000 for background elements and huge negative numbers for foreground elements.

Tiled exports it's tile layers at the depth of 1, 2, 3... so basically the same depth values the objects in a GM-Project are usually using.

Simple solution: Add 1000000 to the depth on export.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Nov 9, 2017

Owner

Interesting suggestion. It sounds like it would indeed be good to start counting at 1000000 then.

Note that in the meantime you can set a custom integer property called depth on your layers, and Tiled will then export those layers with that depth instead of using the layer index. Seems like I missed this property in the documentation. The property already existed since Tiled 0.18.

Owner

bjorn commented Nov 9, 2017

Interesting suggestion. It sounds like it would indeed be good to start counting at 1000000 then.

Note that in the meantime you can set a custom integer property called depth on your layers, and Tiled will then export those layers with that depth instead of using the layer index. Seems like I missed this property in the documentation. The property already existed since Tiled 0.18.

@bjorn bjorn closed this in 6a642c2 Nov 22, 2017

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Nov 22, 2017

Owner

This has now been implemented and will be included in the next development snapshot.

In GameMaker 0 is the standard depth value for new objects.

While I could see the depth in GameMaker for tiles indeed defaults to 1000000, I did not see any depth setting for objects. Also I don't see a "depth" attribute for instances in the room XML file. What are you referring to here?

Owner

bjorn commented Nov 22, 2017

This has now been implemented and will be included in the next development snapshot.

In GameMaker 0 is the standard depth value for new objects.

While I could see the depth in GameMaker for tiles indeed defaults to 1000000, I did not see any depth setting for objects. Also I don't see a "depth" attribute for instances in the room XML file. What are you referring to here?

@TrunXGIT

This comment has been minimized.

Show comment
Hide comment
@TrunXGIT

TrunXGIT Nov 25, 2017

Contributor

You can find the input field for "Depth" inside the object properties on the left side. Instances inherit the depth value from the object. You can overwrite it by changing the "depth" variable in the creation code.

Contributor

TrunXGIT commented Nov 25, 2017

You can find the input field for "Depth" inside the object properties on the left side. Instances inherit the depth value from the object. You can overwrite it by changing the "depth" variable in the creation code.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Nov 25, 2017

Owner

You can find the input field for "Depth" inside the object properties on the left side. Instances inherit the depth value from the object. You can overwrite it by changing the "depth" variable in the creation code.

Ah, that explains why I couldn't find it. I was looking for it while placing instances, not while editing objects. Speaking of creation code, I should make sure to get around to #1768 soon.

Owner

bjorn commented Nov 25, 2017

You can find the input field for "Depth" inside the object properties on the left side. Instances inherit the depth value from the object. You can overwrite it by changing the "depth" variable in the creation code.

Ah, that explains why I couldn't find it. I was looking for it while placing instances, not while editing objects. Speaking of creation code, I should make sure to get around to #1768 soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment