The reason this is bad is because I am saving the level bit-by-bit. This means that if I make any changes to what is inside a level, i.e. what is saved and loaded, then attempting to load a level template that does not exactly match the current one will result in a crash. What happens now instead is each component of the level is saved and loaded separately in their own files. This allows me to check which files exist and which do not and prevent the game from crashing every time I add something to a level. Here is what the new level folder will look like:
And inside each level folder:
No comments:
Post a Comment