#How do I make a "Save File"

4 messages · Page 1 of 1 (latest)

indigo valley
#

I want to make it so it someone were to press a button all there stuff were to load 🙂

obtuse shore
#

Idk I make a format of like [{0}, {1}] that contains strings with save data and make it cloud

late sandal
# indigo valley I want to make it so it someone were to press a button all there stuff were to l...

Majority of people convert all their data into a string, save it into a string variable configured to Cloud, and then convert it back

For example, take my own game, ^HotBomber_2

The way maps save their data is in a string variable

My data separator is /
The point of the separator is so I can use String Split to choose which index I want to take data from

This is the map data for the map Spire
````bbbbccdccbbbegijigebbbfjmmlmmjfbbejmjgegjmjebcgmjdbcbdjmgcbcimgbjrjbgmicbbdjlecrFrceljdbbcimgbjrjbgmicbcgmjdbcbdjmgcbejmjgegjmjebbfjmmlmmjfbbbegijigebbbccdccbbbba\Spire\0\0\0\c80`PresetMap```

The first index contains the height data of each tile and the lava

  • The first 161 characters are reserved for the height values of each tile, since each tile height is rounded, and can only be between [0,42], I only need 42 characters for each tile height, I use abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP

  • The 162 character is the height of the lava, with the same 42 characters as the tiles

The second section contains the name of the map
The third section contains the lava animation type
The fourth section contains the lava height
The fifth section contains the lava movement speed
The sixth index is only so I can mark a map as "Preset", meaning I made it, the point of this is so it doesnt show who made the map

obtuse shore
#

That is a pretty good and common one