Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct loading and saving game data. #960

Merged
merged 5 commits into from
Jun 12, 2022

Conversation

VladiStep
Copy link
Member

Description

Game data loading and saving improvements:

  1. Game data is now loaded and saved directly, without buffering whole file data in memory - new FileBinaryReader and FileBinaryWriter are used for that.
    So, it's possible to load and save data files that larger than 2 GB.
  2. "Writing references in parallel..." part of the data saving is a lot faster - added the chunks type and object index dictionaries, added IUndertaleSingleChunk and IUndertale(Simple)ListChunk interfaces.
  3. Messages of the final part of data saving are describing the process more precisely.
  4. ProfileSaveEvent() and UpdateProfile() are running on different thread, so UI won't freeze on MD5 calculation.

Other changes:

  1. Fixed some warning/error message boxes not showing up on load or save.

Caveats

Game data loading and saving is now more depending on disk read/write load - if disk will be used while loading/saving the data, then it will process the data longer.

Notes

Closes #520

1) "BufferBinaryWriter" is replaced with new "FileBinaryWriter" that doesn't use the buffer.
2) Added the chunks type and object index dictionaries for acceleration of "Writing references in parallel..." data saving part.
3) Added "IUndertaleSingleChunk" and "IUndertale(Simple)ListChunk" interfaces.
4) "FindListChunk()" and "SerializeById()" of "UndertaleResourceById" are using the dictionaries.
5) Changed the messages of "UndertaleWriter.Flush()".
6) Some "UndertaleIO.cs" code formatting changes.
@github-actions
Copy link

github-actions bot commented Jun 11, 2022

@Miepee
Copy link
Contributor

Miepee commented Jun 12, 2022

Tested out the Cafe game as well, seemed to load and save fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

An error occurred while trying to load: Array dimensions exceeded supported range
3 participants