Monday, June 23, 2014

On Playtesting

One of the best parts about developing a mobile game is how easy it is to get people to play test.  I was able to get an incredible amount of helpful feedback by making everyone I knew (and any new acquaintances) try out the first few levels.  It was especially interesting to watch people who claimed they "don't really play games" experience my game.

Also, "Excuse me, would you mind testing out the game I'm making?" turns out to be a pretty good pick-up line =).

But while playtesting can be incredibly enlightening, it can also be extremely frustrating.  When I first came up with the idea for my mechanic, I thought it would be really intuitive and easy to understand.  Boy was I wrong.  Most people would eventually get it, but it took much longer and was a more frustrating process than I intended it to be.  And of course no one reads the instructions that pop up (but I wasn't expecting them to).  So I've re-wrote my beginning levels several times, each iteration adding more and more gui, hints, and signs to be as obvious as possible while still allowing the player some agency. 

Tutorial levels are always important in games, but they're especially important for mobile games.  The average mobile gamer has a very short attention span, and they will delete your game without a second thought if they are even slightly confused.  And free mobile games have the worst retention rates since the user has zero investment in the game.  So if you want to be successful on mobile, you need to hook the player and hook them quickly.  Then, once they're eased into the game mechanic, you can give the line a tug and set the hook with a challenge that will keep them scratching their head and coming back for more. 
 


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!

Monday, April 14, 2014

The old is new again

So far so good with my new self-scheduling.  My buddy was more than happy to take over my "yell at myself" role.  But I think what may have been most helpful was just creating a calendar for myself with mile-stones.  It feels a little more manageable than a long list of Trello tasks and it will be much more apparent when I'm slipping.

On a different note, c++ has come a long way since I used it in college.  I'm currently re-writing my level solver with it to hopefully get the performance I need to check optimal level solutions (due date Wed).  Since my level solver relies on a large hash table of level states, I was doing a bit of research on hash functions.  And I was surprised to learn that there's still improvements being made on this very basic area of computer science: non-cryptographic hashing.  I eventually settled on something called SpookyHash (http://burtleburtle.net/bob/hash/spooky.html).  No idea how it works under the hood, but apparently it's reeeeaaally fast.

Another thing I had to re-learn is memory management.  C# and lua both use garbage collection so the developer doesn't need to worry too much about allocating deleting objects.  Even Objective C has auto reference counting now (ARC) which makes things a lot simpler.  Well apparently the latest version of C++ has something called a "smart pointer."  It frees the developer from worrying about deleting objects the same way objective c does it: through reference counting.  I think the latest c++ even has lambda expressions.  Suddenly it's not looking like such a dated language anymore.

Wednesday, April 9, 2014

On working for yourself

I've got the best and worst boss in the world: myself.  He lets me work on the things I really want to, but he's far too forgiving when I don't get my work done on time.  A good example is this blog.  I was planning to use this to keep myself motivated and on track.  A sort of self-scrum and to record mile-stones etc.  But then a month went by without me writing anything.  And my boss said "that's fine, you're busy, you can do that later."  And then another month went by.  And another.  And now it's been almost four months since my last post.  I should have fired me by now.

It's not just the blog either.  I've made a lot of progress with Too Many Snakes, but I'm much further behind than I'd hoped to be at this point.  My new goal is to be ready to launch by the end of May, but even that deadline is looking iffy.  I think I need to accept the fact that I'm a much too lenient boss and find other, external ways to keep myself on track.

One thing that definitely helps is Focus applicaton (http://www.heyfocus.com/).  It blocks websites like reddit and hackernews for a set amount of time to reduce distractions.  But I've also been thinking of ways to structure myself better.  My latest idea is to try forcing one of my friends to be my project manager.  He won't need to actually care about what I'm doing.  I'm just going to give him my schedule and then ever other day we'll have a short chat about where I am with things.  I'm hoping that by simply talking to someone besides myself about my progress, it will create more incentive to keep on task.  Maybe I'll post my schedule on this blog as well to double that incentive. 

To start off, the first thing I'm putting on that schedule is to report back on this blog about how the new system is working.  Before the end of the month.  Or else I'm fired.

Saturday, January 18, 2014

So much for a friendly hint system

Most puzzle games on the app store these days have a hint system.  It makes sense.  It's an easy way to make a little bit more money and allow frustrated players to move past a level they are having issues with.  The typical setup is that the player is given a few hints for free, and when they run out, they can pay for more. 

Ideally I wanted my hint system to be able to look at the current state the player is in a immediately figure out what the next best move is to complete the level.  This meant that I needed to teach the game to play itself.  Which is easier said than done.

I attacked this issue through the use of a state machine.  Basically having the computer try every possible move (while making sure not to get in a loop) until the level is solved.  How this works is first every game state that is only a single move away is recorded on a queue.  Then, one by one, the states are popped from the queue and every new state that is a move away from that popped state is pushed onto the back of the queue.  This is repeated until either a solution is found or we run out of new states to explore (every state has a signature which is kept track of so that we don't get repeats).

While I did finally get this algorithm functional, it takes waaaaay too long.  The number of possible states from a simple 5x5 level turned out to be a lot larger than I anticipated.  I'm talking a possible over 100,000 states for something that can be completed in three moves.  So it looks like an imidiate hint system isn't really an option.  What I'll have to do is pre-calculate the optimal path for each level beforehand and if the player asks for a hint, I'll start them from the beginning and show them that path.  Not as friendly, but I don't think there are any other options. 

Now if the system would just finish figuring out the 9 move puzzle I started it on since before I started writing this...

Monday, January 6, 2014

Holiday holdup

As always, work tends to slow down around the holidays.  I was hoping to be a bit further along by now.  But I did recently reach a new milestone: my level creator is working.  I can now design and immediately test new levels.  And it's been kinda fun so far.  Maybe 75 levels won't take as long as I was dreading.
In other news, I now have an official logo for my company:

 I couldn't wait to put together a mug:
http://www.zazzle.com/whalefood_games_mug-168338681682838778
and shirt:
http://www.zazzle.com/whalefood_games_t_shirt-235557294958531651