IPad Platform Game

Get help using Construct 2

Post » Tue Jan 03, 2012 12:53 pm

Hi Everyone!

How would I go about creating an object which moves direction when you tilt the IPad left, right, up and down?

I need a kick start in the right direction.

An example would be great! :)

Rich
B
5
S
1
G
1
Posts: 111
Reputation: 1,122

Post » Tue Jan 03, 2012 1:13 pm

Maybe this can help you : http://www.scirra.com/forum/mobile-swipe-gesture_topic47537.htmlKyatric2012-01-03 13:31:20
B
23
S
5
G
5
Posts: 112
Reputation: 4,737

Post » Tue Jan 03, 2012 1:27 pm

I've been looking all over the forums and I haven't found anything solid!

Don't think many people have developed anything for mobile and tablet devices...
B
5
S
1
G
1
Posts: 111
Reputation: 1,122

Post » Tue Jan 03, 2012 1:45 pm

Commented example.

I don't have a phone, so I wasn't able to test it, but it should work.

Also the manual entry about the touch object should be of help here.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Tue Jan 03, 2012 2:22 pm

Cheers Kyatric,

I will give it ago and get back to you!
B
5
S
1
G
1
Posts: 111
Reputation: 1,122

Post » Tue Jan 03, 2012 2:32 pm

Doesn't work I'm afraid.

Nothing what so ever.

I tried it on booth IPad 1 (IOS 5/Safari) and Android Phone.
B
5
S
1
G
1
Posts: 111
Reputation: 1,122

Post » Tue Jan 03, 2012 2:44 pm

As I said, I don't own a phone that allow me to test this further.
Experiment from this cap using the manual.

The idea is to check the current tilt (on right to left and front to back axis) and simulate the sprite control according to the axis.
To be sure, on start of layout check thet device orientation is supported.
If it is you should be able to tweak in the touch object's expressions enough to figure it out.Kyatric2012-01-03 14:44:46
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Fri Jan 06, 2012 11:26 am

Is there any way I can check for certain that the Ipad 1st generation supports orientation using HTML5?

I've seen and played orientation games on the Ipad but they were not created using HTML5.
B
5
S
1
G
1
Posts: 111
Reputation: 1,122

Post » Fri Jan 06, 2012 12:55 pm

In the touch object you have : Device orientation supported
True if the device supports orientation detection (compass/tilt).

Run a simple application that will give you the value of this condition:
Example application

I'm not sure though that this is a very good practice, as I test this application on my FF on desktop, and it tells me that orientation is supported. I don't have peripheral to use it though.

Anyway, test it on your Ipad, it might give you a clue.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Fri Jan 06, 2012 1:04 pm

Cheers Kyatric!

The good news is it does support Device Orientation, now I just need to figure out how to get the thing to work...

I've tried different events and still no luck, the best I got was the ball moving to one side of the screen and then jittering when it got to the end.2Bdigital2012-01-06 13:05:24
B
5
S
1
G
1
Posts: 111
Reputation: 1,122

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 0 guests