Ralith / hypermine

A hyperbolic voxel game
Apache License 2.0
160 stars 20 forks source link

Make saves configurable for the client #384

Closed patowen closed 7 months ago

patowen commented 7 months ago

Having the ability to choose which save file is active would allow me to swap between them when, for instance, trying out different chunk sizes or switching between an older and newer version of Hypermine. It would also make it easier to test save files on an HDD to make sure that doesn't become an important bottleneck.

Fortunately, it looks like the implementation for this is quite simple. I chose to call the configuration option save for consistency with the server. If you give it a full path, it will save at that path, but if you give it a partial path, it will save in the data directory. All of this functionality comes for free with the PathBuf::join function.