1.Summary
In the long long ago, many video games were not capable of being saved into memory. But technology has advanced to even allow most web browsers to keep track of game-data in a HTML5 game.
The Game Pencil Engine uses a simple slot-data approach to saving and loading useful game data.
2.GPE Data Functions
void gpe.erase_data( String dataIdentifier, String dataTitle)
Sends in the data related to the dataIdentifier( number or string) by dataTitle(string) to the GPE's shadowrealm.
Scope: GPE
Return type : void
Parameters:
- String dataIdenfier - the user-created key name of the data. (example: svn_1_p1 )
- String dataTitle - the user created title of the data(example: level1_data )
DynamicType gpe.load_data( String dataIdentifier, String dataTitle)
Loads in the data related to the dataIdentifier( number or string) by dataTitle(string).Returns IS_NULL if unable to recover data.
Scope: GPE
Return type : DynamicType
Parameters:
- String dataIdenfier - the user-created key name of the data. (example: svn_1_p1 )
- String dataTitle - the user created title of the data(example: level1_data )
void gpe.save_data( String dataIdentifier, String dataTitle, DynamicType actualData)
Saves the actualData(Any data type) related to the dataIdentifier( number or string)'s dataTitle(string) block.
Scope: GPE
Return type : void
Parameters:
- String dataIdenfier - the user-created key name of the data. (example: svn_1_p1 )
- String dataTitle - the user created title of the data(example: level1_data )
- DynamicType actualData - the data you are storing. Can be any data-type you wish thanks to the joys of JavaScript.