Open lionel42 opened 6 months ago
Sounds good. Yes I like json too. Now.
JSON is cool, would make saves a little larger. But in theory that opens things up to allow savegame editing and creating mods/scenarios easier?
They're currently 40MB, which was a lot in 2009, less today. I think we could probably scrape out some further non-essential things to slim to counter-act, right now the logic is just "save the entire solar system. but remove images because they don't pickle". Maybe better to start listing the stuff that we know to be needed for a save?
Also - I'm a big fan of the json, because I - today - know much more about working with that, and it could be a real enabler for tuning the whole company/firm logic computer player intelligence ("2009 AI"). In most play-throughs I do, the markets find reasonable equilibrium after a while, but having a (more) workable data format we could do some really really cool things about pre-training everything ("2024 AI")
I love JSON too, In a lot of my favorite open source games, they have content encoded in JSON, which makes it much easier for non-programmers to make content additions/mods, and contributions. It worked particularly well for CDDA.
And JSON and textfiles specifying elements of the program are how I first got started modding games before I even knew a thing about coding.
Although, with this genre of game it might not help as much. (although, maybe we start get custom scenarios and such?)
Pickle is not a good tool to save files, it has many security issues.
With the recent developpements, we have moslty removed all the pickle dependence.
The last one that we need to change would the the game saving/loading in the
solarsystem.py
file. functionssave/load_solar_system
.I would suggest to save all the necessary data to a
.json
format, as it is very easy to interact with.What do you think about this suggestion ?