Cocos2D installer updated, added Cocos3D

On April 6, 2011, in Announcements, cocos2d, support, Xcode, by Steffen Itterheim

I have updated the unofficial Cocos2D installer to include the cocos2d-iphone-v1.0.0-rc version so that you can use the Xcode 4 templates. I also added Cocos3D so that you don’t have to run its install scripts anymore.

The installer now installs the following folders to your ~/Documents folder:

  • cocos2d-iphone-0.99.5 (latest stable)
  • cocos2d-iphone-1.0.0-rc (latest unstable)
  • cocos3d-0.5.3 (latest beta)

Warning: Project Templates are buggy!

Depending on Cocos2D/3D version and the version of Xcode, you’ll notice that some of the project templates will not compile without manually fixing some compile errors. This has nothing to do with the installer, the same thing happens when you install the templates manually with the .sh scripts.

For example, the project templates for cocos2d-iphone-1.0.0-rc do not work in Xcode 3 - the ones for Xcode 4 work fine. The Cocos3D project template does not work out of the box in Xcode 4, you have to manually copy and add the Cocos3D files (refer to the readme for more info). The version for Xcode 3 works fine.

Based on the Xcode version you currently use for developing new Cocos2D projects:

  • Xcode 3: use the Cocos2D v0.99.5 and Cocos3D Project Templates to start new projects. You can manually update to Cocos2D v1.0.0 afterwards.
  • Xcode 4: you will have to start with Cocos2D v1.0.0 (rc). If you want to develop Cocos3D applications, refer to the readme to learn the manual steps involved in creating a working Cocos3D project.
Tagged with:  

Xcode 4 Template Documentation & Cocos2D Podcast

On April 1, 2011, in cocos2d, Kobold2D, podcast, Xcode, by Steffen Itterheim

Xcode 4 Template Documentation


UPDATE:

You can get the Xcode 4 Template Documentation here!


The Xcode 4 Template Documentation has grown to nearly 40 pages (PDF) now, with only a few images and just reference material. The reference materials are nearly complete, including placeholders, variables and explanations for the use of every key available for Xcode 4 templates and a FAQ section. I still have to add the step-by-step tutorials (including example templates) for creating your own File Templates and Project Templates, and final proof reading and corrections.

Because the Xcode 4 Template Documentation has grown so big and I’ve already invested 50+ hours in it I want to try an experiment to see if creating documentation at this level of detail is sustainable. I’ll charge a small fee for access to the document, the standard price will be $15 and I’ll start selling it at an introductory price for a short period of time.

If this works out well in terms of revenue vs time investment I will likely offer more such in-depth documentation in the future. I was thinking that 50+ sales per month at $15 is a reasonable goal, and at this rate it would certainly be a welcome incentive for writing more documentation - next to me being generally inquisitive and interested in digesting challenging and diverse subjects.

I think the success of my book also ought to tell me that I can provide such in-depth treatments of game development topics. There’s certainly a lot of need for documentation on Cocos2D in general, but also there’s a big gap in general between what online documentation and tutorials offer (which often are only written for absolute beginners and/or to capture search engine traffic) versus the need of developers to learn more about a challenging niche subject in detail, including hard facts, recommendations, tips and tricks.

Cocos2D Podcast: coming soon …

Mohammad Azam aka @azamsharp recently approached me with the idea of creating a Cocos2D Podcast series. Azam has a lot of experience with creating podcasts and screencasts for the .NET crowd, and he has been a Cocos2D developer for about 6 months now with 4 kids apps already published to the App Store.

Two weeks ago we had a first dry run using Skype and liked the results, so we’re ready to record our first podcast this weekend if nothing gets in the way. I’m excited to try and see where we can take the Cocos2D Podcast and how you will like it.

The first podcast will be an introduction about ourselves and how we ended up working with Cocos2D, before we move on to trending topics in the Cocos2D space. If you have a suggestion for what we should discuss, or if you have a particular question that you like to get answered, please let me know (write a comment).

An apology

Lastly I wanted to apologize for missing last week’s update and not having much to report on this week. I was sick with a bad cold for the last ~10 days so nothing much happened in terms of Kobold2D or the Xcode 4 Template documentation. I’m still working on both of course.

