melonjs with Appmobi ?

83 views
Skip to first unread message

Ahmad Takhimi

unread,
May 15, 2013, 1:23:13 AM5/15/13
to mel...@googlegroups.com
Hi


Ive tried melonjs example (platformer) with appmobi, but it got stuck on the melonjs loading screen only.. Anybody ever tried combo of appmobi and melonjs ?

Im using version 0.9.7.


Thanks.

melonJS

unread,
May 15, 2013, 1:29:19 AM5/15/13
to mel...@googlegroups.com

well we actually are more supporting CocoonJS since we have built-in support for it in the last 0.9.7 version.
if you can however get any input about why it is being stuck (if you can access a console log to see potential errors/exception) we'd be happy to fix anything that might be wrong :)

Ahmad Takhimi

unread,
May 15, 2013, 2:21:47 AM5/15/13
to mel...@googlegroups.com


Hi

Well the problem is there is no error in the console. It just stuck like 75%. I think have to edit how melonjs load the json file when use with appmobi ? Some code I get from internet.

function getJSON() {
AppMobi.device.getRemoteData(url1, "GET","","json_handler","error_handler");
}

function json_handler(data) {
   // Parse JSON
   data = jQuery.parseJSON(data);
}

I think the engine is waiting for callback to continue or something ?

For cocoonjs, I just learn that you need to have Mac to compile the XCode project generated from their cloud if you want to publish to Appstore, which is a bit disappointing since I dont have Mac.. :)

A bit demotivated, maybe I need to try to use virtualbox...


Regards

melonJS

unread,
May 15, 2013, 2:29:58 AM5/15/13
to mel...@googlegroups.com
hmm interesting....

have you tried to load the XML version of your level, instead of the JSON one ? (I don't remember if appMobi does support what is required like a full DOMParser)

Jay Oster

unread,
May 15, 2013, 3:30:12 AM5/15/13
to mel...@googlegroups.com
That looks like it's for AJAX requests, which melonJS doesn't really do. But maybe the network tab will give you some info about what resource is failing to load (if any?)

Ahmad Takhimi

unread,
May 15, 2013, 4:22:26 AM5/15/13
to mel...@googlegroups.com
I`ve check the network tab. Seems like nothing wrong.

If I disable all the melonjs script except appmobi template, it would display blank screen as what it should do. Only when I enable back the melonjs script it hangs or stuck.

 I'll try to do a simple project and test from there on. Base on what I understand appmobi may require a lot of changes and need to use their library or method (for sound, directcanvas and etc) which is not as friendly as Cocoonjs.

I'll do more testing from melonjs example and test if it works or not first.


Thanks



On Wednesday, 15 May 2013 13:23:13 UTC+8, Ahmad Takhimi wrote:
Reply all
Reply to author
Forward
0 new messages