-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Save System? #20
Comments
Hello, |
Save/Load System Spec
SaveSettingsThis is a data-holding class that needs:
This will create save files to the directory you specified. LoadSettingsThis class sets up your settings for loading your save file. This needs:
This will extract the data from the save file and return it as a (This may change in the future, but for now, this is how it will work.) Making Objects SaveableTo make an object saveable, you need to add the This will allow the object to be saved and loaded. ex: [Saveable]
public class Person : Entity {
// Things derived from Entity
// ....
public string Name { get; set; }
public int Age { get; set; }
} Saving/Loading ObjectsTo save an object, you need to create a ex: SaveSettings settings = new SaveSettings("C:/Users/Me/Documents/MyGame/SaveFiles", new GameSettings(), EncryptionMethod.None, SaveType.YAML);
Person person = new Person("Bob", 20);
settings.Save(person); Extra DependencyI will be using the (Newtonsoft.Json is already a dependency for the project, so I will be using that for JSON serialization.) Namespace and my Code StyleThe namespace for the Saving system will be in
and the load system will be in
and the attributes will be in
Code StyleI will be using the However, I do some things differently: // I always use `var` for objects, not new()
var person = new Person("Bob", 20);
// For braces, I use the `K&R` style
// Ex
void Method() {
if (true) {
// Do something
} else {
// Do something else
}
if (false)
Statement();
} If you request that I change this style for my PR, I will. Thanks, Gammer0909 (Sorry for taking a long time to respond, I had some things to do and I had to design the API.) |
looks very cool! (Sorry for taking a long time to respond) |
Am I clear to start? |
Yep! |
I propose a Saving System, to abstract save files to make a save game implementation easier.
Do I have to propose how I would have this implemented? If so I will, upon request.
I will start as soon as I'm cleared to start.
Thanks, Gammer0909
The text was updated successfully, but these errors were encountered: