Hello! I am a total beginner at using a game engine. I’ve figured out how to use and paint tilemaps so far, but I’ve come across a problem. I have several tilemaps with a bit of transparency before the tile ends. I noticed after painting and testing the tilemap out that it seems to have a gray background where I want transparency inside the actual tile. I’ve probably missed something. Does someone know why this happened and how to fix it?
Each tile is 16 X 16 and exported from Krita as a png and I used tilemap (not layers). I searched some more and it seems like the old tilemap system is getting replaced by tilemaplayers. Do you think that has something to do with it?
You probably want to use TileMapLayer, but I’m not sure that’s the cause of the problem here. PNG supports transparency, but not all pixel formats PNG supports handle it; if you’ve got a PNG with indexed colors, or no alpha channel, there may be no transparency in the PNG.
I’d suggest pulling it into a layer in GIMP or photoshop and seeing if it’s actually transparent.
Look like the default background color of the game. Did it change when you change environment color from the game settings?
If it is and you want your black grid tile as background, you need to draw grass tile in another layer, otherwise it remove the previous tile.
I don’t understand exactly what you mean with having the tiles on different layers. I tried switching over to tilemaplayer to see if the problem was still there (it was). As you can see on the picture, I have (I think) several layers of tilemaplayers. Is there another way to separate the tiles than I’ve done in the screenshot (Dark sky is supposed to be furthest away from the camera)?
If I release the connection between Dark sky and Dark grass nothing happened with that gray background on the more transparent tiles.
Theres the layer you selected. did you put them on seperate layers? Also i assume this is pixelart you are working with: You should set the 2D-Texture-filter to nearest in the project settings
In that picture I used the old tilemap. I switched over to tilemaplayer and I haven’t found that option there. Is it perhaps somewhere else in the tilemaplayer function?
I changed the background to pink and the grass tile background is now also pink so I think you’re right that it somehow overrides my sky tile. The new tilemaplayer function is overall a bit tricky to get a hang on. I don’t seem to be able to paint in tileneighbours like I did on the old tilemap function either.
This is how it looks like right now with tilemaplayers: