I'm making a top-down snowboarding game with trees (objects) outlining the course. I'm using physics with the trees so the player will bounce off. I've tried three options:
1) When the room is created, line the sides of the course with trees. However, that's a lot of objects and the game slows down for longer levels.
2) Create trees just before they enter the bottom of the view and delete just after they leave the top, but I still experience a significant slowdown vs. option (1) with shorter levels
3) Re-use the tree objects by moving them to just below the bottom of the view after they leave the top, so it's not constantly destroying and creating instances of the same objects. This turned out to be by far the slowest. I had a step event for the tree object checking if it was above the view and then moving it to the next position below (stored in an array when the level is created).
Any advice on how to do this better? I'm hoping I'm missing something obvious because this doesn't seem like it should be this hard to get decent performance on a 2D game.