How to unlock new parts of the map?

Hey!

I’m currently working on a project where I want the player to be able to unlock new parts of the map. Lets say the player got 1000 score points he/she will unlock a new part of the map.

Question 1: From start player can only access part 1, but if player reaches 1000 score points in a game, then the player will be able to play on both part 1 and 2 of the map in the same game session.
In other words, something like this (Also check image for more understanding):

Part 1 - Available from start

Part 2 - If player reaches 1000 points, this part of the map will also be available to play on at the same time as part 1.

Part 3 - Will be unlocked later and can’t be accessed at this current time. (Example player reaches 2500 points)

Question 2: My other question is, what is the most appropriate then, to have 4 different scenes and load them one by one if the player unlockes them, or is the best way to always load the whole map at the same time? We are speaking of a total map/terrain size of 3000x3000 in unity.

Many thanks,

//Huezzer

Save those scroes using: PlayerPrefs.SetInt(“saveScore”, score);

On level selection scene or the map, check for the score using: if(PlayerPrefs.getInt(“savesscore”) >= 1000){

//unlock next level, maybe by making it active, it’s your choice

}

also if you haven’t set anything in PlayerPref, the default value will be zero.

Okey, thank you for your answer!
If I want to save it over time then a database or save the information to file is the best solution, right?

Any ideas of how I can “lock” part 2 until the score is reached? I mean I need some sort of wall (prevents the player to walk to “part 2”) which I will destroy when the score is reached but out in the nature it’s hard to make something that doesn’t look ridiculous? :slight_smile:

Best regards,

Huezzer

if you use: if(PlayerPrefs.getInt(“savesscore”) >= 1000){

//wall down

}

then the wall will stay up till the score is less than 1000

Many thanks, I think I can solve this now! :slight_smile:

check out this other post… looks like you guys are asking about the same thing…

1 Like