Category Archives: Programming

All about code. Boooor-ing!

Buttons in Sprite Kit using Swift · September 23, 2014

For all the helpful things that Apple added to Sprite Kit, one of the most glaring omissions is that most basic of user interface elements, the button. Not really sure why that is, but fortunately it’s pretty easy to create something that “just works.” The gist of the solution is to create a subclass of […]

11 comments · Posted by in Programming, Tutorial · , , , ,

Intro to Sprite Kit using Swift · September 9, 2014

Have you started looking at Apple’s Objective-C replacement, Swift, yet? If not, now’s the time. You’ll use the same APIs with Swift, but the language syntax is similar to that of JavaScript or Ruby, which makes it a bit easier to write. While Apple provides some Swift tutorials, I’m mostly interested in using it with […]

1 comment · Posted by in Programming, Tutorial · , , ,

Vectr + Game Center for Cordova · June 14, 2013

It’s been a slow couple of months. A bit of “real life” upheaval (in the form of having to find a new job) has prevented blog updates. I haven’t been completely idle during this time, though, and have been working on a few small projects, two of which I’ll detail here. The first is a […]

Add a comment · Posted by in Games, Programming · , ,

Object-oriented programming with JavaScript · September 10, 2012

So, here’s how to easily create your own prototype-based classes in JavaScript. Seems confusing to lots of folks, and there are multiple ways to do it. If you use CoffeeScript, you can write your classes in a more traditional OO style. However, it’s really not too complicated in plain JavaScript. Step One: Write Your Constructor […]

Add a comment · Posted by in Programming · , ,

RequireCS project boilerplate on GitHub · August 16, 2012

So I finally got around to creating a repository on GitHub. I thought it might be useful for others to see the project structure I used to build Shikaku Madness, so I ripped out most of the guts and uploaded it. It uses Backbone for structure, and loads dependencies using RequireJS. I also used James […]

Add a comment · Posted by in Programming · , ,

Experimenting with Javascript · June 26, 2012

In my last post I complained about dealing with all the static images that one has to create in order to support multiple iOS device resolutions. I was just getting so frustrated dealing with layouts that required 3 different static images, and having to jump through hoops whenever I wanted to display some sort of […]

Add a comment · Posted by in Programming · , ,

Resolution Woes · May 9, 2012

Oh, my unbridled naivety! My last post discussed a new game, and how quickly it was coming together. Of course, any project is easy to start, and the real difficulty is dealing with the soul-crushing minor issues that rear their heads when you’re almost done. In my case, dealing with image assets for 3 different […]

1 comment · Posted by in Meta, Programming · , ,

cocos2d + Game Center Achievements · November 1, 2011

If you’ve been following along on the blog, I posted a few months ago about how to easily integrate Game Center leaderboards into your cocos2d game. Game Center is pretty great, because Apple writes basically all of the code for you, and they also provide a web-based interface to create your content. My previous tutorial […]

3 comments · Posted by in Programming, Tutorial · , ,

cocos2d + Game Center · July 13, 2011

So (for those of you who have been living under a rock) Apple has baked a “social” gaming service for iOS into recent releases called Game Center. Game Center allows its’ users to see what games their friends are playing, as well as their own progress in the Game Center-enabled games they own. For developers, […]

20 comments · Posted by in Programming, Tutorial · , , , , ,

NS(Mutable)Array tips · June 1, 2011

The game I’m currently working on is a color-matching game, where the puzzle tiles are arranged on a grid. Obviously, the data structure you’d use for such a game is an array. While you could use a regular C array, NSMutableArray has a few advantages. It’s true that NSArray/NSMutableArray are slower than regular C arrays, […]

Add a comment · Posted by in Programming · , , ,