Right now, Ser runs the fastest by a comfortable distance, but produces slightly larger file sizes than Serpent and tserialize. Saving the game when around 200 years into the future in my football game currently leaves save file sizes of 12Mb in Ser, 10Mb in tserialize and 9Mb in Serpent. Ser takes around 2 seconds to run, tserialize around 3, but Serpent takes a good 15-20 seconds which is too long.
However, currently using Ser, I notice that when I try and load my save file back in, if the file size is above roughly 11,000kB, then my load_game() function fails.
The function
Code: Select all
function database.load_game()
local data, size = love.filesystem.read("save/savedata1.data")
print(data~=nil, size)
data = loadstring(data)()
assert(data, "Data could not be loaded!")
database.team_list = data.team_list
database.league_list = data.league_list
database.nation_list = data.nation_list
database.vars = data.vars
--
database.build_dict()
--
database.process()
--
g.notification:new("Game Loaded!\nData Size: " .. math.floor(size/1024) .. "kB")
end
Code: Select all
data = loadstring(data)()
Code: Select all
attempt to call a nil value
EDIT: Just to note, this code runs DANDY and quite quickly if the filesize is below that 12,000kb mark!