First of all, sorry for this post, I guess this already has been discussed. I browsed stackexchange and the web but I couldn't seem to find a clear information for my case, with always mixed results.
So I'm making a mobile game with Unity, and am re-starting the development from the beginning in order to have smooth performances. The game is a 2D runner (Canabalt style). Though there will be two modes :
- One story mode with about 12 levels precisely designed which will be always the same
- One arcade mode with randomly generated level (platforms).
Main features :
- Back and Foreground Parallax (5-6 layers totally, with different movement speed)
- Automatically running, manually jumping over holes and attacking ennemies
So I have a few interrogations :
The classic question : should I make it like a theadmill, having a fixed player position, and making the level move forward. Or should I be moving the character as the camera follows him ? Given the fact that I want multiple parallax background. Are there differences performance-wise ?
A linked question : should I use the perspective camera and play with the Z axis ? or keep the orth camera ? I'm not sure how it affects the performances.
Then, having read many topics, I guess I should try to move back the objects and backgrounds, instead of instantiating and destroying them all the time when doing a random level, right ? And for my pre-designed levels (not random) should I split the background to display it step by step, in terms of performance ?
I already know how to scroll my backgrounds, make a parrallax effect with my 5-6 layers, here I'm looking for tips to start clean with the smartest development style, especially in terms of performances and would like to have some hints on which are the best practices to follow
Maybe you have other good practices to share with me... I'm hoping I'm not asking too much, thanks for any insights !
Have a good day