Cross-Game Products/Data
If you have multiple games that share the same data (e.g. a hub world and minigames) you can link them together automatically using the parent game system.
Last updated
If you have multiple games that share the same data (e.g. a hub world and minigames) you can link them together automatically using the parent game system.
Last updated
// little helper you can write to make this easier
get_scoped_key :: proc(local_key: string) -> string {
return format_string("%:%", Game.get_game_id(), local_key);
}
save_player_xp :: proc(player: Player, xp: s64) {
Save.set_int(player, get_scoped_key("xp"), xp);
}
load_player_xp :: proc(player: Player) -> s64 {
return Save.get_int(player, get_scoped_key("xp"), 0);
}