Tutorial 18 - Loading and Saving Complicated Tables to Global Data

There has been some good discussions recently on methods for saving tables and string in image data. I have taken a different approach, parsing the table into a string and then reconstituting it using loadstring(). To demonstrate this technique, I have updated the dGenerator Tower Defence level generator to use the File Manager class to save and load level data (in global data).

Here is a video of the code in action:

The full tutorial is available here: http://codeatuts.blogspot.com.au/2012/09/tutorial-18-saving-and-loading.html

The tutorial includes a dropbox link to download the code. If you have any issues with this there is an alternate code download location here: https://gist.github.com/3805511

Next up we will add the ability to add waves of creeps and finally towers.

.@Reefwing, you are a scholar and a gentleman… just saying.

Thanks @Ric_Esrey.

.@reefwing thanks for the tuto. Haven’t analysed it in details yet, cause i have not the need now, and it is rather long, but i’m sure i’ll go back to it when i hit the same problems.