Riddik Posted October 27, 2014 Share Posted October 27, 2014 Hi! Is it possible to contrive a game now controlled via the accelerometer?In Phaser not included functions to work with the accelerometer, but what third-party solutions can be used together? And the question about the orientation of the screens. Still now there is no way to lock the position of the desired game screen? Thanks. Link to comment Share on other sites More sharing options...
casarock Posted October 27, 2014 Share Posted October 27, 2014 Hi, there are some WebAPIs which could help. First Screen Orientation Lock: https://developer.mozilla.org/en-US/docs/Web/API/Screen.lockOrientationIt's experimental but available at some Browsers/Devices. You could check the aspect ratio, too. Take a look at Richs mobile Template. Second: There is a WebAPI for Device Orientation and Device Motion. But support is limited, too: https://developer.mozilla.org/en-US/docs/Web/API/Detecting_device_orientation I've used Device Orientation and some other APIs for a #altctrl Jam entry this year: http://www.altctrlgamejam.com/games/541d471864ff4f2c5a10cc8e The video shows, it works perfect on a FirefoxOS device. Everything is implemented with Phaser. Sources here: https://github.com/appsbu-de/ambilander Maybe this helps a bit. Riddik 1 Link to comment Share on other sites More sharing options...
Riddik Posted October 27, 2014 Author Share Posted October 27, 2014 It may be helpful. Thank you very much! upd:Let me see mobile Template by Rich, please. I could not find. Link to comment Share on other sites More sharing options...
spencerTL Posted October 27, 2014 Share Posted October 27, 2014 This is the GitHub link to the Phaser template directory:https://github.com/photonstorm/phaser/tree/master/resources/Project%20Templates Riddik 1 Link to comment Share on other sites More sharing options...
Riddik Posted October 27, 2014 Author Share Posted October 27, 2014 Ok, thanks) Link to comment Share on other sites More sharing options...
Recommended Posts