Porting of JavaScript game engine to iOS platform - javascript

I already have a fully working engine, written entirely in JavaScript and I want to deploy this to iOS games. The problem is that iOS does not let JavaScript control the HTML5 audio tag so no sounds can be played. As well as this, mobile devices do not work at high-performance using the HTML5 canvas element.
Can i make JavaScriptCore from webkit to be compiled into a separate library that can be used in an iOS app so that my game engine can run inside JavaScritpCore and make calls from JavaScript to the iOS app. By making calls from JavaScript to iOS, my engine can control the output of OpenGL and OpenAL so that my engine can use native mode technologies to output the graphics and sound of the engine whilst still keeping the engine code entirely in JavaScript. Pls advise!
Cheers,
Ken

Related

Cordova not working with threejs?

I have a game written with three.js in javascript, I am using Cordova to try to put it on the IOS and android store but Cordova doesn't seem to support webGL, and if i use a canvas renderer my game is really slow, I am thinking of trying cocoonJS.
So basically can i use three.js with Cordova and if not does cocoonJS support webGL?
It is a well-known fact that Android's web view is not accelerated to the extent of iOS or even Windows Phone 8 (it's slowly catching up though). I'm not sure what's going on with three.js and Cordova, apparently they don't get along, but CocoonJS does support WebGL in its latest incarnation. Ludei even have a demo app on Google Play. For more information, I suggest you check with Ludei support, as I'm certainly no expert.

difference between cocos2d-x vs cocos2d-js

I'm just moving towards mobile apps... A friend of mine told me to start with cocos2d, I'm good in javascript. while searching google for cocos2d, and within cocos2d-x.org I found
cocos2d-x
cocos2d-JSB
cocos2d-html5
cocos2d-Javascript
I know what cocos2d-x is for and what cocos2d-html5 is for, but what is cocos2d-JSB and cocos2d-Javascript?
My questions are..
Can we develop 100% pure native apps/games in cocos2d-JSB and or cocos2d-javascript.
I also know cocos2d-JSB is javascript bindings, but what does that exactly mean?
Last but not least question: what is cocos2d-Javascript for? does that work alone or do we need cocos2d-html5 to make it previewable in iOS/Android/Windows Phone?
My aim is to develop native apps for iOS/Android and Windows.
Cocos2d-JS is Cocos2d-x engine's javascript version, maintained by Cocos2d-x team. It supports full Cocos2d-x functionality with a set of simplified javascript friendly APIs. It contains two parts: Cocos2d-html5 and Cocos2d-x JavaScript Bindings (JSB), and Cocos2d-html5 is a pure JavaScript engine for web, and Cocos2d JSB is for native app which share the same API with Cocos2d-html5.
So, Cocos2d-JS provides a consistent development experience for whichever platform you want to distribute to, either web and native. You can use it to develop web, android, iOS, mac, windows app. The windows phone8 is coming soon. You can develop your game on browsers with Cocos2d-html5, and then compile to native app with Cocos2d JSB.
Cocos2d-JavaScript is totally different from Cocos2d-html5 and Cocos2d JSB. It was branched from cocos2d-iPhone and maintained by Ryan Williams.
Cocos2d-X is a complete game engine which can be used to build native apps for android,IOS and windows mobile devices as well as for web platform. Cocos2d JSB is used to create native apps as well as web apps while Cocos2d js is used to create purely web based games. If you do not want to make any native app, you can use Cocos2d lite version also. Cocos2d lite version is a single javascript file having the complete basic functionality of Cocos2d-X. you can use this version to reduce your project size.
cocos2d-x supports 3 languages:
cocos2d-x + c++,
cocos2d-x + js,
cocos2d-x + lua.
With c++, lua, you can develop android/iOS/Windows app, but you can't develop a web-based game. It will have to be done in Javascript. cocos2d-x + js will support android/iOS, also web-based app.

Does GeckoView for Android provide a Javascript interface/callback?

Since the WebView implementation on Android depends on the Android version and the manufacturer (Samsung and other manufacturers apply their own patches to it), I'd like to provide my own rendering engine for my Android app to reduce QA overhead and gain more confidence.
I tinkered around with both the Chrome engine (Chromium) and the Firefox engine (GeckoView) and integrated them into my Android app.
The GeckoView is very straight forward to integrate and so far it is working well. The only thing I am missing is a Javascript interface (bi-directional) similar to WebView's addJavascriptInterface.
Is there any way to get Javascript callbacks and to execute Javascript with GeckoView?

How to export an existing html5 game to an IOS game app

I have a game written in html5(mainly written in JavaScript), using cocos2d-html5 game engine;
Now I want to make it an IOS game app so I can submit it to apple app store,then users can download and install it on their iPhone or Ipad;
So, my question is, how could I export it to IOS?
I have already tried using PhoneGap-a good cross platform engine for apps-to wrap my game, but it is too too slow for game apps;
Did anyone have some ideas or experience about similar things?
I will appreciate it so much if someone could share some ideas.
Have a look at this tutorial, it creates a simple HTML-5 game using cocos2d & after that it ports it to coco2d-iphone, so it runs natively using the JSBinding for Objective-C & you'll get the best performance.

how to use javascript to embed flash into ios

I wonder how can i run web flash application on IOS?
Because i heard some information about Flash application can run on IOs using Javascript
But i dont know how to write javascript code to make flash run on IOs
Do you have any tutorial or resources to help me to do this ?
Thank you very much
There have been a number of attempts to get Flash onto iOS devices (converting Flash apps to iOS apps, or recreating the runtime in JavaScript) but I doubt any of the solutions would be suitable.
You’d be better off building your application in HTML5, CSS3 and JavaScript.
Apple does not support Flash on its iOS devices. Apple and Adobe had quite a nasty bust-up over this issue. And, to make matters worse, it doesn't look like its going to improve any time soon (see here). So the only thing you can do is use HTML5, CSS3 and JavaScript to develop your web apps for iOS.

Categories