Hello, I have been developing demo games for a while with Unity and now I believe I’m ready to publish a game. Right now, I’m developing a 3D tower defense game but instead of building levels, I created a script to randomly determine the map for me. I will also offer an option for players to recreate the map on levels in exchange for gold.
I wonder how can I copy these maps to levels. I have five zones with 100 levels each and each level has different requirements (such as level 1-10 has only one spawn point and maximum 30 areas to build towers).
Since players may want to play completed levels again, I’m planning to use PlayerPrefs API. However, I wanted to get opinions from you guys as well. I’m not sure whether I can do it with PlayerPrefs, is there any other concepts I need to know to search for and learn?
Do i understand this correctly? You have 500 Maps and want to assign them to a level on a 1 to 1 basis?
And you want to do something with PlayerPref (maybe a highscore?).
I cant give an answer because your text does not explain your situation well enough.
The Feature Request tag is usually reserved for things you want Unity to add to their libraries, I believe the correct tag for this one would be Feedback.
From what I gathered, you just want to know about other methods of saving values? You could always just serialize the object into and save it as a file, although I don’t really see how it would be any better than using the PlayerPref. One benefit to serializing it though, is that you could send it to a server for online capabilities such as map sharing.
Thanks all for your replies. I’ve totally misunderstood Feature Request tag and changed it.
I have one script called MapGeneration, which I’m planning to turn it into namespace. This script generates a random map according to the predefined restrictions.
I will create another script for levels and use the same script for all levels but change certain restrictions and monsters.
How can I successfully save the maps created for users? I’m planning to save the data on a server and I thought PlayerPrefs will do the work but I wanted to know whether is there any better way to do so. However, it according to your answers, there is not better way too