Jump to content

can mobile web game support phone orientation game like Doodle Jump


Recommended Posts


I plan to make doodle jump game but it required the phone to orientate in order to control the doodle. I use Game Maker to develop it. Can the mobile web browser support it? I read somewhere only hybrid app can detect the phone orientation but mobile web browser cant support it. Is it true? I need to be sure about it

Link to comment
Share on other sites

It is possible with web browser. You need to listen for deviceorientation event.


Example game: http://goldenratio.github.io/candy-jump-saga/ Check it out in mobile browser (Chrome/Android)


Edit: I don't know about GameMaker, but this can be done with simple vanilla javascript.


Link to comment
Share on other sites

All browsers support `deviceorientation`, but not very well. It only fires after the event, which might be fine for what you want (mostly, afterwards is useless and you really want it before). Sometimes it can take a while for the browser to report the orientation change too, again, less than ideal. Rarely it wont fire at all, usually as a result of multiple rapid orientation changes although this is an unusual edge-case.

Google are generally far more supportive of the web platform so you might find modern Android devices actually handle this event better than iDevices, the device orientation, and lack of locking support, is a real footgun for the mobile web.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...