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?

asked Jun 7, 2017 in Engine by quijipixel (681 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

answered Jun 8, 2017 by Zylann (26,045 points)
selected Jun 9, 2017 by quijipixel

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.