TileMaps vs StaticBodies, what's best for big objects in platformer?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By quijipixel
:warning: Old Version Published before Godot 3 was released.

I’m starting a project in Godot (which i’m loving) where I need to use big objects (there are no “ground tiles”) as static bodies. What’s best? To fragment the textures for the objects as tiny 32x32 pieces and use a tile map or generate big sprites with the whole image in the texture as static bodies and add a CollisionPolygon?

:bust_in_silhouette: Reply From: Zylann

Choosing one or the other is a matter of design choice and maybe performance tradeoff. If your ground bodies are way bigger than a tile, they can be StaticBodies just fine. If you find you can make them “modular” for tiling then you can put them in the tilemap.
I believe it doesn’t matter that much because the 2D engine segments space into a grid to cull elements out of screen, surely same for physics.
As a reference, Brave Bran doesn’t use tilemaps: https://www.youtube.com/watch?v=5ZuQIbMEjLw

Thanks for the insight! Brave Bran is a great example

quijipixel | 2017-06-09 16:52