Access Keys:
Skip to content (Access Key - 0)

Kobold2D™ Documentation

The All-In-One, Ready-To-Go development solution for cocos2d-iphone developers. Open source, ARC enabled, for iOS & Mac OS.

Switch to: Japanese Documentation

Level Up!

The Learn Cocos2D Book

Line-Drawing Game Starterkit

Excellent template code for creating your own Line-Drawing game, similar to popular titles such as Flight Control, Harbor Master, and Pirate Bay.

The iPhone RPG Engine

Rapidly create your own RPG or action-adventure game with this complete starter kit. Includes an ebook, game source code and a royalty-free art package.

Learn iOS Game Development

The Learn Cocos2D book symbol indicates in which chapter or article you can learn more about each template project.

Basic Template Projects

Hello Kobold2D


iOS


Mac OS

The standard template project for Kobold2D is the successor of the "Hello Cocos2D" template. It showcases Retina support, config.lua settings, OS and device detection, iAd banners, actions, built-in and custom font labels and sound.

Use this template as a starting point if you want to start a Kobold2D project from scratch.

  Chapter 16

Hello Cocos3D


iOS


iOS

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.

Use this template as a starting point if you plan to work with Cocos3D. It has the required line -force_load libcocos3d.a in BuildSettings-iOS.xcconfig already set.

  Chapter 16

Particle Effects


iOS


Mac OS

This project shows you how to create particle effects by subclassing the CCParticleSystem class. It also displayed particle effects created with Particle Designer as well as Cocos2D's built-in particle effects.

  Chapter 9

User Input


iOS


Mac OS

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

Physics Box2D / Physics Chipmunk / Physics Chipmunk SpaceManager


iOS


Mac OS

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".

If you're unsure which physics engine is right for you, check out these templates and use the one which you find easiest to work with. You might also want to read the FAQ entry: Which Physics Engine is the best?

  Chapter 12

Orthogonal Tilemap


iOS


Mac OS

The orthogonal tilemap project shows how to load a TMX tilemap created with the Tiled Map Editor. It 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.

  Chapter 10

Isometric Tilemap


iOS


Mac OS

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

Sprite Performance


iOS


Mac OS

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.

This project can also be used for benchmarking sprite rendering performance of various sizes and image formats.

  Blog Post

Cocos2D With UIKit Views



iOS

Mac version currently has unresolved issues. See comments in AppDelegate.m.
Mac OS

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.

The Learn Cocos2D (2nd Edition) book Chapter 15 includes instructions on how to add Cocos2D to an existing UIKit app.

  Chapter 15

Game Template Projects

Doodle Drop


iOS


Mac OS

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

Parallax Side-Scroller


iOS

(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

Pinball Game


iOS


Mac OS

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

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
Adaptavist Theme Builder Powered by Atlassian Confluence