Arcanorum

Members
  • Content count

    156
  • Joined

  • Last visited

About Arcanorum

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    waywardworlds.com
  • Twitter
    waywardworlds

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

1,077 profile views
  1. Phaser 3 Beta 1 Released

    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?
  2. Issue with Inheritance, TypeError : this.onTextureUpdate

    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 they will be overwritten. * * If you do Item.prototype = ... at the end, then the prototype property of * Item will reference a completely different object than the one that you * added .update to. */ Item.prototype = Object.create(Phaser.Sprite.prototype); /** * It doesn't really matter where you assign the constructor, as long as it is * after the declaration of the Item function. */ Item.prototype.constructor = Item; /** * Now that the prototype of Item is using the prototype of Phaser.Sprite, we * can override any functions that Phaser.Sprite has, such as .update, .render, etc. */ Item.prototype.update = function () { // Bunch of things };
  3. Releasing a Phaser game

    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.
  4. Phaser Editor sounds like what you are looking for. http://phasereditor.boniatillo.com/
  5. Low fps... is my game so advanced?

    @Ulbast You could use https://phaser.io/docs/2.6.2/Phaser.Sprite.html#lifespan as an alternative to checkWorldBounds.
  6. Error during chrome version change

    How did this end up on the game showcase bar?
  7. Finished, playable game with link, but code....

    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
  8. This is ongoing. https://github.com/photonstorm/phaser-ce/issues/198
  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 var red_player = this.players.create( ... ); That is the display object that you should be using, and the display object that the overlap function is expecting. Seeing as you store a reference to the red_player object inside of function SpriteDoObj(player){ // global function this.player = player; ... } you should pass in that .player property as the argument for the atk function, like so this.blueSpriteDo.atk(this.redSpriteDo.player); Your problem seems to be caused by kind of messy code. I would recommend adding the functions you want the players to have (such as atk) onto the player objects themselves. I doubt you need this extra SpriteDoObj wrapper around the actual display objects.
  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 much more consistent and reliable. =/
  12. [Phaser] educational game to teach programming

    I keep randomly dieing in the air when I jump on the second level.
  13. Latency issues with Node JS game and VPS

    10 years of programming experience, yet you still don't comment your code?