Accelerometr WORKING EXAMPLE

Get help using Construct 2

Post » Thu Sep 20, 2012 11:01 pm

Hey guys, i really can not use data which is in manual and i do not really know how to use device tilt/accelerometr function.
What i need i want some action/expression to lock appmobi on horisontal position, make x axis acceleration and test it on apmobi, if anyone could provide links to real examples or explain funtion by function i would really appreciate it.!!
sorry for my noobness, i just do not have much time to complete my game
B
19
S
4
Posts: 21
Reputation: 1,975

Post » Thu Sep 20, 2012 11:36 pm

Are you using directCanvas? It doesn't support accelerometer yet, but we have a workaround implemented in the next build which should fix it.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Fri Sep 21, 2012 12:29 am

hmmmm, understood, thanks for the reply Ahley, so anything supports accelerometr atm???
B
19
S
4
Posts: 21
Reputation: 1,975

Post » Fri Sep 21, 2012 9:04 am

I'm writing a complex game based on accelerometer input, here are my personal tests.
Phonegap supports it on both iOS and Android. I suggest you the 1.7.x releases. Later versions introduced some bugs on android 2.3.x devices.
Appmobi software supports it but uses a different scale of values for accelerometer data (my suggestion is to write a simple app with three text objects filled with alpha, beta and gamma values to see how accelerometer data are treated in these wrappers).
Appmobi directcanvas doesn't still support it, neither CocoonJS.
B
11
S
3
Posts: 224
Reputation: 2,028

Post » Fri Sep 21, 2012 2:29 pm

Thank You for detailed answer))) Now i am trying to export my test app on phonegap... I build apk but i just do not know how to test it virtually. I installed eclipse and android sdk aswell but emulator is too slow and when i RUN my app just a screen pop up, i guess ill spend a lot of hours reading and learning) I hope next appmobi exporter will be better.

PS. appmobi requires full screen resolutions which totally destroy my in app positioning, since i'm not boud to pixels but window height and width my ingame ui, sprites just don't fit or too small on screen, which really sucks, my app is build for iphone screen nd iphone emulator just breaks out all my layouts.
B
19
S
4
Posts: 21
Reputation: 1,975

Post » Fri Sep 21, 2012 3:34 pm

Yeah, DON'T USE ANDROID SDK EMULATOR, it's so slow that breaks even the C2 engine collision detection.
I suggest you to use a separte GUI layer with parallax (0,0) and then place GUI elements with perfect pixel positioning based on the resolution you gave to the application (a 16:9 resolution is preferred with this approach).
Then, with a wise use of anchor behaviors on gui elements your app will be ready to support every mobile resolution out there.

B
11
S
3
Posts: 224
Reputation: 2,028

Post » Fri Sep 21, 2012 11:43 pm

Oh, thank you, for all this help,Knifegrinder. i didnt know Droid SDK was that bad, at work my coworkers use Android SDK on macs but they only build apps not games)

My problem is not that simple, i use 0,0 paralax for that gui but my app doesn't start well, and i can block screen to lanscape ONLY in phone gap exporter but have no way to try it on my ipad since i am not apple developer(((

I woul really appreciate if you could tell me aswell if i can preview my game and test Device orientation on my home lan or work server: If would post it like html on web on my Lan and then open on my ipad in browser, will i be able to test accelerometr???
B
19
S
4
Posts: 21
Reputation: 1,975

Post » Sat Sep 22, 2012 5:00 pm

ACCELEROMETR IN DIRECT CANVAS STILL DOEN'T WORKS EVEN IN R104.... 2 HOUR OF TESTING WITH TEXT AND SQUERES FOR NOTHING-.-ElRei2012-09-22 17:00:51
B
19
S
4
Posts: 21
Reputation: 1,975

Post » Sat Sep 22, 2012 5:08 pm

Here is my test made like 15 mintes ago, maybe i do something wrong
https://www.dropbox.com/s/t9fei0jcxb89gbe/elrei%20test.capx
B
19
S
4
Posts: 21
Reputation: 1,975

Post » Sat Sep 22, 2012 5:23 pm

@ElRei - oops, you're right, it still doesn't work in r104. I think I've fixed it for r105 now. Next time it would help to post a bug report so we can deal with the issue quicker.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Next

Return to How do I....?

Who is online

Users browsing this forum: feries, gregorysforster, Matthew de, signaljacker, spacedoubt and 0 guests