Aristurtle.MonoGame.Save 0.0.1

dotnet add package Aristurtle.MonoGame.Save --version 0.0.1
NuGet\Install-Package Aristurtle.MonoGame.Save -Version 0.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aristurtle.MonoGame.Save" Version="0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Aristurtle.MonoGame.Save --version 0.0.1
#r "nuget: Aristurtle.MonoGame.Save, 0.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Aristurtle.MonoGame.Save as a Cake Addin
#addin nuget:?package=Aristurtle.MonoGame.Save&version=0.0.1

// Install Aristurtle.MonoGame.Save as a Cake Tool
#tool nuget:?package=Aristurtle.MonoGame.Save&version=0.0.1

Aristurtle MonoGame Save

This is an implementation of a save file system that can be used with MonoGame to save game save data in a way that is less likely to be opened and edited by the average user.

There is no 100% sure way of stopping people from editing a save file, but the goal is to make it annoying enough that the average users won't bother with it.

How It Works

There are two methods current for creating a save file

SaveFileWriter.ToPng

The SaveFileWriter.ToPng method will create a PNG file and embed the save data within a custom SAVE chunk in the png file. You can take a screenshot of the current game screen by getting graphics device backbuffer info and using that as the pixels for the png or you can supply your own Texture2D.

Since the data is written to a PNG chunk, a checksum value is created and used as validation when loading the data back in to ensure integrity of data.

To load the data, just use the SaveFileReader.FromPng to load that same png back in

SaveFileWRiter.ToBin

The SaveFileWRiter.ToBin method will create a binary encoded file that contains the save data. The binary file created has a unique signature header appeneded that to signify it's ment to be read by this library, followed by the data len, the data chunk, then finally the checksum of the data. When reading the data back in, the checksum is used to validate data integrity

To load the data, just use the SaveFileReader.FromBin method.

Examples

Examples of both the PNG method and the Bin method can be found in the /examples directory.

License

This is licensed under the MIT license. You can find the full license text in the LICENSE file.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.1 243 11/1/2023

Initial Release