June 6, 2014

Swift

On Monday, Apple announced a new programming language called Swift. It will launch with iOS 8 and OS X Yosemite this fall. Although Swift and Objective-C can exist side-by-side in an app, it appears that Swift will eventually take the place of Objective-C in iPhone (and Mac) application development. I have decided to put a hold on my Objective-C engine and rewrite it in Swift.

I’m also going to take this opportunity to refine the engine’s design and swap out some of the slow code, most notably the collision system. Instead of using custom systems, I will make use of Apple’s Sprite Kit framework in the Swift version of my engine for rendering, physics, and collisions. This should help the transition from Objective-C to be fairly rapid. I’ve already ported the framework over to Swift, and now only have to implement specific systems like the camera system.

I still plan to add Lua scripting support to the engine. Objective-C can be bridged to Swift, so I will use Objective-C to load in Lua as a C library, then bridge it to Swift for use in the game engine as planned.

Posted by Luke Godfrey

Luke Godfrey is a graduate student at the University of Arkansas, pursuing a PhD in Computer Science. He has created applications on a number of platforms, and is especially interested in mobile and web development.

View more posts from this author

Leave a Reply

Your email address will not be published. Required fields are marked *