Skip to content
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

Add Z-Index for Autotile #19914

Merged

Conversation

guilhermefelipecgs
Copy link
Contributor

@guilhermefelipecgs guilhermefelipecgs commented Jul 2, 2018

@mhilbrunner
Copy link
Member

cc @MarianoGnu

@MarianoGnu
Copy link
Contributor

hum, this is not taken in account in the PR i just oppened about TileSet Editor rewrite :/
#20585
To be honest i never thought on z index, was not a problem for me when i used it.
Code looks good, but if any of the PR is merged the other one will need rebase to fix merge conflicts (more than fixing is a new implementation...)

@guilhermefelipecgs
Copy link
Contributor Author

I don't mind in rebase my PR if needed, my changes are simple.

@guilhermefelipecgs
Copy link
Contributor Author

Rebased.
captura de tela de 2018-08-13 12-15-17

@akien-mga
Copy link
Member

@guilhermefelipecgs Is it only for AutoTile? How does it interface with #16771, which added Z index support for TileSets but seems not to be properly exposed now in the new TileSet editor? CC @PJB3005

@guilhermefelipecgs
Copy link
Contributor Author

Is it only for AutoTile?

Yes.

How does it interface with #16771, which added Z index support for TileSets but seems not to be properly exposed now in the new TileSet editor?

Should works fine.
I just add the z index of the AutoTile with the z_index created by this pr #16771. This way the two z index is considered.
https://github.com/godotengine/godot/blob/6da73b7897851ede7647c265ec53b7f4ee573af2/scene/2d/tile_map.cpp#L332

@akien-mga akien-mga merged commit 49ac23e into godotengine:master Dec 7, 2018
@akien-mga
Copy link
Member

Thanks!

@guilhermefelipecgs guilhermefelipecgs deleted the add_z_index_autotile branch December 7, 2018 22:02
@guilhermefelipecgs
Copy link
Contributor Author

I've created a very simple demo showing how to use it if someone is interested.

Demo: https://github.com/guilhermefelipecgs/z-index_demo

peek 07-12-2018 22-11

@stormi
Copy link

stormi commented Dec 16, 2018

Thanks for the z-index, most useful to avoid having separate tilemaps for foreground and background.

I think something is missing though: I've tried to use it with an Atlas (the new tileset editor allows to create "Atlases" that are groups of tiles), and it seems that the z-index is ignored for those.

@guilhermefelipecgs
Copy link
Contributor Author

@stormi I thought it was working, probably I missed this, I'll take a look at it.

@stormi
Copy link

stormi commented Dec 17, 2018

Thanks! It's also possible that I used it the wrong way :)

@guilhermefelipecgs
Copy link
Contributor Author

Fixed, I forgot to add some lines.

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

Successfully merging this pull request may close these issues.

5 participants