We are currently creating our first game with the Babylon JS framework and have little experience with game development in general. Now that we created the basic functionality like the movement and camera behaviour, we wanted to create a basic medium-sized city with models like trees and buildings. These models don’t need anything expect for a physics imposter (currently these objects have their own script).
However, we were wondering what common methods are to place these objects based on preset positions as we don’t use the editor. Instantiating every object individually in the code seemed messy and inefficient to us. We were thinking of adding a JSON file with positions and object type (e.g. tree or building) and then looping through the data. In this case, we were worried instantiating that many objects at a time would cause a huge delay at the start of the game.
We are very curious to hear what methods you guys use, and whether you have some examples that might help us further.