Archive for category Mobile Development

Magic Eight Ball with the Raphaël JavaScript Library (1.5.2)

Wrigley’s Magic Weight Ball is my first project using the Raphaël JavaScript Library and it just went live. I used Raphaël JS version 1.5.2 which you can download from GitHub. The project requirements came through as only being an iPad version that responded to a shake event. Getting to use a new technology for a front-end project where you only have to support one resolution and one browser is an excellent opportunity to try new things. I knew in the back of my head that they would want a non-shakeable static version as well but they just didn’t ask for it yet. Internet Explorer still came into consideration when I was evaluating technology solutions because I was certain it would come up eventually.

When I saw the Nissan Leaf site I was blown away by the heavy JavaScript animations being used. It really reminded me of the early Flash animations and sites in a way. The Hacker News submission I saw the site from pointed out that the animations were being handled by the Raphaël JavaScript Library. This was still fresh in my mind when I got this project so I loaded up the Raphaël demos pages in a ever browser I test on, IE6-9, Safari, Firefox and Chrome and they all worked! This was the library for this project.

I finished up the iPad version of the site http://content.theknot.com/sitelets/magic-weight-ball/ipad which requires iOS 4.2 or higher and was pretty happy with the results. It responds to a full shake event to give you another tip, the tip will bob lightly in the water when moved a little bit and the tip orients to the iPad. When the tip is touched it provides a little modal with more details. The site even supports landscape and portrait viewing.

About half way through developing the iPad version the email I was expecting arrived. “Oh no!” they said, “We need a static non-shakable version for desktop users to visit.” I was already prepared though. When I though about a desktop version I first defaulted to Flash but I wanted to give Raphaël a try first. With a IE6 PNG alpha transparency fix and a small work around for IE to get the Raphaël image src it was up and running on the desktop.

You can visit http://content.theknot.com/sitelets/magic-weight-ball/ to see the result and if you happen to hit the page in an iPad you will get a slightly modified version that still responds to the shake events, always giving the best experience possible.

The weight ball interface itself is a series of 3 layered PNG images. The top most image is a 24bit eight ball and the rest of the tips, triangles and back black images are all 8bit PNG images with the a properly picked matte color. The total site size was reduced as much as possible and the designers loved the look. I reduced the number of colors where ever possible and used a pattern dither, it really seemed to look the best even though it bumped up the file size a bit.

For this animation interface the Raphaël JavaScript Library was a perfect fit and I was able to provide a cross platform and cross browser experience that I was very proud of.

, , ,

1 Comment

Three or More: Monster Match – My first iOS App Store game was approved

My first game, Three or More: Monster Match, was approved for sale on the App Store last night! It’s been a fun time since I started learning Objective-C in August to sending off my game for approval on October 5th. At one point I even considered stopping development and shifting gears into a more familiar language when Apple removed language restrictions on compiled native Flash apps not too long ago.

All development was done in Objective-C in the XCode IDE using the Cocos2d for iPhone framework which was very easy to understand and use. Coming from other languages I was in for a big shock when I had to worry about memory management and actually optimize for my iPod Touch development device I picked up. Getting used to finding my way around Mac OS X was fun as well.

All in all it felt very rewarding to stick with Objective-C as my development language and getting approved last night was an amazing feeling. From sitting down with Learning iPhone Programming: From Xcode to App Store and iPhone Game Development: Developing 2D & 3D games in Objective-C in August to now it feels like it has been a lot longer than it was. Right after I submitted I was already working on new versions of the game.

I was very nervous that I submitted a Halloween themed game for October on October 5th but thankfully it was approved by the 14th! Only 9 stress filled days of waiting, pretty low will all the horror stories I hear about getting approved.

Go get the game and let me know what you think!


, , , , , , ,

No Comments

Apple removes Flash CS5 export restrictions, should I stop learning Objective-C?

UPDATE: It’s been over a year since I considered stopping my study of Objective-C and I can gladly say that I made the right choice in continuing to learn Objective-C and native app development. With Adobe’s recent moves discontinuing Mobile and TV Flash development and moving the Flex SDK to ‘an established open source foundation’ it is clear they are no longer interested in investing in the technology and I’m glad I started expanding now instead of waiting for tomorrow. This is one of those rare times in life I’ll get to look back and pat say that I actually made a great choice for my future.

I’ve been a Flash developer for many years now. I was excited about the opportunity to create native apps for the iOS environment when it was first announced but life was too hecktic at the time to start learning Objective-C. A little while later Adobe sources announced that the next version of the Flash IDE, CS5, would be able to export compiled iOS apps! I was thrilled to hear that I could put all my existing ActionScript knowledge into instant use on the iOS devices and I decided again to work on my other projects and learning C# and wait for Adobe to release CS5. Then the 3.3.1 change happened at the same time that Flash CS5 was release, Apple doesn’t want Adobe’s knock off Objective-C apps ported from Flash. I’m at a complete loss, I waited for the dust to settle and it seemed Apple was completely resolved to keep Adobe out of it’s devices.

It was time to learn Objective-C if I was ever going to get into iOS development. I hit the books and started learning all the fun stuff about C and all the strange things I was going to have to work around that I had gotten used to having in ActionScript 3.

Today Apple makes a new statement back tracking on the 3.3.1 sections of the developer license (http://www.apple.com/pr/library/2010/09/09statement.html) and now Flash CS5 compiled apps are allowed again!

Wait what? I thought Apple was this stone pillar of decision, Steve Jobs even had a post Thoughts on Flash ripping it apart and now it’s OK to put Flash apps on their devices essentially? I’m more than a little frustrated by this. On one hand I’ve started to develop a new skill set in developing mobile applications for the iOS devices and on the other I have a long history of ActionScript knowledge I could use to make iOS apps even faster.

I’m already 70% done with my first iOS app since starting out and now I wonder if I even need to continue to nurture my Objective-C learning because I can just recompile my Flash games and push them right to the store.

I was so mad when Apple first made the decision to reject Flash apps, then I accepted it and started learning Objective-C, now I think I’m kind of upset that they backtracked such a short time but still long enough for me to get neck deep in Objective-C books.

I think I have to finish this first game in Objective-C but after that is it worth the work to continue learning that language now that any language can be compiled down to Objective-C and then approved?

, , , , , , , ,

3 Comments