• Content Count

  • Joined

  • Last visited

  1. Thanks I think that's close to what I am after and makes perfect sense. I have now updated my code and it is working correctly.
  2. Sorry I should have put an example in of the actual game to help. The starting point is here: http://eg-family.zz.mu/games/shopdash/game.html I have now not added the player to the physics engine and have just hooked up the cursor keys. From the example I am setting the players velocity but once I hit one of the arrow keys they it just continues in the same direct till it hits the bounds. Thanks for your help, I've only just started on the forum too and so far along with the example it has all been very helpful!
  3. I am about to start work on a top down game which sees the player moving around the screen with a view from above. So far in previous games I have only used the arcade physics and looked at platform style games. I am a complete newbie and am now venturing out of tutorial land. I have little knowledge of any of the physics engines (including arcade). I only need basic physics for movement and collision. If I create the player using arcade physics when they start to move it treats it like a front on view so the player drops (simulated gravity). I need to just allow the player to move freely from a top-down view (see attached image for rough idea). Please can anyone help suggest the best way forwards? Thanks
  4. Thanks for your help fariazz, working perfectly now.
  5. Sorry I am a complete noob with Phaser so please excuse my lack of knowledge. I am trying to create my first game using states (I have completed the phaser tutorial). I have created 5 js files one for each state all declared as below: /// <reference path="phaser.js" />/// <reference path="load.js" />var ABC = {};ABC.Boot = function () { };ABC.Boot.prototype = { preload: function () { }, create: function () { }}I have created a game.html file as below: <!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>Water!</title> <script type="text/javascript" src="js/phaser.js"></script> <script type="text/javascript" src="js/boot.js"></script> <script type="text/javascript" src="js/game.js"></script> <script type="text/javascript" src="js/preload.js"></script> <script type="text/javascript" src="js/title.js"></script> <script type="text/javascript" src="js/load.js"></script> <script type="text/javascript"> (function () { var game = new Phaser.Game(800, 600, Phaser.AUTO, 'gameContainer'); game.state.add("Boot", ABC.Boot); game.state.add('preload', ABC.Preload); game.state.add('title', ABC.Title); game.state.add('play', ABC.Play); game.state.start('Boot'); })(); </script></head><body></body></html>I am getting the following error when trying to start up the game: Phaser.StateManager - No state found with the key: Boot Please can someone let me know where I am going wrong? Thank you