0 votes

Hello, I've already made some projects using Godot, but only using "normal" tiles (square ones with 16x16 and so on). But this new project of mine wants to use the PlanetCute tileset, a "stackable" one with 151x171 tiles. Every tile has a "front" face and a "top" face. For it to be stackable, I need to paint one on top of the other, so the bottom one only shows its "front", and the topmost block shows both its "front" and its "top". You can see how here:

planetCute

In the rightmost column, starting from the bottom up, you see a "dirt" block (front only), on top of it another "dirt" block (front + top), and behind it another "dirt" (top only).

I imported the tiles into my tileset and changed its offset so the + cursor would be centered on the "front" face, like this:

centered

But when I try to stack it on my tilemap, the layers overdraw each other:

overdrawing

I tried changing the Z index, drawing from the topmost down, from the bottommost up, no avail. I think there is something wrong with the way I'm configuring the tiles in my tileset, before importing it to my tilemap, but I have no idea about it. How can I use this tileset in my project?

The whole tileset can be obtained here: direct link to the zip!

in Engine by (12 points)

1 Answer

+2 votes

Hi, I was actually in the middle of doing a tilemap tutorial when I saw your post. I downloaded your images and tested them out, here's what I got working:
enter image description here

I used a Cell size of (101, 80) which seemed to space the tiles out great, and set Tile Origin to "Center". For doing the other layers, I just made each one have an offset of +/- (0, 120) to shift it up or down. Tilemaps are in order, bottom layer first.

enter image description here

Hope this helps! Let me know if you'd like a Godot project download, too.

by (21,920 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.