News for hackers. Stuff that matters.
Re:Impact JavaScript Game Engine for iOS by AntiRush on Monday October 11, 2010 @12:25PM (#1780181)
Yep, I hit this roadblock too. For my similar project I ended up using a non-jit version of Spidermonkey for embedded Javascript. Interpreted performance is pretty poor in comparison to jit though, and I ended up moving to a much higher level Javascript API to share between canvas and native implementations. It runs at 60 fps on 2nd gen hardware now with moderate (1 - 2 hundred sprites).
Re:Impact JavaScript Game Engine for iOS by wtracy on Monday October 11, 2010 @01:22PM (#1780408)
Just thinking out loud:

I wonder how feasible it would be to pre-compile the Javascript to machine code before distributing it? Maybe someone determined enough could probably hack one of the existing JIT engines to emit executable machine code to a file?

Re:Impact JavaScript Game Engine for iOS by AntiRush on Monday October 11, 2010 @02:37PM (#1780688)
For a restricted subset of Javascript it wouldn't be that hard.

I'm not sure that solves the iphone problem though - I don't think it's kosher to use non c/c++/objc code. A Javascript to C compiler would work fine, though. That would be quite a bit more work, though.

[Edit]As pointed out below, it might well be ok. I guess you'd have to somehow get the generated machine code into a static library and link it with your application. That might work.

Re:Impact JavaScript Game Engine for iOS by glhaynes on Monday October 11, 2010 @03:16PM (#1780855)
It's kosher now, as of Apple's recent changes to their developer agreements.