0 votes

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?

in Engine by (689 points)

1 Answer

0 votes
Best answer

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

by (27,664 points)
selected by

Thanks for the insight! Brave Bran is a great example

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 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 webmaster@godotengine.org with your username.