Xcode 4 Debugging Crash-Course

On October 6, 2011, in idevblogaday, by Steffen Itterheim

What do you do if your app doesn’t behave as it should, or even crashes?

Answer A: Post your problem in just about every programming forum.
Answer B: Use the Xcode Debugger to analyze what’s going wrong.

Since most of you already know how to do A I’ll focus on B in this Xcode 4 Debugging Crash-Course. It’s kind of aimed at beginning Xcode developers but that’s just because I hope – against better knowledge – that experienced developers already know that … thing … that debugger stuff. Ya know?

Continue reading »

Learn Cocos2D 2nd Edition: What’s New & Release Date

On September 30, 2011, in book, cocos2d, Kobold2D, by Steffen Itterheim

Scheduled for release on November 7th, 2011.

Continue reading »

Kobold2D (Alpha) Demonstration

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

I recorded a screencast to give you a first impression of the current alpha version of Kobold2D. I’ll show you what is is, what it includes (so far) and how it improves the cocos2d development process.

Since recording the screencast I’ve added the Doodle Drop project from the book as an iOS game template project. I also added the Box2D & Chipmunk physics projects from the book and improved them to work on both iOS and Mac OS X.

Update

Here’s a screenshot showing the current list of template projects (Hello Kobold2D, Hello Cocos3D, Hello Cocos2D-X, Physics Box2D, Physics Chipmunk, Physics Chipmunk SpaceManager, Doodle Drop) and the Doodle Drop template running:

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.

Cocos2D Podcast Introduction online!

On April 4, 2011, in book, cocos2d, podcast, by Steffen Itterheim

The first Cocos2D Podcast with Mohammad Azam (@azamsharp) from HighOnCoding.com and me is now online. Refer to the Cocos2D Podcast website for show notes and web links.

Listen to the Cocos2D Podcast (36 minutes).

And here’s the iTunes link for the Cocos2D Podcast.

Addendums

… to be laid off is kind of cool.

No, that’s not a freudian slip but not the whole story either. 😀

As the layoffs hit EA Phenomic and it was disclosed to us that we’ll never be working on 3D games for PC and consoles anymore, and instead we’ll be focusing on making webgames, you’d be either in the position where you would have to be laid off (eg 3D Artists) – which admittedly wasn’t “cool”. But if you were in a position like me where you could expect to stay with the company, but you simply had no interest in making webgames, you could volunteer to be put on the layoff list. The “cool” thing about that is that you wouldn’t have to quit, which makes a big difference in terms of compensation and treatment you reveice from the company as well as getting state support for unemployment. And you could save someone else’s job who actually wanted to stay with the company. So that was just a nice way to handle an otherwise difficult situation.

Also, as far as I know almost everyone who was laid off quickly got a new job or started new careers as freelancers. Some even moved abroad to the UK and Canada to work for Ubisoft. Most went on to work for Crytek and Blue Byte. And even those who I expected were going to have a hard time getting a new job in the game industry, mostly due to lack of experience and achievements, found new employment in other game studios small and big. I find this noteworthy because whenever situations like EA Spouse, the Red Dead Redemption crunch or the layoffs and shutdowns in 2008/2009, there’s going to be a huge amount of worry expressed by employees that they don’t want to be fired because there’s no one else hiring. This couldn’t be further from the truth!

The game industry was and still is an industry where it is ridiculously easy to get a job – even with little qualification and experience – but at the same time notorious for those who “made it” to sustain the worst working conditions. This probably goes hand in hand. I know that those who landed their first game development job were very eager to keep it (me included), and they know or (even worse) suspect that there are likely better hires out there than oneself. Which in fact is sometimes reinforced by management, but my experiences trying to hire qualified staff tells a different story: it’s really, really hard to find qualified game developers which is why it’s so easy to get in because you often have no other choice but to hire from those who applied, not necessarily from those you wish would have applied. So game developers maybe trying to prove themselves harder and are more concerned about their job safety than they need to be.

Celsius / Fahrenheit

Turns out I wasn’t too far off with my guess: 25 ºC = 77 ºF

Not as hot as Texas of course, but relatively speaking a hot day for spring in germany.

Stressful

At one point I mentioned that the popularity I gained from writing the Learn Cocos2D book, plus the websites I run, can be “stressful”. I’m referring to the obligation and personal responsibility that I feel towards people seeking my help. One of the strongest negative feelings I have is looking at all those requests, knowing I can’t help all of them, and not knowing where to start answering. I don’t even have a good way to measure who needs my help the most.

