• Content Count

  • Joined

  • Last visited

About DevJ

  • Rank

Profile Information

  • Gender
  • Location

Recent Profile Visitors

693 profile views
  1. Are you resetting the level's variables on level finish? I mean, since you have completed the level before, it could simply be loading the state, checking if you have completed it, and jumping to the next state if so. Too see if this is the problem jump to level 5 without completing level 1 and then go back and see if the problem persists.
  2. Set it to Phaser.CANVAS instead of Phaser.AUTO in the following line and see if it makes any difference: var game = new Phaser.Game(width, height, Phaser.CANVAS, 'test', null, false, true);
  3. Have you tried using "game" instead of "this" like so: game.state.start('i06_l15'); This is what I am using to return to a previously loaded state, not sure if it makes any difference.
  4. I've also had this problem in the past, which I couldn't solve: everything works fine at first, but when the game state is reset, nothing works but gravity and everything just goes off the screen. At the time I thought we were doing something wrong code-wise and after a few days with our heads around the code, we eventually gave up from using p2 physics on our project. I wonder if this has a quick fix on our side...
  5. I have also noticed this. I wonder why my smartphone (which is pretty damn bad) runs games like Pokemon Shuffle and Temple Run 2 (which even has 3D graphics and all) smoothly, and can't run a simple HTML5 canvas game as smoothly (really depends on the game). If it runs on my phone though, it runs everywhere (obviously flawed logic, but pretty much true since it's so bad and small in screen resolution).
  6. Use a simple setInterval to loop your sound. It'll play every 1000ms. To stop playing the sound, use clearInterval. Note that you might have to set your looping parameter to false when you add the sound to the game. setInterval(function(){; }, 1000);
  7. Not if you compile it into a fullscreen app with PhoneGap or such? Correct me if I'm wrong.
  8. I'm not a Phaser expert so I'm not sure if this would work but you could try writing a function which constantly detects if the player has rotated his phone and if so, scale the canvas accordingly. Have the program collecting game.width and game.height at the beginning of your run and play with those variables. /*Create theses two vars in the beginning of your run*/ var initialGameWidth = game.width; var initialGameHeight = game.height; function detectRotation(){ if(if game.width != initialGameWidth && game.height != initialGameHeight){ /* this means the player will have turned his phone */ game.width = window.availWidth; game.height = window.availHeight; /*if the above doesn't work, try to invert those so height becomes width and vice-versa*/ } }
  9. Couldn't get past Pancho on Tournament Mode. This game's fun as hell (playing the browser version here).
  10. Sorry for wasting your time, I eventually figured out I wasn't loading the right Phaser.min.js and it was version 2.0.
  11. Good morning, I've been trying to load a video on my load.js file, from the assets folder using: preload: function(){'backMenu', 'assets/backMenu.mp4');} Like they do here: But it doesn't work. The console throws the error: Uncaught TypeError: is not a function I'm using Phaser 2.4.7, any ideas what could it be? Thanks.