Wednesday, March 11, 2009

iPhone Journal (asc(R)-65)


Today, I planned to finish the undo functionality, add instructions, and to reduce memory leaks. I was able to accomplish all this and more. I finished the undo button much more rapidly than I had hoped and reduced some of the memory problems at the same time. I then created the instructions view. I soon discovered that the instructions cannot all be displayed on the same page, and so I modified the view controller for the instructions to handle multiple pages. During this process, I discovered a much simpler way to add and remove views than I had been using previously. I also fixed a major error present in the game view in regard to promoting a diamond to a mixed "power" piece.
Finally, I met with Mr. Collias in order to discuss final changes. He taught me methods of assessing the usability of a user interface and then provided several suggestions about my project's interface and about the gameplay element.
I followed almost all of these suggestions with minor adjustments and now have the following images to demonstrate my progress:

(note the red X on the piece surrounded by diamonds and the dot in the center of the X indicating the final destination of the jump.)

Mr. Collias noted that the score display was confusing and that the execute move button was unclear. Also, it was previously difficult to determine what pieces were removed by a CINGO move and what the destination of a given move is. All of these problems have now been addressed. Note that I also added a question mark icon to the game view that, when pressed, discloses information about how to use the controls.
Tomorrow, I will attempt to finish the "Change Appearance" and "New Game..." views and to begin working on saving the state of the application on view switch/exit.

Quick Update (11:32):
Just added a picker with some randomly named components.

iPhone Journal 0x10

Today (3/10/09), I managed to implement 90% of the "Undo" functionality of Cingo and to fix all of yesterday's bugs after hours of troubleshooting. I was, however, unable to work on any of the other views.
The special move for which the game is named took the longest time to add undo functionality to because the data size is variable - it is possible to surround more than one piece in a single slide or jump. I was also able to take the undo button beyond my early expectations such that it may be pressed until the game looks like it did at the very start. The only move that still needs to be able to be undone is upgrading a diamond to a mixed piece. This can be accomplished with a simple BOOL value, and I used a similar method for allowing jumps to be undone, so this should be a relatively painless process.
I still need to work on removing several memory leaks (see the spikes in the image below) that were introduced due to some strange allocation problems. Tomorrow, I will begin by finishing the undo button, fill the instructions view with information, and see if I can figure out how to remove the leaks. The latter is probably not very important at the moment because of the small quantity of leaks, and I may leave this for later.
I will then work on the change appearance view and new game view if time permits. After that, all that will be left is saving on view switch/exit and adding some other ways to win than capturing all opponent pieces. Everything seems to be coming together nicely at the moment.

(Note: the final spike is from killing the process, not from a lack of deallocation on program exit)

I would post more images, but the application has not changed in appearance, just functionality, since yesterday.