The Guide to Building and Customizing SpriteBuilder v1.x

On January 23, 2014, in idevblogaday, by Steffen Itterheim
Custom-built SpriteBuilder with MySprite node plugin

Custom-built SpriteBuilder with MySprite node plugin

Following the recent release of SpriteBuilder and cocos2d-iphone v3 I’m sure some of you are itching to use SpriteBuilder by building the github version in Xcode rather than downloading it from the Mac App Store. Here’s how!

This is a post for developers who want to compile the SpriteBuilder code from github. To customize it, to debug issues, to add or gain access to new features; be it for their own use or to help the project, or both.

Previous experience with Xcode, Objective-C, cocos2d-iphone, git and github is assumed.

Download SpriteBuilder from github

The download and first-time compilation procedure is also detailed on the SpriteBuilder github page. You need to clone the project, then initialize the cocos2d-iphone submodule. The necessary Terminal commands are as follows:

Continue reading »

Tagged with:  

Why aren’t YOU contributing to open source projects?

On August 22, 2013, in idevblogaday, by Steffen Itterheim

I got a lot of questions in the past why I’m not contributing my work to the cocos2d-iphone project.

One of the obvious reasons being that what I did is simply too radical technically and I don’t want to compromise. Another reason being a fundamental difference in attitude towards developing and managing open and closed source projects.

These questions made me wonder – in particular because there was often a notion associated with these questions: because I do so much with cocos2d-iphone I should somehow be obliged to contribute back to it. Weird, right? I am contributing a lot already, just not code to the repository.

So if I don’t contribute (code), why don’t you? Or generally speaking, why aren’t we all contributing more (code) to open source projects?

I have been using open source software for as long as I can remember doing programming work. Yet I’ve probably contributed no more than a few dozen lines to all projects together. And realizing this it’s easy to see that this is the case for 99.9% of the developers out there.

So why aren’t we contributing more to open source projects? What is stopping us? I’ll give you some probable causes and ideas how to improve it for your own open source project.

Continue reading »

Cocos2D v2.1 and Storyboards: Done Right!

On May 17, 2013, in idevblogaday, by Steffen Itterheim

Screen Shot 2013-05-17 at 01.05.51There are many Cocos2D + Storyboard tutorials, it’s about time to do another one that’s done right. Also, this one’s backwards: we’ll start with a Cocos2D template and then add Storyboards to it. The tutorial will work for existing Cocos2D projects to which you wish to add Storyboards, too!

I’ll show you how to add Storyboards to a Cocos2D v2.1 project, with ARC enabled of course. This approach will take a little more work, but the solution will be complete and you gain a fair understanding of how things work together. Plus two custom but reusable View and Navigation controller classes, and I’ll show you what changes you need to make to the AppDelegate.

The resulting project will work with iOS 5 and iOS 6 and autorotation. The navigation and cocos view controllers are separated, and you will be able to subclass them for code customizations as is customary in Cocoa. Cool? Cool, cool, cool!

As usual you can grab the example project (Cocos2D + Box2D + Storyboards with ARC enabled) from github. I’ll also be adding a Storyboards template project to KoboldTouch in the next update, and document what’s special about the KoboldTouch solution.

Oh, only one thing … this tutorial is part of Essential Cocos2D. Head on over and enjoy!

Example ARC project. Pretty awesome.

When I wrote the tutorial how to enable ARC for a cocos2d project, I neglected to include an actual working project. I mean why read and follow a long tutorial if all you really need is a working project to get started with?

Therefore I decided to enable ARC in all twelve standard cocos2d Xcode project templates for both cocos2d versions (v1.1 and v2.0), both platforms (iOS and Mac OS), both physics engines (Box2D and Chipmunk) and publish them on github.

You can download the ARC-enabled cocos2d template projects either as ZIP file or TAR file.

Continue reading »

How to Zoom In on a Cocos2D Node

On May 17, 2012, in cocos2d, idevblogaday, by Steffen Itterheim

Time to add another project to my github repository. This time I’m answering the frequently asked question (in some form or another) how to zoom in on a particular node. For example zooming in on the player when he dies.

That’s not as trivial as it sounds, but you can make it easy if you follow some guidelines.

First, you want to put all nodes that should be affected by the zoom in the same layer. Then you should avoid changing the position or anchorpoint of the layer – if you still want to change the position of the layer I suggest to add this layer into another, toplevel layer and then only change the position of the toplevel layer. Use the cocos2d node hierarchy to your advantage. And don’t use the CCCamera.

The behavior of this example project is best observed with your own eyes. You can get the ZoomInOnMe project on github.

Continue reading »

Tagged with:  

LearnCocosTV 3: Two And A Half Nuts

On January 13, 2012, in LearnCocosTV, by Steffen Itterheim

After a holiday-season hiatus (Happy New Year btw!) LearnCocosTV is back. This episode is somewhat shorter because I had a lot of catching up to do and a lot of chores which aren’t exactly show-worthy. But I did manage to port most of the Kobold2D projects to Cocos2D 2.0 beta. Too bad they look just the same as before.

A bi-weekly Show & Tell about Cocos2D, Kobold2D and iOS/OSX development by Steffen Itterheim.

Episode #3 – Two And A Half Nuts

• Updating Kobold2D to use Cocos2D v2.0 (beta)
• iDevBlogADay: Tips for updating to Cocos2D v2.0
• iDevBlogADay Source Code available on github

Tagged with:  

Kobold2D v1.0.1 now available!

On December 15, 2011, in Kobold2D, by Steffen Itterheim

Kobold2D v1.0.1 is now available from the Kobold2D Download page or via github! You’ll find the Release Notes in the usual place.

The most important new features are:

Almost all bugs reported so far have also been squashed. Mainly several fixes related to KKInput, a crash with CCMenuItem* and blocks and an issue that caused Retina mode not being properly enabled.

A few minor convenience methods have also been added, for example CCDirector now has a continuously updated frameCount property that returns the number of frames drawn since the app started, and KKInput now has the anyTouchLocation property if you just want the touch location of any (the) finger on the screen.

From Dogfooding to Catfooding

On September 22, 2011, in idevblogaday, Kobold2D, by Steffen Itterheim

Most developers have heard of the phrase “Eat your own dog food”. It refers to the habit of actually using what you’re creating.

A typical example would be a company building Yet-Another-Issue-Tracking-Tool™ while using said issue tracker to manage their Yet-Another-Issue-Tracking-Tool™ project. And you’ll surely have heard of a game engine that was initially only developed as a necessity to build a game, then polished and released to the public to great success, while the developer continued to create games with his own engine.

Dogfooding is considered a good practice, actually a best practice. You know that the tool you’re building works, and that it satisfies your needs.

But “your needs” is also the achilles heel of dogfooding, and it’s just a small step away from forever “perfecting” your product (known as “gold plating”). So sooner or later, you’ll have to do some catfooding, too. Meaning: to feed the user’s needs.

Continue reading »

Page 1 of 212