Kobold2D is a extended and improved version of the popular Cocos2D game engine. It can be downloaded here.
This tutorial will make a simple parallax scroller. Nothing to fancy, only simple stuff. If you are new to programming you should get familiar with XCode and Objective C before trying to make a game. You can download this tutorial from here.
In this tutorial we will add speed when touching the screen witch will make the objects on screen to move, all clouds are independent from the user speed and are only affected by the wind speed. Factors that will have an impact on the objects speed is the friction of the ground, depth of the object from the user and the accumulated speed. Releasing the screen will stop adding speed and depending on friction and the retardation value the objects will decrease in speed until stopped.
Download and install Kobold2D and then run the Kobold2D Project Starter, choose the Empty-Project template.
For creating sprite sheets I will use Zwoptex.
In MainMenu there is only a sprite (start) and a background object. The sprite has dimming effect for added effects. Touching the start will change the MainMenu scene with the Scroller scene. One good thing to do when changing scenes is to clear textures and/or sprites that is not necessary in order to save memory. In this tutorial I use
[[CCSpriteFrameCache sharedSpriteFrameCache] removeSpriteFrames]; [[CCTextureCache sharedTextureCache] removeAllTextures];
since I only have small spritesheets and I don’t need the previous textures/sprites.