IPad Platform Game

0 favourites
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • 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

  • 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...

  • 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.

  • Cheers Kyatric,

    I will give it ago and get back to you!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Doesn't work I'm afraid.

    Nothing what so ever.

    I tried it on booth IPad 1 (IOS 5/Safari) and Android Phone.

  • 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.

  • 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.

  • 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.

  • 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.

  • So there's progress ^^

    Well, I have access to an Ipad2 this week end. I'll take a look at it and try to provide some solution.

  • Cheers matey!

    I've attached an image of my progress.

    <img src="http://2bdigital.co.uk/touch-orientation.jpg" border="0" />

  • Event 5 it should be -ADZ (-10) since a negative gamma (<0) means a tilt to the left.

  • I've changed it and now nothing moves again.

  • UPDATE:

    I have used text to test weather the touch events are actually active and working and my results are no they do not work.

    Touch.Gamma (less or equal two) -ADZ

    Touch.Gamma (greater or equal two) ADZ

    If I toggle the events off, the text is then set to true so what am I missing?...

    Must have something to do with the touch events.

    I' attached some images:

    <img src="http://2bdigital.co.uk/result1.0.jpg" border="0" />     

    <img src="http://2bdigital.co.uk/result1.jpg" border="0" />     

    <img src="http://2bdigital.co.uk/result2.0.jpg" border="0" />     

    <img src="http://2bdigital.co.uk/result2.jpg" border="0" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)