![]() | Learn iOS Game Development
|
Basic Template Projects
This template is similar to Hello Kobold2D and showcases the use of Cocos3D, mixed with regular Cocos2D nodes. Notice that Cocos2D nodes can be drawn in front of or behind 3D objects. Cocos3D currently does not support Mac builds.
| ![]() Chapter 16 |
Illustrates how to use the KKInput class which wraps user input into a collection of convenience method. The main difference being that KKInput allows you to poll the input state at any time from any class without having to register to receive input events. KKInput takes the grunt work out of input processing, giving you the ability to easily test for double-clicks, scroll wheel & mouse position changes, key states with or without modifiers, and more. | Exclusive Kobold2D Feature! |
Advanced Template Projects
The three physics template projects in Kobold2D all implement the same physics demo: adding dynamic bodies (boxes), collision callbacks, and the screen/window acting as an impenetrable barrier. A static body is used to attach three dynamic bodies which are connected via Revolute (Box2D) / Pivot (Chipmunk) joints to create a swinging "rope".
| ![]() Chapter 12 |
The isometric tilemap project shows how to load an isometric TMX tilemap created with the Tiled Map Editor. The isometric tilemap is drawn with depth buffering and 2D projection for correct Z ordering of tiles. The project demonstrates conversion of touches to tile coordinates, inspecting tile properties, the use of the Tiled Object Layer for trigger areas and scrolling of the tilemap. It includes a controllable player character. On Mac OS it illustrates how to process keyboard events. | ![]() Chapter 11 |
This project illustrates how to improve rendering performance by replacing sprites created from individual files to sprites created from sprite frame provided by a PVR compressed texture atlas. It also shows how to use CCSpriteBatchNode to improve performance even further.
| ![]() |
Mac version currently has unresolved issues. See comments in AppDelegate.m. |
This project shows you how to add Cocoa views to Cocos2D. In particular the project not only adds views on top of Cocos2D but also underneath (transparent OpenGL view). It also correctly performs hit testing on views to emulate the responder chain for Cocos2D nodes. This is achieved by enabling EnableGLViewNodeHitTesting in config.lua. The user can interact with views in the foreground, cocos2d nodes in the OpenGL view, and views behind the cocos2d OpenGL view.
| ![]() Chapter 15 |
Game Template Projects
Doodle Drop is a fully playable game in which you attempt to avoid the dropping spiders by tilting your device. The game showcases accelerometer input (keyboard input on Mac), sound, music, a game over screen, a custom loading screen, score counting wth a bitmap font label, object pooling to avoid frequent alloc/dealloc cycles and advanced use of easing, rendering lines, simple collision testing, sequence and call func actions. | ![]() Chapter 4 |
(no Mac OS version) |
The Parallax Side-Scroller is a classic shoot'em up game with a virtual joypad and button provided by SneakyInput. The project shows you how to create an endlessly scrolling parallax background, how to structure bigger projects into multiple classes, how to pool and re-use game objects, how to keep nodes within a defined area by overriding setPosition, how to create reusable game components, how to turn your game's scene into a Singleton to make it accessible to other classes, and how to access other classes through your game's scene. | ![]() Chapters 6-8 |
The Pinball project is a functional pinball table with bumpers, flippers, a plunger and a ball. Box2D is used for physics simulation, the collision shapes were created with PhysicsEditor. The plunger and flippers are animated via Box2D motors. Collision events are forwarded via Objective-C messages to individual objects and correspondingly named selectors (eg beginContactWithBall, endContactWithPlunger). Includes a demonstration of gravitational pull by uncommenting the function applyForceTowardsFinger. | ![]() Chapter 13 |