Some of the questions are easy to answer, but that also means they are already answered if you go look around (google is your friend). Other questions are challenging, and I like that because they pick my brain, but answering those would require at least an hour or more of research and would seriously cut into the time I need for other tasks. And a third class of question is simply those I can’t answer, or at least not by email. That’s either because I lack the knowledge and experience on the subject matter (for example, I barely have any Cocoa Touch programming experience yet), or because it requires a fair amount of understanding of project-specific details, including design goals and the actual source code. Then there’s countless of job inquiries which as a professional I feel I should at least politely decline but even that is eating up quite a bit of time.

I feel a certain responsibility to answer everyone’s inquiries, be it about a specific programming problem or seeking someone to hire in order to get their game project done, which is why it’s so hard for me not to do it. And that in turn causes stress, or anxiety. But as I started receiving more and more of these requests I was lagging behind answering them, up to the point where I had to purposefully ignore most of the requests. I needed to face reality and cut down on the total time I spend communicating while still getting the essential tasks done (client work or the projects I set myself out to do). Though necessary to ignore most requests, to me it still doesn’t feel right, or fair, especially after I promised to be responsive. This is what creates the stress I was referring to. It’s something I have to come to terms with and I can only apologize for it.

I decided to alleviate that situation by monitoring all of these requests and figure out what the most pressing issues are, and then focus on fixing what I call the “big picture issues”, be it by programming or documenting. Kobold2D is one such effort to fix the ongoing issue of getting to work with Cocos2D (template installation, project configuration, setting up libraries). The Xcode 4 Template Documentation is my attempt to fix the information void about Xcode 4 templates, especially since every bit of information about Xcode 3 Templates is null and void due to the significant format changes.

Book Update

The contract is signed, this summer an updated version of the Learn Cocos2D book will be published. It will likely be titled “Learn iPhone 5 and iPad 2 Cocos2D Game Development” and change all the source code to be compatible with v1.0 of Cocos2D. There will also be two new chapters which will be revealed at a later time. And I’ll fix the erratas that have been reported thus far.

One of the things I want to fix is that working entirely from the book will not cause compile errors anymore, this specifically means adding some more source code to chapters 3 and 4 I believe, where I’ve omitted a few lines of code in the first edition. The Game Center chapter will be improved to include the data send/receive example. There will certainly be a couple more changes in regards to iOS 5 (if available at the time) and new devices like iPad 2 and iPhone 5 obviously, and miscellaneous changes here and there.

As usual I’ll keep you posted on the progress.

Linkvent Calendar, Day 21: Cocos2D and Hexagons

On December 21, 2010, in Cocos2D Linkvent Calendar, by Steffen Itterheim

Stu Gisborne is the developer of Orbs Away, a match-3 game using hexagon tiles.

Stu wrote a quick introduction to using Hexagon tiles with Cocos2D and how he built the match-3 game with it.

PS: sorry that this post was delayed by 12 hours, things tend to get crazy shortly before Xmas. And then there’s all this snow. No, I don’t have a better excuse. :)

Tagged with:  

I’m writing a book for Apress:

Learn iPhone and iPad Cocos2D Game Development: The Leading Framework for Building 2D Graphical and Interactive Applications

I guess someone wanted to be very precise and thorough. 😀

I will blog about the book’s progress here and when it’s published I will add additional materials so readers can continue their journey here. Since this journey is just beginning – I’m submitting the first chapter aptly titled “Introduction” tomorrow – and writing a whole 400 pages book is an entirely new experience to me, I want to let you in on the journey.

Help me help you by providing feedback to the book’s content as I’m writing it!

For the coming weeks, I will announce the current book chapter title and a short description and ask you what you’d like to see in this chapter. I will make these posts every Friday starting tomorrow until the book is complete. In this post you could start by telling me what you’d expect from this book or what you’d like to see in it just given its title? I guess your answer will be “a lot” given the title’s elongated nature. :p

I hope you forgive me if content updates to this website will not be as comprehensive over the coming months, in favor of writing the book and coding sample games. Plus I’m cooking up something special on the side, but all in due time.

Oh, by the way, if you happen to know what kind of fruit that is on the cover I’d like to know. I could just ask my editor but I’d like to see if we can figure it out without the help from Apress. It doesn’t really look like a coconut to me, which would have been fitting given the subject. If you have any ideas what fruit it is, let me know! It sure looks exotic and it’s definetely not a banana nor a lemon. So what is it? The first to post the correct answer in a comment, together with a link to Wikipedia or some other website as proof, gets a copy of the book for free when it’s out (or $40 now)!

And now for something completely different …

As a side note, the Xcode project files from the Xcode Tutorial are now available for download here. I used to ask you to join my Newsletter but I don’t feel too good about hooking you up with my Newsletter using the project as a dangling carrot, so joining the Newsletter will now be a completely voluntary thing. I only send newsletters for substantial updates and important news, at most once or twice per month, so that’s the thing you want if you are already struggling with RSS overflow.

Tagged with: