How to use different sizes of sprites in tilemap

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Lavazator

Hi! I’m new to godot and game development. I’m trying to create a tile map with sprites of different sizes. In the spritesheet that I got, there are several types, such as tiles, objects, buildings and backgrounds.

I have no issues with the tiles as they are consistently 32x32, whereas objects and buildings come in different sizes, some 34x27, 33x26 and so on. I have tried to make them the same size, but when I draw them in the editor the sprites don’t align with the other sprites.

I was wondering if every object and building should be made into just one sprite node?

Thank you very much!

:bust_in_silhouette: Reply From: Vadalken

Have you tried using patterns? I think that is the intended tool for what you want.

I would also recommend adding transparent pixels to your sprites so that they can easily be tiled. If your grid used 32x32 tiles then your 34x27 thing should be in a 64x32 image with transparent padding. Though it really is up to you if you want to edit in purely through the Godot tileset editor or want to do some of the editing in an image editor like or Photoshop.