Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[$500] #110 | Save To Zip
#1
Price: $500

Description: The game uses SQLite as a save game format and an internal database that drives most of the game data.

The save game and the internal database are the same. We read the database from the drive when you load a save game. Then we store that database in memory (RAM). When you save the game, we write the database back to the hard drive.

Since there is a lot of data in the game, the SQLite files can get rather large. Well into the 1-2GB range. The size slows down the saving process. It can also slow down turn time because of autosaving. Spinning hard drives magnify the problem.

Compression should reduce the file size and could be a faster save solution. (Modern consumer CPUs should be able to compress faster than writing to disc.)

While SQLite supports reading and saving to .zip files, it can not do this via an in-memory database.

This bounty would attempt to copy the in-memory database to a zipped database upon saving. And the opposite when loading.

The goal is to reduce file size and speed up saving. Save game loading are likely to be slower.

If this bounty successfully reduces file size enough, there is a possibility for cloud saving.

Requirements: None

Required By: None

Concerns: While this would reduce the filesizes, it is not guaranteed to be faster than writing directly to the disc. And improving saving speed is the main goal. Nonetheless, reducing filesizes would be considered a success. If performance is hurt, zip saving would become a settings option needed for cloud saving. Cloud saving might not be possible, depending on how much compression we can achieve.


Eric's Opinion: I have been waiting to see if there is a solution from the folks at SQLite for years, but sadly there hasn't been any movement on compressed in-memory databases. The above solution of creating a new database, then copying all the content from the old one is the best option we have to reduce save sizes and speed up saving.

Links: It doesn't happen unless you contribute!
"great writers are indecent people, they live unfairly, saving the best part for paper.
good human beings save the world, so that bastards like me can keep creating art, become immortal.
if you read this after I am dead it means I made it." ― Charles Bukowski
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)