I want to be able to save a few variables in my game before exiting and have these values loaded into my classes once I start it again.
Through googling I came upon Properties, which seemed to suit my needs well, as it’s seemed simpler than having to write and read from a .txt file.
However, there are a few things I don’t like about it:
-All values are interpreted as strings and I have to cast everything I write and everything I read.
- it’s still somewhat of a hassle, having to create in/out-streams etc.
- unless I extend the properties class and override methods, there’s a lot of things I can’t control, like the order of how values are stored, etc.
So, I was wondering if there’s a simpler way of doing what I’m aiming for?