Jump to content


  • Content Count

  • Joined

  • Last visited

About Arcanorum

  • Rank
    Advanced Member

Contact Methods

  • Website URL
  • Twitter

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

2393 profile views
  1. var _this; GameServer.prototype = { constructor : function(){ _this = this; }, onConnection : function(socket){ socket.on('new_player', _this.onNewPlayer(data)); } } I know it seems like a hack, but it is the cleanest solution that I use and lets me get stuff done easily.
  2. What will happen to the forums (and discord/slack) when Phaser 3 gets closer to release? I'm already seeing discussions pop up about Phaser 3 here and there. Separate subforums/channels for v2.x and v3? What is it that you aren't a fan of with the v2 docs? I think they are great. What plugins are planned for after release?
  3. You need to study the examples more closely. https://phaser.io/examples/v2/sprites/extending-sprite-demo-2 The order of how you assign things to the prototype matters. This is what your objects should look like: Item = function (game, x, y, sprite_name) { Phaser.Sprite.call(this, game, x, y, sprite_name); game.physics.enable(this, Phaser.Physics.ARCADE); // Bunch of properties }; /** * Assign the prototype of this object to the same prototype of Phaser.Sprite. * Do this BEFORE adding or overriding any properties on the prototype object * for this object, otherwise t
  4. You will want to use some build tools that handle things like minifying code for smaller files, and merging files for fewer file requests from the server, to improve load speed. Use a texture atlas if you aren't already, and check out this tutorial http://phaser.io/tutorials/advanced-rendering-tutorial. I've found that WEBGL_MULTI works a lot better on desktop than mobile, so if you are having FPS trouble, this should work well for you.
  5. Phaser Editor sounds like what you are looking for. http://phasereditor.boniatillo.com/
  6. @Ulbast You could use https://phaser.io/docs/2.6.2/Phaser.Sprite.html#lifespan as an alternative to checkWorldBounds.
  7. How did this end up on the game showcase bar?
  8. Rendering is usually the big killer when it comes to performance. This should show you some ways to improve it. http://phaser.io/tutorials/advanced-rendering-tutorial
  9. Also, from your code, you seem to think things are a display object when they aren't. Your variable/property names are misleading. When you do if (blue_keyMap.atk.isDown) { this.blueSpriteDo.atk(this.redSpriteDo); //the parameter for the atk function //passes the opposite player, that becomes the opponent } Passing in this.redSpriteDo is not passing in a display object. It is passing in the object returned by the constructor function SpriteDoObj. Calling SpriteDoObj doesn't create a display object for you. You already have your display object when you call
  10. If this code is arranged like this in the same scope, then that might be the problem. this.blueSpriteDo = new SpriteDoObj(blue_player); this.redSpriteDo = new SpriteDoObj(red_player); //.. also the players are made like this: this.players = this.game.add.physicsGroup(); var red_player = this.players.create(window.innerWidth, this.world.height - 490, 'red_spritesheet'); var blue_player = this.players.create(0, this.world.height - 490, 'blue_spritesheet'); It looks like you are trying to pass blue_player as an argument to SpriteDoObj before it is defined.
  11. Same. It seems like if WebGL (without MTB) runs poorly on whatever device, then that is likely due to the graphics hardware of that device not being good enough, though this still seems weird as it isn't like we are doing anything crazy like 3D with it. I do get much better performance on desktop using MTB compared to without it, but on desktop what does it even matter, since it can probably handle anything you throw at it anyway. If canvas is more CPU dependent, then I think it would make sense for mobiles to perform better. I just force canvas for everything now, as it mu
  12. Will this actually be running in the browser on mobiles, or will you be packaging this up as a native app?
  13. I keep randomly dieing in the air when I jump on the second level.
  14. 10 years of programming experience, yet you still don't comment your code?
  • Create New...