Jump to content


  • Content Count

  • Joined

  • Last visited

About FakeWizard

  • Rank
    Advanced Member
  • Birthday 04/07/1985

Profile Information

  • Gender
  • Location

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. hah,this had me chuckle. Like seriously, none of this would cause this , except for the browser. .. But even that shouldn't be the case. Have you checked the playground with different browser? Is it also lagging? If so ,which browser( including version) have you tried? Try checking the processes (Crtl + Alt + Del ) , open Task Manager and see what's consuming the most CPU, RAM .. In case it's your browser then : Disable all the active extensions try to capture the page load using the Dev Tools in the Performance section (Chrome).. once done it should provide y
  2. Your code will always be accessible to the client, neither obsfucating nor uglifying prevents users from altering/tampering with your code. The uglifying in fact, only slows down the process of understanding your code. Therefore instead of spending too much time on encrypting the code on client side, you should work on the backend code to ensure the data form client are accurate.
  3. what can yoiu see in your console? any errors?
  4. have you tried defining this.input.maxPointers = 1; in your game boot state? Ahh never mind..just realised it's not related to Phaser...sigh
  5. same here, unable to switch to fullscreen on my Huawei Honor 8, Android version 7.0, Chrome v.57.0.2987.132.
  6. the js file where you have the function B defined has to be loaded before the other file where you;re using it. /// fileA.js function A (){ game.add.sprite = sprite1(some.x, some.y) B(); } /// fileB.js function B (){ game.add.sprite= sprite2(sprite1.x, sprite1.y); } So in your index.html file you just do <script src="fileB.js"> </script> <srcipt src="fileA.js"> </script>
  7. it's very easy to cheat in this game..you put too much trust on client-side ;] .. Sorry for trolling the players (or AI ).. was able to shoot like 100 bullets at once :] But apart from that it's really nice game, works pretty well :]
  8. It's because you're passing the methods in an object, in such cases these methods will always refer to it's parent object. Which in this case is Phaser.Game. And this.MyColor variable doesn't exist there. let preload = function(){ console.log( this ) //// points to Phaser.Game } var game = new Phaser.Game(1200, 600, Phaser.AUTO, 'content', { preload: preload }) I'd recommend using ES6 way of extending Phaser classes , it's less confusing IMHO. class BootState extends Phaser.State { init(){ this.myColor = Phaser.Color.createColor(255,255,0); } preload(){ this.gam
  9. I know that there is a separate method Sprite.resetFrame() which resets the texture's frame to default. But I just though it may be easier if it was all done implicitly while calling the Sprite.reset() method. So I'd just add another optional parameter to the reset method, and then based on this parameter call or not call the resetFrame method. reset( x: number, y: number, health?: number, resetFrame: boolean ): Phaser.Sprite;
  10. the code seems ok, can you see any errors in your browser's console? Are you testing this purely in your browser or from a http server?
  11. you have to define the functions (create, update, reload ..) inside thier appropriate js file and load them before the game.js... No need to define the functions in game.js otherwise you'll overwritte them.
  12. It's pure guess, but I think, it could be cause you're adding an existing instance of object which is currently being initialized. Perhaps changing the order a little bit may help here. class Player extends Phaser.Sprite { constructor(game, x, y) { super(game); this.playerBody = this.addChild( game.add.sprite( x, y, 'atlas1', 'dot' ) ); this.playerBody.anchor.set(0.5); this.inputEnabled = true; this.input.enableDrag(); this.enableBody = true; this.
  13. I don't see anything dancing there, can you be more specific? Although I've simplified your animation loop by a little bit. https://jsfiddle.net/7dv61c63/3/
  14. not sure why but the snake blips every time I press a cursor key. Apart form that game looks good
  • Create New...