The Sound of Music

I have now added most of the sound effects and it sounds really good. The sound effects are used for some of the following:

  • When a new level is loaded and comes into view
  • When the player taps on the game tile
  • When the game tile finishes turning over after the player taps on it
  • When the game tiles turn back over
  • When the player gets a match
  • When the player uses a specialty tile(unique sound effect for each one)
  • Swiping between screens
  • When time is running low

Still have some more to add but mainly just tweaking the code as needed to make sure the timing of the sound effects are spot on.

Rack Your Brain – Latest Build/Update

Screenshot 2013.03.02 23.32.18So this is the latest! I now seem to have the code to handle all of the swiping working correctly. I had some issues that I had not planned for, concerning the animation of the swipe. For instance, as you know, you can have a game tile whose match is on another screen. Let’s say you know exactly where that match is. You tap on the first game tile then immediately swipe to the next screen. A couple of things that I am trying to keep up with here.

  • What screen am I swiping from?
  • What screen is going to animate in?
  • The identification of the 1st game tile that was selected (so that I can check for the match) when the 2nd game tile is selected.
  • Given the screen that I know is animating in, what is the traversal information for that screen? I need this so that i can update the arrows appropriately and I can set up checks ahead of time before the next swipe.

I don’t want to get too too technical but the crux of a few of my problems centered around not updating the model and/or view at the right times during all the animations involved here. You have to remember that in a MVC design, the view itself knows absolutely nothing about the contents of its game tiles – it gets that information from the model every time we swipe to the new screen and then its job is to display that content. The content in this case, is what’s under each game tile.

However, both model and view have to know what game tiles have been selected on that screen (the model knows which ones have been selected on multiple screens if applicable). First, the view will need perform custom animations, that I will be writing, on a game tile or tiles if there is a match. (which will including removing that game tile from the view). Second, the model needs to update itself if there is a match (or not) so that it can correctly send the view controller the appropriate contents when you swipe back to a screen that has had matches in the past (or anything other changes that have occurred during a level).

In code, I handle some of this functionality using the NSNotificationCenter, which is one of  most powerful classes in Objective-C that I absolutely love. In any event, what was happening, is that some of the notifications sent to the model (and/or view controller) didn’t sync up appropriately with the swipe animation (which also posts a notification) and I was getting some bugs related to some of the bullet points above.

To solve the issue, I had to slightly modify the model code receiving these notifications, along with using the CAAnimation delegate methods animationDidStart and animationDidStop:finished: so that I could fine tune when I wanted to update both the model and view controller during a swipe animation (i.e. when the notification of a swipe was posted for all relevant recipients).

Speaking of animations, looks like the next thing to do is to write those custom animations mentioned earlier, for things like selecting a matching set. This is going to be super fun. In addition, one of the low lying fruits that I need to pick off is to add sound effects for a variety of events in the game. More on that soon.

Finally, this might be the last of an in-game screenshot that I am going to post until I get REALLY close to submitting this to the app store. Lots of things about the app are finally coming together, including in-game images and I don’t want to give too many things away too soon. :)

MapKit Showcase

So I am now on this iOS project at work, that is centered around MapKit framework.  When the app starts you have a split view controller (this app is iPad only). On the left you have a table view and on the right is a map view. Each table view cell represents the location of one of many different types of custom annotations.  When you tap on a certain table view cell, (the mapview pans to the coordinate location of the annotation and a detailed view (a .xib file) is shown to show certain attributes about this annotation. While I cannot mention specifically the type of annotations are available, they are diverse.

What they want to do is have the capability to draw polygons around certain types of annotations and edit the polygons as needed. That’s where I come in. I have worked on iOS projects before using the MapKit framework but not specifically drawing shapes on the map, so this was a fun part of the framework to learn (I obviously don’t know every single method of the entire framework but I have a good feel for lots of it). Anyway, I started working on getting this functionality to work outside of the current project, just as a standalone test app to see how much I could get working/what I could get working before worrying about any integration into the current code base.

The way my code works, is that when you are in drawing mode, every single tap (recognizer) draws a MKCircle overlay at that coordinate and any subsequent tap draws a MKPolyLine overlay so that the user can clearly see what the polygon (MKPolygon) is going to look like. Obviously, with every tap, I update the MKPolyLine overlay accordingly. screenshot below:
Screenshot 2013.05.18 22.58.34Screenshot 2013.05.18 22.59.05Screenshot 2013.05.18 23.03.06When you are finished drawing the polygon you can tap “Done” and voila!… a new polygon has been created (MKPolygon overlay, yellow fill color, alpha of 0.4).

Screenshot 2013.05.18 23.08.33Below is a screenshot of two more polygons that I have added:

Screenshot 2013.05.18 23.16.02

If you expand the last image you will notice that some of the MKPolyLines appear to be jagged. I spent some time searching around to see what this was about and haven’t found an answer yet. If you know, please send me an e-mail or comment. Also, another thing that I have noticed, is that each time I add a new overlay to the map, the other overlays display some sort of “blinking” behavior. I wasn’t sure what was going on here but I did find a few questions about it in the apple dev forums and there seems to be an overlay bug with no solution as of yet. People seem to be claiming that it’s worse in iOS 6 than it was in iOS 5. Just a heads up.

To find out more of what I have accomplished so far, please head on over to the iOS page!

Setback

The project at work that I have been on at my real job has started to pick up beyond a normal work week. We’ve been at it for a couple of weeks now and looks like it will be this way until around the end of this month or the first week of April. This, of course, means that the progress on my app, will considerably slow down or be non-existent. When you work extra hours and have other ‘outside of work personal life stuff’ there isn’t much room to sit in front of a bunch of pixels much less be productive…..unless I want to become a zombie and burn myself out, which would not be the smart thing to do.

I will post back with, hopefully another update, after things get back to normal.

Rack Your Brain – Tornado!

This past week has been very interesting. In case you didn’t see the news, we got hit by a major tornado last week (Feb 10th). I just got internet back after a week and was without power for 3 days. The tornado came within 0.3 miles of my house and it was about 1/2 a mile wide! It doesn’t look like anyone was killed and only a few people were injured.

Anyway, I’ve been working heavily on the code that relates to swiping the screen. I’ve had a few glitches and bugs along the way but got most of those solved I think. Just trying to make sure that I get the sequence of events in the right order and that they are timed with the transition animations at the point the user swipes. Also I have been doing some major testing to make sure that when I swipe, I am getting the right content back for the screen that is animating into view. I’ll go ahead and share with you a picture I took of one of my whiteboard sessions. Enjoy!

2013-02-18 13.39.41