Ross Posted April 7, 2014 Share Posted April 7, 2014 Hey all, Ok, it's not really a game, but in anticipation of building the game I've built some controllers and a way to move background images (parallax). I've put together a file to test them both, and both work just fine when viewed on the computer, but when viewed on the iPad the program gets stuck on the main menu. When I click the option on the main menu, it looks like the state is getting called (I've put some "log" messages in the code and the do show up in the console), but the screen does not draw the new state. I'm at a loss of even where to look. The link to the samples is: http://thelab.nonsensegames.com/tests/and I have attached the development files to this note. Just for reference, when viewed on a computer the joystick (control on the left) is controlled with the arrow keys and the button pad (control on the right) is controlled with the w,a,d,s, space key. When viewing the "controller" section the "w" key makes the little guy jump. When viewed on the iPad, both controllers are touch controlled. If there is any other information I can provide, please let me know. I really appreciate any input. Thanks,Rossdevelopment.zip Link to comment Share on other sites More sharing options...
Pedro Alpera Posted April 7, 2014 Share Posted April 7, 2014 I have made a sample project with the yeoman phaser generator ( http://codevinsky.ghost.io/phaser-tutorial-getting-started-with-generator-phaser-official/ ) Look how the "start" button is made, it works on the iPad. The link to download the sample project is http://cl.ly/2Y191n313E01 Link to comment Share on other sites More sharing options...
adamyall Posted April 7, 2014 Share Posted April 7, 2014 I opened it up on my Android phone and it seems to be broken similarly. I am getting:"Cannot read property 'x' of undefined" joystick.js:215"BasicGame is not defined " ~Boot.js: 75 and 83 Maybe that will help point you in the right direction. Link to comment Share on other sites More sharing options...
Ross Posted April 7, 2014 Author Share Posted April 7, 2014 adamyall, that was it, thanks!! the Joystick mobile calculations were still using the ".center.x", which was deprecated in 2.0. Thanks, so much for that info. Ross adamyall 1 Link to comment Share on other sites More sharing options...
Recommended Posts