Hi all and welcome to Tutorial 3 in my iPhone Programming series on creating an OpenGL game.
This video runs for 46 minutes and covers changes to the project so far which are based on feedback I have had in the blog and also the creation of the SpriteSheet class.
The changes to the project are around making sure that the structure of the project and the location of certain elements such as OpenGL initialization etc is correct. I have also made changes to the main game loop.
I found that during my own testing I was loosing screen touches i.e. they were not registering and I was also seeing choppy screen updates. I did some research around this and found that there are better ways to run the main game loop than to have an NSTimer. So in this tutorial I make changes to the main game loop which removes the need for an NSTimer and in doing so means I don't loose my touches and the screen updates are much smoother.
The project for Tutorial 3 can be found below. This project contains all the code I run through in the tutorial along with additional comments to hopefully make it easier to see what has been done and why.
I hope you enjoy this latest tutorial. The next tutorial will be building on the Image and SpriteSheet classes we now have and provide an Animation class. This class will allow us to define an animation made up of a series of images from a spritesheet. You will be able to also define how long each frame should be displayed in milliseconds during the animation. We will also be able to define things like, should the animation repeat or just run once, should it ping pong etc.
So watch this space as Tutorial 4 will be available soon.