How to Spawn Enemies?

In my game I created a Node2d which contains all rooms suppose that there are 20 rooms(small). Now I want to add atleast 5 enemies in each room, so there will roughly 100 enemies node at the same time. But I think there will be a better way to add enemies node in world scene but I don’t know. Should I add or spawn or something else?

Bruh they are the same thing I guess, in the end you probably want to use instaniate function to instantiate your scene
(Your enemy could be a packed scene)
I feel like you don’t exactly know what you wanna do, you wanna spawn all the enemys in world at once? Or you wanna spawn for each room indevitually

This really depends on the game you are making. If it’s small enough, defining and spawning all enemies up-front is probably fine. However, for games of a sufficiently large size you will want to create them dynamically as needed for performance reasons.

There are a few approaches you could take. For example, you could create the enemies for a room when the player enters that room, perhaps after some timer expires on entry. Alternatively, you could create them when the player is one room away, such that they are already there when the player gets to it. The Area2D node can be used to detect the location of the player.

Interesting question!

this has some info on spawns. maybe you can adapt it to your game?