Kobold2D: Cocos3D Project Template

On June 25, 2011, in cocos2d, cocos3d, Kobold2D, by Steffen Itterheim

Today I completed the first draft of the Kobold2D chapter which will be in the second edition of the Learn Cocos2D book. In that chapter I’m also giving you an introduction to cocos3d, the official 3D add-on library for cocos2d. I ported cocos3d’s Xcode project template to Kobold2D and spiced it up a little with some cocos2d nodes in the back- and foreground:

Notice the “incoming network connection” warning. This is caused by the iSimulate library which is distributed with Kobold2D and activated by default for Simulator builds. You still need to buy the iSimulate App to benefit from it though. If you don’t you can also choose to ignore the dialog or simply disable iSimulate by commenting out a line in the project’s BuildSettings-iOS.xcconfig file.

I’ve also had great fun with the augmented reality option that the cocos3d CCNodeController class provides. And setting it up is one line of code. Here’s the “camera as live background” demo in action:

Since a picture doesn’t really do it justice, here’s a video:

Admittedly it could run a little faster on my iPhone 3G. It’s pretty taxed and averages around 20 fps with the camera background view and rendering a 3D model. My iPod Touch 4 averages at around 40 fps and it feels a lot smoother.

Kobold2D Todo List

One of the biggest items on my todo list for Kobold2D is to design the website and get rid of the “coming soon” page. This includes setting up the wiki and filling it with content, documentation for the most part. And, well, paying $150 each month because I don’t see any alternative to using Confluence. I want to enjoy working on documentation, and I want you to enjoy browsing and reading it.

I also want to create more template projects. Currently, as you can see in the first screenshot, there’s Hello Kobold2D (iOS & Mac), Hello Cocos3D (iOS) and Hello Cocos2D-X (iOS). I want to add two more templates, one for Chipmunk with SpaceManager (iOS & Mac) and one for Box2D (iOS & Mac). I also want to add the projects from my book as project templates, namely Doodle Drop, the Shoot ’em Up game, the Orthogonal and the Isometric Tilemap projects, and the Cocos2D With UIKit project (all iOS).

Even though Kobold2D won’t have Xcode 4 Project Templates I still want to give you a quick and easy way start a new project based on one of the template projects. Notice the distinction between “project template” (those in Xcode’s New Project dialog) and “template project” (a regular, already existing project). I started writing a tool that allows you to create a copy of an existing Kobold2D template project and rename it, so that the workflow is just as convenient as doing it within Xcode. It works for the specific template I tested it with, but I still have to design the user interface and make the code fail-safe.

In case you wonder why Kobold2D won’t have Xcode Project Templates: they are not nearly as powerful as they would have to be. And they’re a pain in the rear to create and maintain without some tool support. But worst of all, you have no way of including files in an Xcode 4 project template that must not be added to the Project Navigator. Like, for example, .xcodeproj files.

The Complete (?) List Of Cocos2D Tools

On June 24, 2011, in book, cocos2d, tools, by Steffen Itterheim

For the second edition of the Learn Cocos2D book I compiled an alphabetically sorted list of tools that developers can use for cocos2d projects. Please let me know if there’s a tool missing from this list or if there’s one that won’t work anymore and hasn’t been updated in months.

The following tools can be used for development with cocos2d:

Bitmap Font Tools

BMFont (Windows)
Fonteditor
Glyph Designer
bmGlyph
Hiero
LabelAtlasCreator

Particle Editing Tools

ParticleCreator
Particle Designer

Physics Editing Tools

Mekanimo
PhysicsBench
PhysicsEditor
VertexHelper

Scene Editing Tools

CocosBuilder
Cocoshop
LevelHelper

Texture Atlas Tools

DarkFunction Editor
SpriteHelper
TexturePacker
Zwoptex

Tilemap Editing Tools

iTileMaps
Tiled Map Editor

Cocos2D Podcast: Earn Additional Revenue

On June 21, 2011, in cocos2d, podcast, by Steffen Itterheim

The latest episode of the Cocos2D Podcast is out!

This time Azam and I talk about the options you have to earn additional revenue from or with your apps, using iAd ads, In-App Purchases, selling your source code and other ideas.

Cocos2D Podcast: Earning Additional Revenue

Cocos2D Podcast on iTunes

You might also want to read my blog post How to make over $18,000 in six months selling source code about the financial success of my Line-Drawing Starterkit. By the way, I’ll be releasing a new game kit in autumn. More details in the coming weeks.

Tagged with:  

Kobold2D Meets Cocos2D-X

On June 17, 2011, in cocos2d, Kobold2D, by Steffen Itterheim

Kobold2D is well and alive. Actually so much so that I thought: “Hey, it’s crazy, but maybe not … I’ll give it a shot and see how far I get.”

