Orkn's Pulp Prototypes

A little bit (or a lot) of save system refactoring later and now I have multi save slot support!

Here's a quick gif showing two different saves being loaded and then starting a new game. The title screen and menus are just placeholders so I could get something working:

lolife-multi-save-slots

This was something I wish I'd done in Resonant Tale, but it would have been a big change to make late on so I declared it out of scope. It's definitely more complex, but the premise is pretty simple - it basically just requires some methodical shuffling around of lots of variables!

The crux of my approach is to have a slot variable for the currently active save slot and to call events to save and load specific to each slot.

Saving now looks (pretty much) something like this:

on save do
	call "saveS{slot}"
end

on saveS1 do
	s1_player_level = player_level
	// etc.
	store "s1_player_level"
	// etc.
	store
end

Loading is similarly like this:

on loadSlot do
	call "loadS{slot}"
end

on loadS1 do
	player_level = s1_player_level
	// etc.
end

While deleting a save (when starting a new game in that slot) looks like this:

on deleteS1 do
	toss "s1_player_level"
	// etc.
end

Once you factor in all of the variables in the save data and the multiple save slots, that's a fair amount of repetitive and duplicated code, but it should be easy to manage going forwards.

1 Like