How to add more than 100 trees to the world scene

Hi everyone! I’m making a 2D JRPG-style pixel art game in Godot 4.

I have an animated tree saved as its own scene (Tree.tscn, using an
AnimatedSprite2D). I want to fill my world map with a lot of them —
around 100 or more.

My question: what’s the recommended way to do this?

  • Should I manually instance the tree scene 100 times in the World scene?
  • Is it better to spawn them with code in a loop?
  • Or should I use something else (TileMap, MultiMesh) for performance?

I’m worried about performance with that many animated sprites, and also
about keeping my World scene clean/easy to edit.

Thanks in advance! :b

Hello, it really depends. But the general rule is, don’t worry about the performance until you should worry about it.

Not sure what you mean ‘manually’ here. If you mean adding it on the editor, you can do that if you don’t need to ‘randomize’ their location.

Again it depends. But if you want to randomize, this is a good option.

Depends on your animation. But Godot should be able to handle it. If it causes issues, you need to do optimization like disabling them when the player do not see those trees for example.

TYSM ! :slight_smile: