A question thats been bugging me for the longest time

So I am trying to make a top down rpg, Ive got my movement and stuff like that ready, but one thing has been bothering me, I want lots of overworld scenery to be animated
like trees swaying in the wind or the character grabbing a doornob, so, would I have the background of the game be one large image with it being split onto different layers for z-order, or would I have several objects to display the map? im not sure if having that many instances would lag the game or not, or wicth way would be most optimal.

1 Like

Yes…everything gonna lag your game…because lag can’t be = 0
If you’re not making a Pong clone, the best option you have rite now is to use Tiled to create your world and then add Tiled collisions masks. You gonna end with a lot of useless crap in your editor because it is how GD works. (just saying truth…) but you have no other options…(ort maybe learn C# and godot GDscript or any engine with a world editor)

After that place more (a lot more) objects to animate your world . Place objects everywhere and you’re done.Use the search instance bar to find out which one of your objects youre trying to edit.
Avoid the splith thing you were talking about…if you don’twant to add more objects…
This is the easier way.

Id say make a Layer for the background, some bigger images that you can work on top of and then a Layer for placing your objects and where youll be playing.

You can automate ZOrder by placing all your objects in a group and then making an event with

Change Z Order of ObjectGroup set to “ObjectGroup.Y()”

That way objects lower on the screen will always show infront of objects higher on the screen.

As for your scenery, make smaller lively areas, create lots of scenes, one for each segment of your game.

Think old school JRPG, each screen you travel trough would be a different scene.

I dont think you need Tiled Maps for this kind of game, simple scene building is more than fine and it wont take you that long.

You could do this in an optimized manner by making every tree a separate instance of one sprite, which is animated, but for each instance, pause animation unless it is visible on the screen.