Upgrading to Lion hasn’t been good for the Mac App Store…

So this is the “worlds most advanced operating system” is it?

Screen Shot 2011-08-01 at 15.51.38

I’ve upgraded Windows and never had issues like! Time for a full rebuild I think ;(

Introducing Caffeine Club video

Today, I worked through my first little “intro” video for Caffeine Club. I did it using Apple’s Keynote and iMovie applications. Took about four hours all in all. I got the inspiration from the GiveABrief introduction video (an app that never made it to the App Store!) and some music from the Penguin Cafe Orchestra that I heard on Master Chef last week rounded it off.

You can check it out on YouTube here – http://youtu.be/jG4KKkuABfM?hd=1

Starting game development for the iOS platform

This is the first post in my “Developing a game for the iOS and Windows Phone 7 Platforms at the same time” series. Yes, I am trying to think of a catchier name. Anyway, let me get on with it. This post will cover, as the title suggests, getting ready for developing a game on the iOS platform. At the end, you’ll have the basic Cocos2d game up and running.

Getting the tools

Before you can begin writing any code, it’s necessary to get your hands on the development SDK. Apple’s IDE is called XCode 4 and this include the iPhone SDK. There are two ways to get XCode 4.

  • If you are a member of the iOS Developer Program, you can download XCode 4 for free. Obviously, this isn’t really free since you have to pay the $99/£69 membership fee. However, if you’re serious about developing for the iOS platform, this is money well spent. You’ll need to join this to test your apps on a real device and to publish it. I would like to point out this is an annual membership, so you’ll have to cough up the money each year.
  • If you’re not willing to spend so much dough up front, that’s okay too. XCode is available to download from the Mac App Store for the small sum of $4.99/£2.99. You’ll need to join the afore mentioned iOS Developer Program in order to publish your app, so you’ll be paying a little more overall. As I mentioned, not joining the Developer program means you can’t run your app on a device, so you’ll be limited to the simulator. This will become important when it comes to testing the real world performance of your game.

I have XCode 4. Now what?

After downloading it (it’s a whopping 4GB) and installed it, you’ll need to get your hands on the Cocos2d framework. As I discussed in my initial post, this is a game development framework, that includes a powerful physics engine called Box2d. There are two downloads to make. The first is the framework itself. I’m using the 1.0.0 Beta version. You can then download XCode 4 templates. The installation of these adds some special project templates to XCode and this helps speed up development by giving you a simple, pre-canned game.

All done? Comfortable? Let’s begin!

First, fire up XCode 4. You’ll need to use Spotlight to find it, but keep in the dock after it launches. On a fresh installation, you won’t have any “Recent” projects.

XCode Welcome Screen

Select “Create a new XCode project” from the “New Project” dialog, select the cocos2d category from the iOS list on the left hand side. You should see the list of possible templates. Since I’m going to use Box2D, select that one and hit “Next”

Select project type

Next you’ll be asked to enter the name of the App and the “Company Identifier”. For this, I just use my name, so enter yours here. I’m also calling the game “Bouncy”. Don’t worry about this right now as it doesn’t have to be the actual name of your app when you come to publish it. The “Bundle Identifier” value is made up of this name plus your company name and you’ll need this later on so you can put your app onto a real device and eventually publish your app.

Enter name and bundle information

Next you need to choose where to save the XCode project files. Choose a location that’s suitable. I typically create a folder called Development under my home account and put my project there. This way there are in one place. XCode should then present you with the created project, all populated with the necessary files.

Project created and ready to go!

Use the “Run” button or CMD-R to execute the project. XCode will start compiling the files, which can take a few seconds depending on your machine. It will then launch the iPhone Simulator and you should see something like this after the splash screen disappears. As it says, tap the screen a few times using the mouse pointer.

IPhoneLaunch1
IPhoneLaunch2

Done!

Well done! You should now have a working iPhone game, albeit a simple, demo one. The steps in this post have essentially setup XCode and a basic game shell that we can build our actual game upon. In the next few posts, we’ll look at creating a world that has some basic physics and populating that world with some sprites and finally creating a level that is playable.

Ordering an iPad 2 – Getting up early was a waste of time!!

I set my alarm last night for ten minutes to one in the A.M. so that I could be sure to get an iPad 2 ordered. Sure enough, I got up, opened the laptop and went straight for the online UK Apple Store. My twitter client flashed me some updates and I found out that the Apple Store had been taking orders since half past midnight! Typical Apple.

I picked out the black 32GB model I was asked to order and added it to my cart. All seemed to be okay. The site was a little slow, but I put that down the fact there were probably thousands of other crazy people trying to place an order. As soon as I hit “Place Order”, my excitement was replaced with disappointment.

AppleFail1

I started the process again by going back to my basket and got presented with this:

AppleFail2

For the next thirty minutes, I was presented with the same error screens over again. I finally gave up, turned the light off and went to sleep. This morning at seven A.M. I successfully ordered one. No change in shipping time or anything 😉

The worst part of all this: I was ordering the iPad 2 for somebody else! Anyone else try to pre-order this morning and #Fail??

Developing a game for both iPhone and Windows Phone 7

Since completing my first iPhone app and having it published on the AppStore, I’ve been held by the idea that I should write an app for the Windows Phone 7. Since this is a small market at the moment, it’s an ideal time as getting noticed is more likely.

With this in mind, I’ve decided to write a small game. One that might make me some cold hard currency. I came up with an idea for the game whilst out for run. It’s pretty simple and whilst it won’t win me any awards, it should be simple enough to write. To makes things even more interesting, I’m going to write the game for both the Windows Phone 7 XNA platform and the iOS platform. I should be able to write the code in parts, making sure each platform functions correctly as I go. Phew.

Platform Differences

These two platforms have significant differences, but some similarities too. Aside from the obvious ones, like manufacturer, the differences are mainly superficial. Both have a very narrow hardware range. The iPhone has only four models and their specs are predictable. The WP7 has many more models, but they base specification for all these devices is the same. This makes the experience predictible on both platforms. Since the iPhone has been around much longer, older models of the hardware get taken out of the equation.

Development Differences

When it comes to developing on these platforms there are some differences too. Thankfully, writing code is writing code, so once the basic components of an application are understood, the differences are really down to IDE, API and programming language. Whilst developing Caffeine Club, I’ve become quite adept at switching from Objective-C to C# so this won’t worry me too much.

iOS Development

Development on iOS is done, as mentioned, in Objective-C and C++. For the purposes of game development, the Framework of choice is Cocos2d. This is an external framework as there are no dedicated game related frameworks in the iOS SDK. The recently launched Xcode 4 is Apple’s IDE and whilst it’s very powerful, I’ve yet to see it match Microsoft’s offering. I think I need more keyboard shortcuts 😉

For physics, the Cocos2d framework comes bundled with two physics engines – Box2D and Chipmunk. The former is a C++ library and if offers some very powerful simulation features. Chipmunk is an Objective-C library and whilst very comprehensive, it’s not as powerful as Box2D. Whilst the C++ syntax can be a little scary, I’m going to go with Box2D.

Windows Phone 7 Development

Unlike iOS, WP7’s SDK includes a technology called XNA. This framework is the game development platform for both the XBox 360 and the Windows Phone 7. It can also be used on any .Net platform. It’s effectively a framework designed and build for the purpose of writing games. This makes it easier to get your game “off the ground” as it were. Visual Studio 2010 is the IDE I will be using. C# is the language of choice too.

In terms of Physics engines for WP7, the Farseer Framework is what I will be using. This is a very robust engine and offers a very easy programming model.

Common Bits

I’m going to try a tool called Tiled for developing my levels. This is a tile based level generator, that is compatible with both Box2D and Farseer (the former I’ve tested, the latter I haven’t). This will mean that any levels I build, should be compatible with both platforms.

As for audio, I’m clueless. I’d imagine this will be MP3, but I’ll figure that out at the end. Cocos2d does include an Audio specific framework and XNA also has an API for audio, so it shouldn’t be too difficult. Well, less difficult that getting the sounds in the first place!

Source Control

For this I’m going to use Git. I would have preferred to use Perforce, but XCode 4 has dropped native support for Perforce and added native support for Git. I need to get an add-in for Visual Studio 2010, but I’m sure there is a compatible one.

I’ll be hosting my source code in the “cloud” somewhere. I’m testing some vendors at the moment to ensure it all works.

Wish me luck

Finally, please wish me luck. This is a totally bonkers I’m committing to, but it will be one hell-of-a learning experience if nothing else. I’m still trying to figure out how to structure my posts and whether I’ll alternate between iOS and WP7 or whether I’ll post the code side-by-side. I’ll do a few posts and find out.

Hopefully, somebody will find this informative.

Is my iPhone a 64GB model?

I just got my iPhone replaced as the home button had become somewhat of a nightmare as it only worked about 50% of the time! The friendly people at the Apple Store on Regent’s Street replaced it without issue.

When I got home, I plugged it into my PC and Windows told me me there was quite a lot of space available, with a total capacity of 55GB. But when I look at the iPhone settings, it tells me a different story.

imageIMG_0313

Is it possible that my phone actually has 64GB in storage, but that iOS is only giving me 32GB?

No multi-touch gestures on my iPad after updating to 4.3 ;(

Disappointing to say the least. I installed the beta version of iOS 4.3 on my iPad this morning hoping to try out the new multi-touch app switching, but it seems I’m not going to be that lucky.

Whilst the setting of my devices have been updated correctly, the switch for multi-touch just isn’t there! The orientation option has been added so that’s something at least.

image

However, I’m expecting a multi-touch switch too, which is absent. Anyone got any idea why I cannot see this switch?

** UPDATE **

I’ve managed to get this working! I enabled “Development Mode” on my iPad using XCode’s organiser. I now have the full multi-touch gesture support!

image

I must admit, it’s pretty slick!

My first iPhone application has just been approved!

After finally getting what I consider a “good idea” back in mid August, the four months work to turn that idea into a working application hit a major milestone today as my iPhone application was approved by Apple! I cannot express in works how warm and fuzzy the words “Ready For Sale” make me feel.

My iPhone app, Caffeine Club, is a companion to the website that I am also working on, www.caffeineclub.net.

Since the web site is still under construction (it’s live, but a little rough around the edges) the iPhone app isn’t actually available for download just yet. I’m hoping that with a clear weekend ahead, I’ll be able to whip the website into shape. If anyone wanted to take a look I’d appreciate any feedback.

With version 1.0 in the app store, I’m already thinking towards version 2.0, but I want to see how the idea takes with the general public before I invest any more of my spare time in improving it.

Multi Monitor setup on my MacBook Pro

This has been a long time in the making, but on my third attempt, I’m pleased to say that I’ve finally gotten my two Dell 24” screens working with my MacBook Pro. There is only one small issue with my setup, which I will come back to, but otherwise I’m chuffed with myself!

Ever since I purchased a second 24” screen for my Alienware PC, I’ve been struggling to get the same setup working with my my first MacBook Pro. The previous versions of the MBP all came with two DVI ports for easy multi-monitoring. I think the original need of two ports was to drive Apple’s monster 30” display, which had a resolution greater than one DVI cable could carry.

When Apple released the new unibody MBPs in 2008, we lost the DVI port and got a Mini-Display port instead. This could be used with DVI and VGA and even HDMI I believe. But you could only connect one monitor to the adapter. Which you had to actually buy separately!

A few months back I picked up another Dell 24” 2400WP Monitor from eBay for a song. These monitors are no longer available from Dell, which is a pity as they are fantastic. With a 1920×1200 resolution, adjustable height/orientation and five input sources, they are an excellent monitor. The original one I’ve had for about five years without issue. I’ve got both of these montiors hooked up to my Alienware PC and I enjoy a desktop of 3800×1280, making development on Visual Studio a joy to do.

With my PC playing nicely with the latest addition to my tech family I thought it was time for the MacBook Pro to get a little piece of the 3840×1200 action. My first attempt was Apple’s own Dual-Link DVI connector, an expensive purchase, but one that proved useless. Whilst it does have two DVI connectors, it still only acts as one display.

For my next temp I got a little bit more advanced with a purchase of a Matrox Dual Head2Go. This did work out of the box with little setup, but I quickly discovered that it was limited to a resolution of 1600×1200 (or thereabouts). If I wasn’t dealing with HD resolutions, this would have been sufficient. A little expensive, but it was a good piece of kit.

After returning that to Amazon I gave up on the idea. A couple of weeks later and I found myself doing a lot of iPhone development work and the idea was rekindled. A few minutes Binging and I happened upon the WinStar USB 2.0, a solution that uses your USB port to drive a monitor. It promised very high resolutions so I placed an order on Amazon.

Upon arrival I downloaded the drivers for OS X, installed, rebooted and Voila! I had my second monitor running at 1920×1200!

web

The only issue I have at this point is that I cannot seem to keep the lid closed on my MBP whilst using the two monitors. This means I do have three screens available, but my desk is a little cluttered. Not a bad complaint though…