Sunday, February 26, 2012

2.1.0 is out. What happened to 2.0?

We've released 2.1.0. of Mad Pig Klondike Solitaire on iPhone and iPad.

-Fixed critical bug in 2.0.0. Could not select card back. 

-Game Center Support Added. 

-Now tracks and displays a number of stats, including weekly high, daily high and accumlated high scores. 

-Added Awards with Card Back prizes. 

-Collect and use many fun Card Backs. 

-Post images and text to Twitter. 

-Fixed crash when touching menu button from Help Foundations page. 

-Thanks for playing! Please tell your friends about our game. 


You may notice, we had a critical bug in 2.0.0. This was interesting and scary since it only showed up in the App store. It did not show up when we tested. When we heard of the bug, we were very concerned about how to find a bug that we didn't get. How can I fix a bug I can't recreate? This was also a very bad bug. The players could not recover well from the bug. No card backs were ever awarded to them. 


After a little research on-line, I found a post mentioning the optimization settings for the store and debug were different and these could lead to bugs that only show up in the store. I matched the store optimization settings and did a build. Immediately I was able to reproduce the bug! I quickly fixed it, and sent the update to Apple. I had already added game center support, so we bumped the version up to 2.1.0. 


d

Tuesday, October 25, 2011

Mad Pig Klondike version 1.1 in development. Update 2

Finished working on the next release of Mad Pig Klondike Solitaire.
Added Facebook posting and implemented analytics for the new features.


--- Version 1.1 - Testing Pre-release.

  • Post App Store link, info and player comments to Facebook. You can now tell your friends about Mad Pig Klondike.
  • Post Screenshot of results page to Facebook. You can now post your awesome scores.
  • Bottom corner buttons for Options and New Game only work when touch starts on them. Drag release over them will no longer envoke the buttons.
  • Separated touch areas for New Game and Yes dialog so a quick double tap will not start a new game.
  • Added Game mode to Results Screen. Now your screen shots will show the game type! 

I implemented two buttons for posting to Facebook. One on the menu to post user comment, with App Store link to Mad Pig Klondike Solitaire. The second button is on the end game score results page for posting a screen shot of the results to Facebook. 

I had to implement each type of post differently. 

Facebook Post from the menu:
When the button is touched, it calls a method that first checks for internet reachability. I've used Apple's reachability code here. Any app that doesn't have some testing of internet connection and handling of issues will be rejected by Apple. So any time Klondike tries to connect to the internet, the app checks first. 

If Klondike can reach the internet, it then checks to see if there is a previously saved Facebook session. Klondike saves a session after a successful log in to Facebook. The saving of the session allows SSO (single sign on). I'm using the newer Facebook SDK. With the old one, the user would have to log in each time they post. Not very user friendly. If there is a saved session, Klondike calls a method to post a dialog to Facebook. The dialog will post an icon, app link, description, and any text the user wants to add.

The tricky part is if there isn't a saved session. If there isn't, Klondike sends the user to log in to Facebook and requests permissions to post to the feed. Then the Facebook app returns to Klondike. Originally, I had the post method being called right after the authorization. This caused problems because the post would get called before Facebook was done. The post would fail and sometimes it would cause odd things to happen.  To get around this, I set a flag that a dialog type post needs to be posted. Then when Facebook is done with the login, Facebook calls it's delegate method for didLogin. In didLogin, I check the flag for dialog post and if it's YES, I call the post method. This solved the failed posts and odd behaviors. 

I had to do a similar thing for the other Facebook button. For posting a screen shot, I bring up an Alert dialog to ask the user if they want to post a screen shot to Facebook. This teaches the user what the button does and let's them back out of it if they want. The alert is using a delegate to handle the user selecting YES. If the user selects YES, the corresponding delegate method gets fired off. This method is in my AppDelegate. I couldn't get it to work in my Facebook class.  The method sets a flag for posting a screen shot to YES and calls a method to check reachability and then if the session is valid. Also, the Facebook button on the screen is disabled do the user can't post duplicate images. If the session is valid, it will post an image to the user's feed using a Post request. If the session is not valid, it will send the user to login and asks for permissions to post to the feed. Once again, it will return and call the didLogin method. 

In the didLogin method, I check to see if the post screen shot  flag is YES. If it is, I then call the method that does a screenshot and posts it to Facebook. I call this method with a .2 second delay because if I call it immediately, the screenshot is really messed up. It's a double image, cropped. I'm guessing it didn't have time to draw properly before the method was called. Adding the small delay fixed it. 

For the first time a user posts to Facebook from the menu page, it fails on the first post after the user gives the app permissions. I can't figure out why it fails or how to truly fix it. Instead I try to post on the error/fail and this works. It's a really odd behavior, but only happens the first time. 

