Physics not working on Android?(CocoonJS)

Discussion and feedback on Construct 2

Post » Mon Jul 29, 2013 9:34 pm

@BAnyBudde

I understand your frustration, but this has been an issue for a while now, and is out of Scirra's hands for the time being. CocoonJS was updated which appears to have caused some errors.

I'm sure the team are working as hard as they can to make sure things are smooth. For now, you'll either have to switch to the older physics engine with Cocoon, or just wait a little longer.

I've been waiting for this for approximately 3 months... but it's given me a lot of time to polish up my game.

Sorry I couldn't be more help.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
68
S
8
G
6
Posts: 931
Reputation: 9,360

Post » Mon Jul 29, 2013 9:46 pm

@AnD4D

Yeah, we have been waiting for 3 months too :)
Unfortunately I am very impatient ha ha

I am sure they must be working very hard, I was just under the impression that the Accelerated Physics were up and running, It seems like that was posted for the R138 update.
Just trying to find out if I'm unaware of a certain issue regarding this problem.

Anyhoo, Thanks for the reply
Always much appreciated.

And be sure to let us know what your game is called.

Kind Regards
B
16
S
3
G
2
Posts: 62
Reputation: 3,225

Post » Sat Aug 31, 2013 5:56 pm

[QUOTE=AnD4D] @BAnyBudde

I understand your frustration, but this has been an issue for a while now, and is out of Scirra's hands for the time being. CocoonJS was updated which appears to have caused some errors.

I'm sure the team are working as hard as they can to make sure things are smooth. For now, you'll either have to switch to the older physics engine with Cocoon, or just wait a little longer.

I've been waiting for this for approximately 3 months... but it's given me a lot of time to polish up my game.

Sorry I couldn't be more help.[/QUOTE]

How do you switch back to "OLDER PHYSICS ENGINE with cocoon"

Would appreciate your input. Thanks

B
7
S
2
G
1
Posts: 24
Reputation: 1,277

Post » Sat Aug 31, 2013 6:18 pm

Just found the problem I was having. Seems like a referencing error in the code that is generated by Construct 2.

I was getting the problem "TypeError: 'undefined' is not an object ('evaluating window.Box2D.Dynamics')

unzipped my Cocoon export file.
  1. Unzipped my Cocoon export zip file
  2. Opened the c2runtime.js file
  3. Searched for "window.Box2D"
  4. Deleted the "window." portion. As the window object doesnt' tie to Box2D as far as I can tell from the rest of the code
  5. zipped everything back up. (make sure you zip all the files to the root of the zip, else the runtime will fail)
  6. Upload you app and test
  7. hopefully it's all working!



darkstar2013-08-31 18:19:53
B
7
S
2
G
1
Posts: 24
Reputation: 1,277

Post » Sat Aug 31, 2013 6:25 pm

just noticed that there is a physics engine property on the cocoon object.....

guess that's what you guys meant?
B
7
S
2
G
1
Posts: 24
Reputation: 1,277

Post » Sat Aug 31, 2013 6:38 pm

Spoke to soon....
cloud compiled version doesn't work grrrr..

this is annoying
B
7
S
2
G
1
Posts: 24
Reputation: 1,277

Post » Sun Sep 01, 2013 12:55 pm

@darkstar

I think you figured it out by the looks of things, but just click on the cocoonjs object and once you have selected it, change the physics engine property to standard web based instead of accelerated physics to make sure that your exports will work.

Let me know if you are still stuck, I can always help you out
B
16
S
3
G
2
Posts: 62
Reputation: 3,225

Post » Sun Sep 01, 2013 12:58 pm

@darkstar

Just wanted to query you on one thing, with your method, is there any improvement with your standard web based if you did manage to get accelerated physics to work?
B
16
S
3
G
2
Posts: 62
Reputation: 3,225

Post » Sun Sep 01, 2013 6:57 pm

So I changed the coding like you suggested, removed the window. part and I can report to you that it is not a better option than using standard web based. Just a heads up so that you are aware of that. pity, I was really hoping it had made use of the proper accelerated physics, but it simply bypasses the error code and runs the regular box2d physics, but with a slower performance. Thanks for the info though, good idea on your behalf darkstar
B
16
S
3
G
2
Posts: 62
Reputation: 3,225

Post » Mon Sep 02, 2013 12:57 pm

i made a game and i use physics in it.
i convert it to apk with cocoonjs but after starting game, game gets close without any error.
i use phonegap and it is very slow and it doesn't support webgl!
and when i upload my project to phonegap site it use 2.9 version. how can i convert it to version 3? is it faster? is it support webgl?
i changed physic to standard web based and it doesn't work in cocoonjs too!
is it any way to convert my game for android?
B
13
S
3
Posts: 22
Reputation: 953

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: armaldio, Eisenhans, shinichild, zenox98 and 0 guests