Impact for iOS
I know you're waiting for the release of the Impact Game Engine, and I promise you, it's coming. I just get distracted too easily. So here's my game Biolab Disaster running on the iPhone 3GS with 60 frames per second:
The game is running in its own process and is not using the iPhone's browser at all. Instead, it's just using the JavaScriptCore Framework to run the game. All the necessary calls to the Canvas API have been reimplemented with OpenGL-ES and the touch input is passed over to JavaScript to be evaluated by the engine. I of course had to make some changes to the engine, but the game source code is exactly the same as for the web version.
The JavaScriptCore Framework is still private on iOS. So as it is now, I won't be allowed to distribute the game in the AppStore. But my understanding is, that if I bundle my own copy of the JavaScriptCore Framework (which is part of WebKit and thus freely available) with my game, I should be on the safe side. Let's see how this works out.
38 Comments:
i would love to contribute to this project. i'm hoping i see both the browser + ios versions on github soon so i can lend a hand :)
Im very impressed by this! Are you planning to release this xcode project as opensource later?
As good as I find the performance of the canvas element on iOS, atleast for the way I use it in Orbium, higher framerate wouldnt hurt :-).
Good luck with the app store approval process.
I'm so stoked to get my hands on this.
I CANNOT WAIT!
Do you have release date planned?
I don't have a release date yet. I probably should set one, because I work faster with a deadline approaching... Anyway, I finished university last week, so I've got some more time on my hands now!
That is absolutely awesome!
"The JavaScriptCore Framework is still private on iOS. So as it is now, I won't be allowed to distribute the game in the AppStore. But my understanding is, that if I bundle my own copy of the JavaScriptCore Framework (which is part of WebKit and thus freely available) with my game, I should be on the safe side."
This is true. You can compile Javascript Core and include it in your app. I have done this previously as an experiment.
However, there is one HUGE drawback in doing so: no compiled/jitted javascript code is possible.
This is because iOS applications are not allowed to create executable code in the heap or on the stack, so there is no way to JavaScriptCore to compile to native code when it is running as part of a third party application.
So unfortunately there is no good way to get this going at the same speed that you get when linking against the private framework.
Sad. This is also a major problem for other scripting languages. They all can only run in interpreted mode. Which might be good enough but is never the best you can get.
Tremendous!
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).
What frame rate did you get with canvas/webkit on iDevices? Presumably it was not good enough.
Nicely done.. why not reimplement it in C or C++? How much work would it be?
Looks fantastic, I've used JS for quite awhile, so a game engine like this would be really cool for me. Keep up the great work, looks awesome.
im really glad you're releasing the engine. that is a +100 in my book.
my question is, will this run as an html5 app? accessible by browsers?
I'm also interested in the framerate when running in the browser on iOS devices.
It runs with about 10 FPS in the browser on an iPhone 3GS; a little faster on an iPad. See my previous post for a performance comparison on different platforms: www.phoboslab.org/log/2010/09/biolab-disaster
This looks awesome. How much of your canvas impl is in C vs Objective C? I'd love to port this to webOS which has both a C based OpenGL ES stack and a JavaScript engine.
this is sick. I hope the JIT issues don't cause too much of a hit. Count me as among the people that would love to contribute to this project, I would be very interested in helping with adding audio support to this.
Phat idea. But aren't interpreters disallowed in AppStore?
I believe Unity3D 3.0 uses precompiled javascript so that must be possible.
This was a really fun game! I hope the bundling of the CoreJS library works out for you!
Yeah, I find it odd that Cisco didn't put up more of a fight then they did. I guess it wouldn't have been worth the negative PR it would have generated. You know Apple wouldn't have backed down.
Remember there was a big hoopla when the iPhone was introduced because Cisco supposedly owned the rights to the name. Apple had a lot of balls using that name. They eventually worked something out with Cisco. Perhaps they worked with Cisco during the iOS renaming since they already had a relationship.
It would be cool, if you port it to Android too.
But, my iPod is still waiting for it :p
The Editor is at www.phoboslab.org/biolab/weltmeister.html
This combination is just what I was looking for since Jiggy is dead! Add native iPhone UI and the full featured game platform is done ;)
Good luck, Dominic!
What are your plans for licensing? Open source and free to all, or some sort of commercial license?
I absolutely cannot wait for this! Keep up the incredible work!
The newest Apple developer EULA allows interpreters as long as the code that will be run is packaged with the app (i.e. not downloaded while the app is running).
Is there any solutions?
There some useful materials about iOS: http://searchizz.com/search.php?q=ios
I'm checking your site everyday for news on impactjs. I really want to try creating a game with your engine. I've never created a game before and the editor looks really great.
Is there any update on the 'whether you can make a browserless JavaScript game in iOS and have the app store accept it question?'
Damn you're good!!!
Excellent, keep up the good work, when's it going to be ready for the web and iPhone?
I'm new to all this.
Could somebody explain how to make the JS run in a separate process and not have the browser handle it ?
Is the game still launched from the browser but the JS is handled externally via some other process ?
If so how do you declare that ? Is there some iOS specific markup to be used ?
Sorry to be so thick. I'm loving the discussion.
or...
do I need to download WebKit and compile it up to run my JS exclusively ?
Or specify my JS as a parameter from the command line.
Presumably Canvas is lost so the call to the OpenGL-ES is essential with this approach.
Help ! :-)
why dont you publish it into cydia?
I'm really eagerly waiting for this. Hope it's going to be free. Even if it's not, I'll pay for one.
cool! :)