Hi there,
Thinking about game that have continuous level, like moon chaser, jetpack joyride etc…
This game will have ceiling and floor that will be generated.
I’m just interested in any advices or experiences. I was thinking about couple of ways that it can be done.
- To create one mesh and extend it procedurally. (I’m guessing this will kill the phone after a minute or so)
- To create two meshes, and do the generate mesh, position after current one loop. (not sure about this one)
- Create level segments by hand and import them in to scene so i don’t have to instantiate anything and just randomly get level segment and position it after active segment, and do this indefinitely. (this way i wont have instantiation, physics recalculation for collides etc.)
These are ideas I had, i would appreciate to hear from someone who really did it or has experiences in this area about best course of action, maybe something third that did not crossed my mind. Also what to be careful of, pitfalls etc…
It would be nice to have discussion about this topic to clarify things for me and for future game makers that are thinking about venturing in the world of endless:)
You can use prefabs and build the level on the go and just re-use them.
Or you build levels as usually and have the power to optimize them.
But if you shall make for android you must be aware of memory usage and what type of phone you do have targeted.
It also depending on how your game is. Sometimes its more easy to make levels and you can look how the performance is more clear.
Also many users do like levels in a game. It also give you some power to also have very small levels and make them good looking and have some bigger levels that you use less effects and stuff.
Are you thinking about instantiating prefabs at run time then reuse them or putting them in scene before game starts. Also any performance idea how many prefabs at a same time could there be in scene before you experience catastrophic performance decrease I’m sure it depends on prefab complexity, let’s say it’s just ceiling and floor level segment (mesh that is like 2D, like plane… but curvy/wavy/spiky so more polygons) with colliders.
This raises question if it is wavy terrain, or spiky is it better to use mesh collider or bunch of primitive ones… My opinion is that after certain amount of primitive ones, mesh collider pays way more.
I am actually planning to make levels but let it all be generated in one scene… and transition between levels can either be something like moon chasers physical transition to another level marked by some distinct event that don’t interrupts game, or just do the difficulty increase without clear separation between levels.
I know you have so much more power when you make levels by hand one by one… and keep them separated as prefab, different scene or whatever logic you prefer.
But i started this thread for the sake of continuous level generation idea, be it procedurally or whatever way it is possible.
Sure it is possible, but you must also see to the time it take to make a level in real time.
You also loose the option to build baked lights.
So bottom line is that it would take more time to build it and you loos most of the optimizing stuff you can do.
That leaves a game looking worse then it could. Also it do use more resources and that will means better phone, if you do not want it to lag.
So the question is how the game shall be and what type of game you are after.
Idea behind it is to be really simple… like i wrote earlier, moon chaser, jetpack joyride as examples… so mostly some collectable objects, power ups and that is it, i know i have to make compromise because allot of processing power will go to the level setup that is for sure… but the question is not should it be done… but what is in your opinions best ways to make it work.
Also if you go with making level segments and use them as prefabs you can use baked lights and other things as designing whole level by hand.