Giant Sprites vs Importing Tilemaps

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

Hello, I am learning Godot, and I already have an idea and a lot of art for a game I’d like to make. It’s going to consist of different levels, but something I’m running into is how I’d implement that. For my first level, I have this. What I’m wondering is whether or not I should import a large sprite for my level, since I’ve already designed it, or use tiles. One drawback I’ve found to using tiles is that although there are a lot of repetitive textures in the level, there are a lot of unique ones as well, like the windows for example, which I made individually, or the bookshelves. Another drawback is connected tiles, like the roof and the wood for my buildings, I’m just not sure how I could implement that. I found a website that takes an image, and produces a tileset and a tmx file, so I don’t waste disk space on repeating textures, and memory when rendering. Is it a simple process to import a tmx file into Godot, and have easy control over collisions and functionality? Any help is appreciated.

:bust_in_silhouette: Reply From: jgodfrey

Based on the uniqueness of the design, I agree that a Tilemap probably doesn’t make sense. However, rather than one, huge image - you could split that large image into a number of screen-sized chunks as really that’s all you’ll see at any given time anyway. Then, you could add / remove chunks as the game scrolls…

Thanks, I have a follow-up: Does Godot automatically not draw Sprites that are off-screen, or would I have to program that?

lemonine | 2020-11-27 19:08

Godot should attempt to cull sprites that are off-screen, though I don’t know the details here. You can always toggle the visibility property of the off-screen items to be sure.

jgodfrey | 2020-11-27 19:26

Good to know. My last question is, how would I go about setting up collisions for this?

lemonine | 2020-11-28 03:38