I am creating a simple 2D top down moving games, where different kinds of obstacles come from top, player has to avoid obstacles and move towards coins to collect. In this case I am creating obstacles programmatically and adding it to scene tree using Instance method as follows.
var enemy1 = EnemyKindOne.instance()
I am creating enemy for every 1 second and adding it to scene tree. At the time of creating and adding enemy there is a noticeable jerk. Because of this game is not looking smooth, How to solve this?