That really depends on code. I can't help without any code provided but what you need to do in general is saving all the ships elements using a for loop, and loading them back again. This might sound a bit complex. First in your save function you need to get a for loop that runs through the ships array. Then save every ship with a seperater like :, or |, or _, or what ever you like in between of each to the save file. To load it, you read the contents of the file in a string, and use string_split function to split each element data you saved into an array of string. The last thing to do is to get a for loop from the array string i mentioned and read the data from there. Then spawn ships with that data.
---
Co-founder of Sonorous Arts.
Check out Sonorous Arts on github:
https://github.com/sonorous-arts/my Discord: kianoosh.shakeri2#2988