I have been working on a game which has a very large number of levels say around 100 somewhat like No Human.
Now for each level i have to adjust positions of each and every game object according to the concept/game play of the respective scene.
So my question is how to deal with such a large number of levels? Is there any way to adjust their positions via scripting since adjusting positions of each object in every scene is a very tedious task.
Also how can GUIs be handled for level selecting since there are limitations of draw calls for iOS? and do such a large number of levels increase final build size?
(I think if same assets have been sharing in multiple scenes then it would not increase the build size but i still want to get suggestions from people out here.)
Drawcalls can be beat with EZGUI. One call draws them all…for GUI’s. On the levels and objects per level setup…well, I don’t know your schema but you could grid out your game world with zones, areas and nodes. Store each level to a Hashtable or sets of arrays with objects and what have you placed via node, area or zone, say n1-n999 for nodes, a1-a99 for areas and z1-z9 for zones. Hashtables are nice in that they are fast and give you key-value pairs which works great with a zoning and grid type system as you can use node-object as key value pairs and just script a parsing system for when you retrive the pair to do what is needed like placing the object based on the key value with the prefix “n” doing one thing like placing the object, “a” doing another like triggering object AI for NPC, and “z” doing another like defining level limits.
So you meant i should store all the positions of different gameObjects for each scene in the hastable and then loading one by one as per the requirement at runtime.
Again then it would require to arrange the objects for one time. Wouldn’t it?
I have no idea whether you are using terrain or whatever. I would place an empty game object everywhere you wanted an object and record the Transform values or leave them as placeholders with unique names for when you place an object on that, which I assume would be different every level. The thing is to grid out or systematize the rules for placement so you can set your levels via numbers, arrays, hashtables and dictionaries and then just load those and they are fed to a script that parses the “keys” and sets up your level. Takes setup at first but you can make hundreds of levels and play around with numbers to get variations without hand dragging objects for testing.
If the scenes all use the same models etc then the size of application will not grow (at least not measurably, we talk about kbs here per scene) when you add more and more scenes