foxostro / GutsyStorm

Game with voxel graphics similar to Minecraft. (Restart GutsyStorm with Objective-C/Cocoa)
Other
12 stars 4 forks source link

Don't crash if saved data is corrupt #49

Closed foxostro closed 11 years ago

foxostro commented 12 years ago

If saved data is corrupt or otherwise unexpected (for example, hard coded chunk sizes may have been changed) then the game will crash. Instead, present a reasonable error message and prompt the user to quit or attempt recovery by deleting existing saved data.

foxostro commented 11 years ago

This has been finished for a while. I'm not sure of the SHA1 for the commit...

Now, the engine just ignores files with unexpected data and regenerates the chunk from scratch.