I’m also responding to fewer and fewer emails, comments and forum posts as I’m getting swamped with them while spending a lot of time on other tasks. I realized I have to face the fact that as I gain popularity (much of it thanks to my book) I can no longer tend to everyone. Instead I’ll focus on listening in and providing value for a greater number of developers rather than responding to individual request. I’m sorry and I hope you understand.

How to properly install the Cocos2D Xcode Project Templates

On January 4, 2011, in cocos2d, support, Xcode, by Steffen Itterheim

You can get Kobold2D from www.kobold2d.com which is an easy to use wrapper (and installer) for cocos2d and related libraries plus many example projects. If you want to support development of the new, modernized version of Kobold2D then please consider joining KoboldTouch.

Installing Cocos2D Xcode Templates

If all you want to do is to install one of the latest cocos2d version’s Xcode templates, type this in a Terminal window:

First, change to the cocos2d-iphone directory using the cd command, for example if you unpacked cocos2d to ~/Documents the command would be:

Then run the Xcode templates installer script, -f forces overwrite of any existing cocos2d templates:

You can find more details in my blog post about enabling ARC in a cocos2d project.

If you’re new to cocos2d or Objective-C programming, make sure you enable ARC in all your projects! Not using ARC will be a painful experience, it makes it harder to write correct Objective-C code, it will slow you down, it might even demotivate you. Use nothing but ARC. Please. I still see way too many cocos2d related questions on stackoverflow.com which would not be an issue if the users had simply enabled ARC.

Tagged with:  

cocos2d Book, Chapter 2: Getting Started

On July 2, 2010, in Announcements, book, cocos2d, by Steffen Itterheim

Chapter 2 - Getting Started

This chapter starts with the usual prerequisites. Download and install iPhone SDK and cocos2d. Installing cocos2d Templates. Creating the first project from a cocos2d project template.

From what I already wrote I estimate that will be about one third of the chapter. I think what would be most interesting in this chapter is to talk about general code structure of cocos2d projects. The basic elements like Scenes, Layers and Nodes. How to transition from one screen to another, to see that we’re actually doing something cool with little effort. For that I think the scheduled selectors should also be introduced to time transitions, and one screen might be a Layer which is waiting for touch input to advance to the next screen.

It might also be a good place to discuss cocos2d memory management, like static autorelease initializers, and making sure dealloc gets called when you switch scenes - otherwise you’re obviously having a memory leak.

The goal is to get the reader into a position where he feels comfortable laying out a screen structure in cocos2d. He knows how to initialize objects and how to add and remove them from the scene. The foundation of working with cocos2d if you so will.

What do you think should be in Chapter 2?

Let me know if you think I’m missing anything important. If you don’t have any suggestions then just think about what you would expect from the chapter by reading this description, that might give you some thoughts.

Also I would welcome any tips and the common pitfalls first-time cocos2d developers might trap themselves into. Expert tips are also welcome, those little nasty things or habits which could bite you later on if you don’t consider them from the beginning.

I’m looking forward to your feedback! The earlier the better. Chapter 2 will be submitted next Friday, July 9th.

What’s planned for the Chapter after this one

Just to put Chapter 2 in context, for Chapter 3 I’m planning to talk about essential cocos2d classes and processes. Sprites, Labels, Menus, Actions, etc. It’ll show you how to work with them using small code snippets. The chapter will probably have a “reference” character with various code samples, so that experienced users feel comfortable skipping ahead while beginners still find it easy and encouraging to pick up the details.

Tagged with:  

I made a few additions to the Xcode Tutorial and the cocos2d FAQ which are based on user questions and concerns.

Xcode Project Tutorial: How to integrate Chipmunk SpaceManager

How to update the cocos2d-iphone code in a project created with a cocos2d Project Template? (Theory & Advice)

How to fix common Box2d compile errors? (must compile using C++)

How to fix common Chipmunk compile errors? (does not compile with C++ code)

How to draw an endlessly repeating Parallax Background? (very simple, very effective)


On Searching the Tutorial & FAQs

I’m still trying to get the search function on the Tutorial and FAQ pages fixed. Currently it works for the Xcode Tutorial only but other search result links may simply show an Error. I’ll try to get this fixed as fast as i can and i’m getting very helpful support from the folks at ScreenSteps Live so i’m hopeful.

Please also note that the search box in the navigation panel doesn’t search the FAQ and Tutorials, just the blog and pages.

Tagged with:  
Page 2 of 212