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?
Scheduled for release on November 7th, 2011. Continue reading »
Continue reading »
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.
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:
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.
And here’s the iTunes link for the Cocos2D Podcast.
… 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.
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.
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.