Saturday, 19 August 2017

Version 0.1.83 delayed until next Friday (25th)

I'm so sorry to have to give you more bad news, but I'm going to have to delay the release until next Friday. ;_;

The next release date is: Friday 25th August

I'm sorry! ;_;

I tried my absolute best to get this save-game compatibility work done in time, but I didn't manage it. I'm going to go into detail about what happened this week, to try and explain what led to the week-long delay.

TL;DR The code won't compile, as I still have just under 300 errors to fix, and it will take me about 4 more days to fix.


What happened



The cause

In three words; save game compatibility.

In more words; the way I'm saving games at the moment is by utilising Java's 'Serializable' interface. Basically, I can save all of the game's data (NPCs, items, clothing, maps, etc.) by making each of those pieces of data implement this 'Serializable' interface. This allows Java to save those pieces of data, then reload them at a later time, thus allowing for games to be saved and loaded in their entirety.

The problem with this is that if I introduce a new piece of data (like a new piece of clothing, a new map, a new NPC, etc.), then all previously saved games become incompatible. This is obviously far from ideal, so, as most of you are probably aware, I was trying to create a new way to save games for this version.

As a solution, I've decided to try and make a framework that will enable me to save all of the game's data into an XML format. By using this framework, I'll then be able to put in checks and default values for any new piece of data I add in the future, therefore allowing me to make all games saved in that format compatible with any future additions I make.


The start of the problem

I started work on the save-game compatibility on Tuesday, optimistically thinking that it would take two full days to implement. While saving maps and items was simple enough, I ran into a problem when I was implementing saves for character's bodies.

Put simply, only the basic transformations have been added into the game so far, and as I was writing the framework to save bodies, I realised that, once I added the planned transformations, I'd have to come back and rewrite a lot of the code later on. While this would be achievable, it would effectively make all the work I was planing on doing for body-saves to become obsolete in the very-near future.

Realising this, and wanting to cut out the work of having to come back and rewrite everything later on, I then made the big mistake of deciding to 'quickly implement' the framework for all of the planned transformations.


Things break, badly

Optimistic, Tuesday-Innoxia went; "This will take all of today, but I'll still have three days in which to finish the save-compatibility work and add in the cowgirl position, along with some other minor things I have to finish".

By the end of Wednesday, I'd realised what a huge mistake I'd made. The transformation and body part code turned out to be an ancient, forgotten mess that I'd written when I first started creating Liltih's Throne over a year ago (scroll through the GameCharacter class on github and you'll understand how bad it is). The amount of errors that I ended up creating while 'fixing' this code (to enable me to add the planned transformations) quickly climbed to over 400.

At this point I was still (foolishly, and yet-again over-optimistically) convinced that I could fix things in time for Friday.


Panic

I woke up on Thursday convinced that I could get the reworked transformation code finished by the end of the day.

As midnight struck, and the amount of errors in the code was steadily hovering at about 300, I finally started to understand that I had a problem. I should have realised on Tuesday evening that this was a task that would take at least a week to implement, but instead I only started to realise this with less than 24 hours until the release.

Panicking, I made the post that you see before this one; the 'one-day delay' post. Now, on Friday evening (as I'm writing this post), I realise that I should have stopped, taken some time to really think about how long this mess will take to fix, then made a more accurate post instead.


The current state of the code

Half of the transformation code has been reworked and fixed, but the other half is still all errors. I'm working as hard as I can to get this fixed, but it's not going to be ready for tomorrow. Realistically, it will take another 4 days to fix, so I'm going to have to delay tomorrow's release until next week.

I'm really, really sorry that I'm not able to put out a release this week, but the game will not compile into a runnable version until I've fixed this mess. I promise that this won't happen again, and if I ever need to do a big rework (which I shouldn't, this was the last big thing I had left to fix in the engine), I'll start it in a separate fork on github so that I'm still able to put out a public release that week.

So, as a result of all this, the release is delayed until: Friday 25th August

I'm really sorry. ;_;