Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Tutorials
#1

Save / Load Data

Archive: 6 posts


http://lbp.me/v/7t9cnh

I've made all of the tools that I used for this tutorial available as a collectible prize in my lockbox, the password is 3173. This tutorial assumes you understand how a lockbox works.

Since the introduction of the memorizer to LBPVita people have been dreaming of the possibilities within LBP2. Many of these possibilities involve saving a player's gameplay progress so that they may return to the level later and continue playing where they left off. Sadly, the memorizer does not exist within LBP2, however, it is still possible to save/load a players progress through your level. Lets consider a basic example, an RPG where you may play as either a mage(1), an archer(2) or a swordsman(3) (these numbers will make sense later on in the tutorial) and in this RPG you can level up to a maximum level of 20. We want a way for players to be able to save the information about their character (Class and lvl) so that they may return to the level later and load their character with all their previous progress restored.

The way we are going to do this is by generating a code when the player saves the game, when the player enters the level they can enter this code to load their previously saved data. Consider this example to help you understand how the system works; we generate a 3 digit code e.g. 123. This code, 123 (or 12 3) tells us that the player is has reached level 12 and was playing as a swordsman(3). Sounds pretty useful but what if a player enters the level and just types in a random code, e.g. 201, they will load a level 20 mage. To counter act this we need to use something similar to a lockbox mechanic where if a particular code is not correct then the player remains locked out and unable to load a character, to achieve this lets add 3 more numbers to the code, these numbers will be 4, 7 and 1 so now instead of 123 our code will be 142731. Now if a player tries to randomly type numbers there is a 1/1000 chance that they will get all of our 'lockbox numbers' correct (simply add more 'lockbox numbers' to lower this chance).

There is still 1 more very minor problem with this system which is that some players may be very clever and realize by comparing multiple save codes that every time they save, the numbers 4, 7 and 1 never change so they might start typing in random codes, keeping 4, 7 and 1 the same in all of their attempts. To counter this problem we're going to make multiple sets of numbers which will also open our 'lockbox', the first set of numbers was 4, 7 and 1 (or 471), the next could be 590, followed by 236, 163, 044, etc. until we have, lets say, 10 sets of numbers in total (you don't actually have to make 10 sets of numbers 2-4 sets will do just fine). Now when the player saves the game, instead of 4, 7 and 1 ALWAYS appearing, we can swap it with any of the other sets of numbers to keep the player from realizing that some numbers are staying the same. Now even with 10 sets of numbers that activate our lockbox the player still only has a 1/100 chance of passing the lockbox if they type in a random code.

Now some of you out there may be asking how we can convert a code such as 142731 into 2 signals of 12% and 3% respectively. To do this, first we will set up something similar to a lockbox which lets us select and cycle through numbers from 0-9. After this is set up you need, initially, to figure out a method which will allow us to get a 12% signal when we display the number 12 and 3% from displaying 3. For tutorial purposes lets simplify it just to get a 35% signal from displaying the number 35 (the number 35 is arbitrary), in this case 3 is the 1st number and 5 is the 2nd number. It would be ideal if when the first number is 1, 2, 3 etc. we could receive a signal of 10%, 20%, 30% respectively and when the 2nd number is 1, 2, 3 etc. we could receive a signal of 1%, 2%, 3% respectively, then all we would have to do is add the two signals together to have our signal correspond to what is being displayed when we are entering our code. To do this we can set up a series of batteries ranging from 10% - 90% and 1% - 9% which feed into tags, these batteries can be on microchips which can be activated and deactivated. Here we can see the activated batteries feeding into tags which send signals which are then added together to give our signal of 35%. In this case the green tag has batteries ranging from 10% - 90% (30% battery active) and the purple tag has batteries ranging from 1% - 9% (5% battery active).

43399

43400

Now when the player types in the number 12 and loads their game a signal of 12% can be used to make their character level 12. Adding more numbers such as lockbox numbers and numbers to tell us what class the character was is very simple to do, I've made all of the tools that I used for this tutorial available as a collectible prize in my lockbox, the password is 3173. I recommend collecting the prize and playing with this logic yourself to see how it works, I also constructed a working prototype with lockbox numbers 4, 7 and 1 required to load any data (the lockbox numbers are displayed in red in the prototype).
2012-12-24 23:33:00

Author:
Seku
Posts: 65


Smart idea! Complex though.2012-12-26 09:14:00

Author:
waaghgork
Posts: 160


http://lbp.me/v/gfr-hr

For those of you who are interested in this I have implemented a basic version into my level "The Temporal Traverse" for you to test out. Many players gave feedback on this level saying it was too difficult and time consuming to finish the entire level in one play, now they can save their progress, leave the level and come back. This allows the players to enter the level from where they previously left with their previous score.
2012-12-26 09:38:00

Author:
Seku
Posts: 65


This tutorial helped me a lot Seku, you're amazingly logic-smart. Thanks!

--Jauw
2013-03-01 19:33:00

Author:
Jauw
Posts: 484


Fantastic tutorial, I've added it to the queue! 2013-07-08 17:02:00

Author:
Oddmania
Posts: 1305


Wow I could never have even thought of anything like this! Thanks a ton 2013-07-09 16:42:00

Author:
dolphins-r-lame
Posts: 281


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.