Muschamp Rd

Grinding away at Game Programming

September 21st, 2014
iPhones

Today I finished off the fourth chapter of “Learn Cocos2D 2 (Third Edition)“. I don’t have much to show for my efforts though I suppose I could add “Kobold2d” to my resume since I’ve continued to use that framework in addition to Cocos2D. I can’t help thinking the way my last project management job went I shouldn’t be studying Unity3D…

You have to be patient when developing on iPhone. Xcode can and does crash. Even if you only add a few lines of code from a book, you can get a page full of gobbledygook for your efforts.

Compilation error in Xcode

If you get an screen full of unexpected garbage, you now have Google and Stack Overflow. In the olden days you had a book, if you were lucky you had a book, sometimes all you had was a text editor. Now everyone has an IDE or at least a text editor that does syntax highlighting, but if you get a screen that looks like mine, the solution is likely on this webpage.

Chapter 3 is long and then you come to Chapter 4 and make your first game. The first actual game you make is unplayable in the emulator. I can’t help but think that was a poor decision. Each chapter introduces new concepts, most of which aren’t even new to me seeing as I already built Peeved Penguins and have spent too many Sunday’s coding alone to bother trying to count. But if you really are just a beginner, you want to be able to play your first game…

If you can avoid typos and compiler linker errors the game will run, but without the accelerometer you can’t move your player character. Cocos2D uses a lot of structs, if you’re an OOP purist this can get annoying, but this is likely done for performance issues. Now everyone codes in an IDE with syntax highlighting but besides the missing “*” in the declaration most of the structs seem to start with CG while the actual objects start with CC. Keep that in mind and you’ll be OK.

I still type code rather than just rely on code downloaded from the Internet. You learn a lot more making your own typos and you get used to autocompletion in the IDE doing things the old fashioned way, but it does take longer. Here is a screenshot of the work in progress game from Chapter 4, called Doodle Drop.

Simple iPhone Game

The other thing I’ve been doing is applying to jobs, I generally only apply to 2 or 3 types of jobs, but because I am open to relocation I write a lot of cover letter and read even more job postings. I continue to go to industry networking events. I’ve been to #hoothire, #hiringhappyhour, and now #tvtechfest. Hopefully the third time is the charm for hiring events with hashtags.

There are a lot of companies hiring in Vancouver and almost every one of them wants developers. I was a software developer in a previous millennium, now I foolishly try to find a job that actually uses my MBA. I didn’t apply to every company that was at TechVibes Tech Fest, but I did apply to most, even if just a general application.  Below is a list of who was recruiting heavily in Vancouver this week:

Needless to say I’m hoping for some job interviews next week.

Update: my worst fear, well my worst fear when writing iPhone code came true, Apple’s Xcode 6.01 update breaks the distribution of Cocos2d that is part of Kobold2d, making all the code downloadable from the book’s official webpage no longer compile. I left a comment, but I think I’m going to have to try tweeting at Steffen. But what I really need is a job, I’ve written entirely too many cover letters and got zero interviews as a result of TechVibes Tech Fest. I had two rounds of interviews for one opportunity in a single week, now radio silence for two weeks. I’m growing increasingly frustrated and am applying to more and more jobs far, far from Vancouver.

Later: While reading through chapters and being unable to run any of the sample code or any code I’d previously written that used Kobold2d, I finally hit upon the bright idea, roll back to the previous version of Xcode which is possible to download from Apple’s developer website. I’m not sure deliberately running old code is optimal, but I’d like to at least see some of the code run. Steffen recently made an announcement he has written a new book, Kobold2d is close to becoming abandonware, development is ongoing on cocos2d itself, but Steffen has moved on twice to his latest codebase/project which is called SpriteBuilder.

Although none of the effort I’ve put into learning iOS programming has proven profitable, after finishing “Learn Cocos2D 2” but before reading “Learn SpriteBuilder for iOS Game Development” I will probably work through an online iOS gamedev course created by the folks at bitfountain.io. Of course I’d prefer to be working on a real paying project…


Posts on Muskblog © Andrew "Muskie" McKay comments not necessarily so...
CFA Institute does not endorse, promote or warrant the accuracy or quality of Muskblog. CFA® and Chartered Financial Analyst® are registered trademarks owned by CFA Institute.