The thought was to try and add the cocos2d-x engine (cocos2d in C++) together with the Hello World example project to the Kobold2D workspace. The result: it took about 90 minutes, most of that figuring out the correct build settings and header search paths. And it just worked.

Surprise! 😀

Right now this is just the iOS version. A cocos2d-x Mac project will be added as soon as the Mac platform is officially supported by cocos2d-x (or does it already and I missed that?). Then developers would have the choice between using either Objective-C or C++ as the primary language for developing their iOS & Mac OS X games.

It also made me think: “Hey, there’s this other open source 2d game engine … hmmm….” :)

Tagged with:  

Cocos2D Embedded In A Cocoa Touch App

On June 12, 2011, in book, cocos2d, by Steffen Itterheim

I just completed this project for the new book chapter about embedding UIKit views/Cocoa Touch in a Cocos2D application. In that case I embedded the Cocos2D view in the View-based Application template and added some controls to start/stop the cocos2d view and change scenes. Here’s the result:

It also correctly auto-rotates. But I noticed an odd bug with auto-rotation enabled for all orientations: the view is designed in portrait mode. If I start the App on my iPod Touch 4 while holding the device in landscape mode, then rotate back to portrait mode once the app has started and enable the cocos2d view, for some reason this causes my device to reboot! I see a transparent white color drawn over the entire screen before the screen goes black and the Apple logo appears.

If anyone has any idea what might be causing this behavior, please let me know. As far as I debugged it is not the initialization of the EAGLView class itself, a scene is already running or about to be run.

I’m guessing it might have to do with the EAGLView initialization, since I rely on Interface Builder to initialize the view. I simply dragged a View object onto IB and changed the class from UIView to EAGLView. Maybe the EAGLView default settings are not supposed to be used and I do need to create the EAGLView manually?

Tagged with:  

Cocos2D Podcast with Michael Daley

On June 11, 2011, in cocos2d, podcast, by Steffen Itterheim

The latest Cocos2D Podcast has been out for a few days and I totally forgot to post it!

Mohammad Azam and I talked with Michael Daley, author of the Learning iOS Game Programming book and one half of the 71Squared development team. You know, the guys who made Particle Designer and Glyph Designer.

Cocos2D Podcast with Michael Daley

Cocos2D Podcast on iTunes

Cocos2D Installer Updated (v1.0 rc3)

On June 1, 2011, in cocos2d, by Steffen Itterheim

The Cocos2D Installer has been superseded by Kobold2D!

Since you’re looking to install Cocos2D, you may be interested to hear about the Kobold2D game engine. Kobold2D is designed to make Cocos2D developers more productive. Of course it comes with an installer, and includes Cocos2D.

Original Post

With the release of the unstable cocos2d-iphone v1.0.0 rc3 version today I’ve updated the Cocos2D Installer to include this new version, as well as an updated version of Cocos3D (v0.5.4). The installer will install the Xcode templates for you for both cocos2d and cocos3d in both Xcode 3 and Xcode 4 versions.

Download the Cocos2D Installer (66 MB)

The Cocos2D installer includes cocos2d-iphone v0.99.5 (stable) & v1.0.0 rc3 (unstable) and cocos3d v0.5.4.

Cocos2D/Cocos3D will be installed to the user’s Documents folder in appropriately named subfolders. You can move these folders after installation to another folder without breaking anything.

Tagged with:  

Cocos2D with a Touch of Cocoa

On May 31, 2011, in book, cocos2d, by Steffen Itterheim

When I asked on Twitter what kind of chapter you’d like to see in , I got some great responses! The most votes were for more complex physics examples, all other suggestions were all over the place. Saving and loading, optimizations and organizing bigger games, audio programming and Cocos3D. I think they would all deserve a chapter of their own, and in fact I’ll get you started with ObjectAL and Cocos3D in the chapter about Kobold2D.

But after some research I realized that one of the most frequent issues with an apparent lack in good answers are about integrating Cocoa Touch (UIKit) in a Cocos2D application. Or vice versa, adding Cocos2D to a Cocoa Touch application. There are many things to consider, and it’s easy to run into problems. This topic is especially persistant because on the one hand there are a lot of Cocoa Touch programmers who are starting to use Cocos2D, whereas there are also many Cocos2D users who know little of Cocoa Touch – and both want to use the best of both worlds.

Here’s a preliminary list of topics I’d like to get into:

  • RootViewController explained
  • Cocoa Touch views in a Cocos2D app (eg In-App Mail)
  • Starting & stopping Cocos2D in a Cocoa Touch app
  • Properly handling autorotation
  • Performance considerations
  • Adding iAd banners

If you have a suggestion that is not on this list feel free to add it in a comment!

Tagged with:  
Page 20 of 37« First...10...1819202122...30...Last »