Thursday, May 29, 2014

On the dissappearance of time

Ugh.  How is it almost June?  Wasn't it April, like, yesterday?
As the tone here has probably given away already, this month has not gone as smoothly as the previous month.  I'll give myself that getting the solution-shower working was a much bigger task than I had anticipated, but I still feel like I've been slacking.

At some point I'll make a detailed post about my solution finding algorithm, but one thing that really tripped me up this month is that I had a bug in my algorithm that took me forever to track down.  I had actually been modifying the solution finder to get it to print out a more detailed, step by step solution for my hint system when I ran into it.  So of course I assumed it was an issue with my new modifications.  I swear I must have simply stared at my code for hours, hoping it would suddenly relent and reveal its hidden flaw to me.  This can be one of the most frustrating things about programming, and it really took a bite out of my motivation.

When I did finally track down the bug (which was causing my program to not always find the optimal solution) it turned out to be an issue in the old part of the code that hadn't changed!  I just hadn't caught it before.  And worse, it was one of reasons my c++ solution was running so fast.  Fixing the bug suddenly made my solution finder take forever and gobble up memory like it was doing in Lua.  Luckily it did give me an idea for optimizing my algorithm so I was eventually able to speed it back up again.  But by then, May was almost completely gone.

So now it's June for all intents and purposes and a I still have 20 more levels to create.  But things are moving again.  If I can get these done quickly, then I might still be able to wrap everything up for a release in July.


Friday, May 2, 2014

First big deadline: hit!

Yesterday I was able to release version 0.4 of Too Many Snakes to my beta testers.  Right on schedule. Being done by June is looking like a real possibility.

My C++ level solver worked beautifully.  What used to take hours in lua now takes seconds.  It's especially satisfying when the solver comes up with a better solution than I could find.  I essentially made a program that's smarter than me.

I was also able to finish designing 30 additional levels and tighten up the controls.  I changed a couple of things that should make it a lot less easy to make mistakes.  First of all, I'm now checking the actual sprite being touched rather than just the grid space that the user puts their finger down on.  I noticed a lot of people had been having issues when they tried to drag a character by the top of its head, which can overlap into the space above.

I also fixed my bump mechanic.  Rather than immediately bouncing characters when the user pulls them into an occupied space, I made them stick until they're pulled over half way into the occupied space.  I also took a note from apple's book and made the character have a 1:1/2 relation with the pointer index when being pulled into the blocked space so it looks like that space is giving greater resistance as the character is being squeezed into it.

So now, code-wise, there are only two big tasks left: create the final 20 levels and design my hint system.

By the way, if any of you reading this has an iDevice and would like to help beta test, you can sign up here: http://tflig.ht/1dKv0ew
The more testers the better!