Archive for the ‘iPhone Game Programming’ Category

More tutorials to come

Just wanted to let you all know that I am still going to putting tutorials up on the site. Things have slowed down due to work and the book writing, but I’m not intending to let the tutorials slip as its what people really like about the blog.

So, I just wanted to let people know that whilst they may not be as quick as the previous tutorials I’ve done, I will certainly be doing more over the coming weeks and months as well as post useful info in blog entries.

Read more

Share:
  • Digg
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • StumbleUpon
  • Technorati
  • TwitThis
  • Design Float
  • DZone
  • email
  • Google Bookmarks
  • LinkedIn
  • Scoopeo
  • Tumblr

Writing a book

Well, I have mentioned a few times that I have a project which has been taking shape in the background and I am now in a position to share more information.

Based on the success of this blog and the excellent feedback I have received from those using the tutorials I am currently writing a book for Addison Wesley which is tentatively entitled Learning iPhone Game Programming: A Hands-On Guide to Building Your First iPhone Game.

Read more

Share:
  • Digg
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • StumbleUpon
  • Technorati
  • TwitThis
  • Design Float
  • DZone
  • email
  • Google Bookmarks
  • LinkedIn
  • Scoopeo
  • Tumblr

Using 3D models from Blender in Open GL ES

One question I get asked a lot is “how do I load 3D models into OpenGL ES?”.

Of course, the answer to that isn’t a simple one. If you followed my my earlier posts on importing Wavefront OBJ files, you’re probably aware of that already. There are many file formats, and none of them are ideal for loading into a resource-constrained device like the iPhone.

Direct Link »

Share:
  • Digg
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • StumbleUpon
  • Technorati
  • TwitThis
  • Design Float
  • DZone
  • email
  • Google Bookmarks
  • LinkedIn
  • Scoopeo
  • Tumblr

iPhone Game Programming – Tutorial 10 – Game Structure

You will be pleased to know that the first part of tutorial 10 is now available for viewing. It’s taken me much longer than I would have liked to get this ready, but I’m glad that at least part 1 is out.

This part of the tutorial covers the changes to the project structure I have made along with how I am managing different game scenes such as the main menu and core game scene. It also covers some of the changes I’ve made to the Image class etc.

Read more

Share:
  • Digg
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • StumbleUpon
  • Technorati
  • TwitThis
  • Design Float
  • DZone
  • email
  • Google Bookmarks
  • LinkedIn
  • Scoopeo
  • Tumblr

Black screen of .. urm .. nothingness

A number of blog readers have mentioned the problem of getting nothing but a black screen when running the earlier tutorials under SDK 3.0. This is something which has been discussed in other blog entries, but I should have really done a blog post for it a while ago to save people digging around for the solution.

Basically, in the app delegate, the following like of code

[glView mainGameLoop];

Needs to be changed to the following line of code:

[glView performSelectorOnMainThread:@selector(mainGameLoop) withObject:nil waitUntilDone:NO];

The issue seems to be that the applicationDidFinishLaunching method is run on a thread other than the main queue, so our game loop needs to be run on the main thread and hence the command above works. I’m still not 100% certain of why this happened, but when I work it out or someone can tell me I’ll pass it on.

Hope that helps.

Mike

Share:
  • Digg
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • StumbleUpon
  • Technorati
  • TwitThis
  • Design Float
  • DZone
  • email
  • Google Bookmarks
  • LinkedIn
  • Scoopeo
  • Tumblr

Changes are coming…

I just wanted to let you all know that when I cover Tutorial 10 I will also be covering a number of changes to the overall project.

As I’ve been writing these tutorials and working on my own code I’ve found better ways of doing things as well as I’ve started to find my own style in how I like to set things out. It certainly seems that some patterns are useful when creating games such as the Singletons etc but in general you do what is necessary to get the game working :o)

Read more

Share:
  • Digg
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • StumbleUpon
  • Technorati
  • TwitThis
  • Design Float
  • DZone
  • email
  • Google Bookmarks
  • LinkedIn
  • Scoopeo
  • Tumblr

3D Sound

I mentioned in my Sound Manager tutorial that I was still playing with 3D sound and I didn’t include it in the tutorial itself. Well, I have been playing with it and finally got it working. I’m going to be recording an update soon which will cover fixes/changes to the Image, SpriteSheet and Sound Manager classes, plus some overall structural changes to the project.

The one thing that did take me a while to figure out was that I needed to be using Mono sounds for the 3D side of OpenAL to work. I was setting the location of the listener and the location of the source but the sound was not changing based on its position with the listener.

Read more

Share:
  • Digg
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • StumbleUpon
  • Technorati
  • TwitThis
  • Design Float
  • DZone
  • email
  • Google Bookmarks
  • LinkedIn
  • Scoopeo
  • Tumblr

iPhone Game Programming – Tutorial 9 – Sound Manager

In this tutorial I create a simple sound manager class that can play back multiple sounds using OpenAL. It also allows you to play background music as well using the AVAudioPlayer class.

The reason for writing my own sound manager was to see how OpenAL works. Commenters on this blog provided some great links, see the “Sound of music… explosions and lasers”, so I decided to work through them and get something working.

Read more

Share:
  • Digg
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • StumbleUpon
  • Technorati
  • TwitThis
  • Design Float
  • DZone
  • email
  • Google Bookmarks
  • LinkedIn
  • Scoopeo
  • Tumblr

iPhone Game Programming – Tutorial 8 – Particle Emitter

Finally I’ve managed to finish the Particle Emitter tutorial. I got seriously side tracked with other fun things like sound etc on the iPhone, but I’ve managed to focus back on this and get it finished.

Read more

Share:
  • Digg
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • StumbleUpon
  • Technorati
  • TwitThis
  • Design Float
  • DZone
  • email
  • Google Bookmarks
  • LinkedIn
  • Scoopeo
  • Tumblr

The sound of music…explosions and lasers

One area that I’ve not covered yet is sound. This is going to be in another tutorial but I’ve seen a few conversations starting about it.

When I wrote iServant and needed sound I used the SoundEngine from the Crash Landing example. Whilst I didn’t understand and to be honest did not want to understand, the code in SoundEngine, it gave me what I wanted and was easy to implement.

Read more

Share:
  • Digg
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • StumbleUpon
  • Technorati
  • TwitThis
  • Design Float
  • DZone
  • email
  • Google Bookmarks
  • LinkedIn
  • Scoopeo
  • Tumblr

Twitter (@71squared)