Originally, I was able to get the posting of both types to work nicely once a user is logged in and thought everything was working great. Then I tested having the user not logged in and then I tested removing the app from Facebook and basically having the initial experience of the user. The initial experience was rough and had issues. Even though it would only rarely affect the user, we want our user experience to be smooth. Therefore, I had to jump through all the above mentioned coding hoops to get this stuff to work nicely. 

The good news, I'm learning about delegates. The bad, is it took much more time that I had wanted it to and I'm kinda hacking the solution.

Looking to the future, it looks like I might have an easier time when I implement Twitter, due to Apple including a nice library in iOS 5. Hopefully it will be. 



Mad Pig Klondike versino 1.1 in development. Update 1

Working on the next release of Mad Pig Klondike Solitaire.


--- Version 1.1 - In Development

  • Post App Store link, info and player comments to Facebook. You can now tell your firends about Mad Pig Klondike.
  • Post Screenshot of results page to Facebook. You can now post your awesome scores.
  • Bottom corner buttons for Options and New Game only work when touch starts on them. Drag release over them will no longer envoke the buttons.
  • Separated touch areas for New Game and Yes dialog so a quick double tap will not start a new game.
  • Added Game mode to Results Screen. Now your screen shots will show the game type! 
Feel like I have a little better understanding of delegates. Implemented UIAlerts to ask the user before posting an image to Facebook. Also added post completion and error alerts. Locked out the Facebook button after the screen shot is posted so the user can't post duplicate images.

For screen shots, if it needs to check the login or login, Klondike will send the screen shot again after getting a valid login response from Facebook. Previously, if a login was required, it would drop the post and the user would need to click the button again. 

I still need to implement this re-sending capability when sending a standard post from the menu screen when a login check or login is required. 

d


Sunday, October 23, 2011

Mad Pig Klondike version 1.1 in development.

Working on the next release of Mad Pig Klondike Solitaire.


--- Version 1.1 - In Development

  • Post App Store link, info and player comments to Facebook. You can now tell your firends about Mad Pig Klondike.
  • Post Screenshot of results page to Facebook. You can now post your awesome scores.
  • Bottom corner buttons for Options and New Game only work when touch starts on them. Drag release over them will no longer envoke the buttons.
  • Separated touch areas for New Game and Yes dialog so a quick double tap will not start a new game.
Implemented Facebook posting and tweaked some interface items. We'll start testing now. 

The Facebook stuff was pretty challenging. At first I used ShareKit. ShareKit can share with several services. It was pretty easy to implement, but didn't post exactly how I want. The posts with a link couldn't have an image with them. It uses the old Facebook sdk. I decided to try out the newer Facebook sdk. This required me writing a bunch more code, pretty much implementing everything myself. The Facebook  sample app was helpful, but much too complicated. 

I've learned a lot about delegates, but I still feel I don't have a full handle of them. I had trouble getting the delegate methods to be called after the Facebook posts. I was eventually able to get them working. The Facebook stuff isn't perfect yet, but it's working. It seems to have some rough edges during the log in process. Sometimes requiring an extra click on the button. When I'm able to understand more about it, I'll likely want to rewrite the code. 

I wasn't able to get a UIAlertViewDelegate working in a class I made. I've got a workaround for now, but I'll need to figure out how to implement it properly at some point. I'm sure I could get it working in a new project. I'm having trouble getting it to work with the structure of the current project. 

d

Wednesday, October 19, 2011

Mad Pig Klondike is live!!!


It's been a long time coming, but the day has finally arrived!  Our first game, Mad Pig Klondike Solitaire, is available on the App store for the iPhone/iPod (works on the iPad, too).  Go check out Mad Pig Klondike!

Our trailer video is also up on Youtube.

Make sure to tell your friends, family, co-workers, and enemies! (they want to play Solitaire, too)   And "like us" on Facebook to keep up-to-date with us as we add new features, as well as info about upcoming games.

b.

Wednesday, October 5, 2011

Goodbye Steve

Thanks for making our lives better.

We will miss you.

:(

Saturday, October 1, 2011

History, Part 3 - Early tests. Finding our way.

Here I'm going to include some ugly things. Early tests and concept drawings.

Here is the first card test. I scanned a real card and made a vector based version of it using Illustrator. Love the card back, but we can't use it in the game because of copyright.
 
Perhaps someday we'll try to get permission from Kem. By the way, Kem makes the best plastic playing cards. They last a very long time and are flexible. Buy them!

Here are some early table felt tests. They were painted in Photoshop. I quickly realized I didn't have the skill to paint something I'd be happy with so I ended up rendering the table top in 3d to get the final look for our table.






We ended up with something like this


Our final look has shading that goes over the table and the cards. Some people may not notice while playing, but wow, does it look worse when we turn it off. 

Perhaps the pig can hold the table? We are trying to find our design...




Here we were trying to find the look for the table. Perhaps having the pig hold the deck. In the end, it just takes up space, gets in the way and throws the balance off.


Now we've included the first card back design.


You can check out our final results in History, Part 2

Here are some of the awards drawings:




d.