Do Apple not follow their own UI guidelines on useful errors?

Using the iTunes Connect mobile app prompted me with this error (or is it a non error?)! Not very friendly or helpful 😉

20110405-141236.jpg

Please ignore the zero download count. My iPhone app isn’t doing too well!

Advertisement

Starting game development for the Windows Phone 7 Platform

Since I’ve tackled getting up and running on the iOS platform in my previous post in this “Developing a game for the iOS and Windows Phone 7 Platforms at the same time” series, I’m now moving onto getting started with Windows Phone 7 game development. Like the previous post, the aim of this one is to have you up and running with a basic skeleton that we will build upon over the coming weeks.

Getting the tools

Unlike iOS development, the tools for WP7 are free. You still need to pay Microsoft money to have your app published on the app store, but to actually get started, you don’t need to spend anything.

  • Visual Studio 2010 Express for Windows Phone Microsoft have made a special version of their excellent Visual Studio IDE available to download for free. This version doesn’t come with all the tools and features of the commercial versions, but we don’t need anything like that. To make live a little easier, Microsoft has a full package called Windows Phone Developer Tools, which you can download. This contains almost everything you’ll need. It’s a small download that will download and installed the tools.
  • Farseer Physics Engine – The Farseer physics framework will provide us with a powerful physics engine needed to drive our game. Download Farseer Physics Engine 3.3 XNA, the current stable release. Install it once you’ve installed the Windows Phone Developer Tools

I’ve got it all installed

Once you have everything installed, launch Visual Studio and start a new project (File->New->Project). In the New Project dialog, select the Windows Phone Game (4.0) project under the XNA Game Studio 4 Template group. Name the project “Windows Phone 7 Game” and change the location if you wish. I typically keep all my code under a directory called “Development”. It makes things easy to find.

image

You’ll end up with a new Solution and the very basic elements for a Windows Phone 7 Game.

image

Hit F5 to build and run the project. If you see an error dialog popping up, check that the Error List. If it says “Zune software is not launched. Retry after making sure that Zune software is launched.” then ensure that “Windows Phone 7 Emulator” is selected and not “Windows Phone 7 Device”. This setting is in one of the toolbars along the top. This setting controls how the game is executed. We’re using the Simulator tool for now.  If you’ve had to change this, hit F5 again.

image

The WP7 simulator will launch and you’ll be presented with a blue screen. Don’t worry, this is all it is supposed to do right now.

image

Adding some physics

We will now include the Farseer framework into our project and stop there. Once you’ve downloaded the Farseer Physics Engine 3.3 XNA zip file, open it. It will contain a folder Farseer Physics Engine 3.3 XNA. Copy this folder from the zip file and paste it in the same location as your Visual Studio Solution file. In my case, this would be D:DevelopmentWindows Phone 7 Game. By copy the framework here, it lets us keep all our code together. Very important when we add this solution to source control.

Return to Visual Studio, which should still contain your Windows Phone 7 Game solution. If the Solution Explorer, a tree view showing all the projects and files in your solution, is not open within VS, open it using the menu View->Show Solution Explorer. Within the Solution Explorer, right click on the Solution at the very top and choose Add->Existing Project.

An Explorer windows will appear. Simple navigate to where you pasted the “Farseer Physics Engine 3.3 XNA folder”, open it and find a file called “Farseer Physics XNA WP7.csproj”. Select this file and choose Open. It should now load this project into your solution.

Visual Studio might prompt you with Security Warning.  Since we trust this Project, click Okay. In future, Visual Studio might display the same prompt when you open your solution, but just click okay.

image

Now that the project has been added, your Solution Explorer should look like this:

image

Hit F6 to build the solution, or use the menu Build->Build Solution. Everything should compile successfully.

Finally, we will include a reference to Farseer Physics project in our Windows Phone 7 Game. This basically lets one project use the classes and information in another. Right click on the Windows Phone 7 Game project and click Add Reference. Use the Projects Tab in the window that appears.

image

Choose the Farseer Physics XNA WP7 project and hit okay.

Hit F6 to build one final time and, if you wish, you can run the project again. The Simulator should still open with the same blue background since we haven’t really changed anything. However, we have now got a skeleton Windows Phone 7 project with a physics engine that we can build upon!

The next article or two will cover the construction of a physics world within the game. Stay tuned. Same bat time, same bat channel!

My home network needs an upgrade!

After a long wait, I finally got a decent broadband connection and I’m thrilled. Unfortunately, this isn’t the end of the story!

Plusnet are now providing me with a 40MB FTTC based broadband connection and I get a reported connection speed of 38MB when I use www.speedtest.net. An awesome speed really. But there is one issue. I only get this speed when I’m connected to the router via an ethernet cable. As soon as I connect my Macbook Pro to the router’s WiFi, I get a reported 20MB connection, just over half the speed I’m expecting.

And it gets worse. In my apartment, my PC is in a spare bedroom, about as far from the router as possible. WiFi can’t stretch that far, so I’ve been using a Netgear Powerline setup (with a 200MB max connection speed). When I run the speedtest from my PC, I get a miserable 4MB reported connection speed ;( The tools to run tests on my Powerline configuration won’t install on my PC, so I’m unable to see what sort of connection speed I’m getting across the electicity based connection.

Since this lousy speed needs to be addressed, I’ve put my Apple Airport Express in the main room, which offers a 802.11N connection and my laptop is now reporting a satisfying 30-32 MB connection. I’ve also ordered a Devolo Powerline kit and I hope that four years of advancements (I bought my Netgear kit in 2007) will ensure a better connection between the two rooms. If it doesn’t, I’ll have to think about using WiFi extenders or running a very long ethernet cable between the two rooms.

The kit is due to arrive from Amazon tomorrow, so I’ll update this post with the results!

Update

After installing my brand new Devolo dLAN 200 wireless Homeplug kit and I’m pleased to report I’m seeing much improved speeds across the electricity network in my apartment.

The wireless network in the second bedroom is now reporting a 30MB connection, whilst the PC is getting just over 34! This is about what I’d was hoping for so I’m very pleased. In the four years since I purchased the Netgear kit, there have been some impressive performance gains!

The Devolo kit does come with a build-in 802.11N router, so I’ll give that a try in the living room and see what happens. I might even try “extending” the WiFi network.

Another Update

Seems that the WiFi network created by the Devolo plug cannot be extended. At least that is what my Apple Airport Express is saying. I’m not going to spend any time investigating this so I guess I’ll have to solve that another day.

FTTC Finally here–thanks to BT and Plusnet

Well, it’s been a long time coming, but we finally got our Fibre-To-The-Cabinet hooked up yesterday. After some technical issues, chats with Plusnet and two very, very helpful BT engineers, we finally got connected. The different in speed was apparent immediately.

I used www.speedtest.net to take two speed checks. One before the upgrade and one after.

Before

Current Broadband Speed

After

image

This is more than 10x faster, which makes me very happy indeed. The speed has actually gone down since yesterday, but Plusnet said it would take 48 hours for the speed to settle so by the weekend it should be fully speed!

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?

Trying some online advertising!

With Caffeine Club out of the traps, it is now time to get some subscribers. I foolishly hoped that a Facebook Page and a Twitter account would generate a stream of visitors to Caffeine Club, but that just hasn’t been the case. The iPhone app has gotten an average of one download per day, over the past three weeks, which is probably good. Given that all elements are in place, I now need to drive some traffic to the website.

To this end, I’m going to give some Facebook advertising a go. My first advert will be live from today and will run for one week. I’ll report back my findings!