Skip to Content

Apple approves JavaScript iOS games that don't use a browser

Webkit-free Biolab

Look Ma, no WebKit! Your inner geek and nerd should give each other a little hug this morning as you read about the latest rather cool accomplishment of Dominic Szablewski, creator of the Impact JavaScript HTML 5 game engine.

He's just released two free games, Biolab Disaster and Drop, which are not, as Szablewski says, the first JavaScript games to be released in the App Store. "Tools like PhoneGap or Titanium make it easy to bundle some HTML pages and JavaScript together in an app and display them in a UIWebView, which is basically just a browser window," he says.

However, his games are different because they don't use a browser window to display them.

"They don't use PhoneGap or Titanium. They don't even use a UIWebView. Instead, they bypass the iPhone's browser altogether and use Apple's JavaScript interpreter (JavaScriptCore) directly. All graphics are rendered with OpenGL instead of in a browser window and all sound and music is played back with OpenAL," Szablewski says.

What Szablewski has done wasn't particularly easy, and as games, his offerings aren't up there with Angry Birds. But his work could open the way for other developers to write more apps with a minimum of fuss. Read his blog for full details of the process.



Look Ma, no WebKit! Your inner geek and nerd should give each other a little hug this morning as you read about the latest rather cool...
 

Add a Comment

*0 / 3000 Character Maximum Comment Moderation Enabled. Your comment will appear after it is cleared by an editor.

10 Comments

Filter by:
Taylor

It's worth noting that Titanium does not bundle HTML and js. Js is compiled to Obj-C.

May 01 2011 at 2:23 PM Report abuse rate up rate down Reply
lawer

Lua doesn't have a normal class system.

You can create a class sytem (or a prototype system by the way) but nothing is forced.

April 29 2011 at 12:53 PM Report abuse rate up rate down Reply
4nNtt

Actually I guess they are not using private API. They have bundled a different version of JavascriptCore from WebKit with the game. They are not using Nitro because it isn't compatible with the security restrictions of the device.

More here:
http://www.phoboslab.org/log/2011/04/ios-and-javascript-for-real-this-time

I still think Lua is better for this sort of thing. Pretty similar to Javascript. At least with out Nitro, Lua should be faster and lighter.

April 29 2011 at 2:10 AM Report abuse rate up rate down Reply
2 replies to 4nNtt's comment
Martin

I checked out Lua once to try to do some WoW addons but damn if it wasn't confusing. I didn't give it all that long, mind you, just saying the syntax was ... unique.

April 29 2011 at 6:01 AM Report abuse rate up rate down Reply
4nNtt

Personally I think Javascript is the odd language with a pure prototype-based class system. Lua has a normal class system and 1st party support for closures and coroutines (and support for prototypes). I'm surprised it isn't more popular with Ruby devs for this reason.

April 29 2011 at 10:35 AM Report abuse rate up rate down Reply
4nNtt

JavascriptCore is currently private API. If Apple decides they care this may be pulled. They have been letting scripting languages in though. Lua may be a better choice for this sort of thing.

April 29 2011 at 2:06 AM Report abuse rate up rate down Reply
stahlmanDesign

I learned Objective-C and have an iPad game on the App Store, and believe me, this lightweight little JavaScript engine is more impressive than Cocos2D or any of the game engines out there that I've spent time with. It even does Box2D physics. It shows just how powerful cross-platform JS can be. The way the engine is built means you don't miss more advanced things like calling super that you get with lower-level languages. Even people who know C languages often use Python or other scripting languages for rapid prototyping. (just try to generate a String in C and you'll remember why people like scripting languages). This game engine changed my opinion of JavaScript. Just look at the results in Biolab Disaster.

April 28 2011 at 3:10 PM Report abuse rate up rate down Reply
Joe

Neat little game, that Biolab one. I actually still have it in the bottom right corner of my 'Top Sites' grid. I'll have to futz with it on my touch since it is free after all. Onscreen button interfaces, this is your last chance to win me over! You hear me?

April 28 2011 at 9:30 AM Report abuse rate up rate down Reply
wvmikep

The lengths people will go to avoid learning a new programming language...

April 28 2011 at 9:23 AM Report abuse rate up rate down Reply
1 reply to wvmikep's comment
adrian

or become AWESOME at the ones they already know!

April 28 2011 at 11:44 AM Report abuse rate up rate down Reply
Buy an ad here

Hot Apps on TUAW

Tweets

© 2012 AOL Inc. All Rights Reserved.