• Content count

  • Joined

  • Last visited

About Iszard

  • Rank
  • Birthday 11/25/1981

Profile Information

  • Gender
  • Location
    Mississauga, Ontario, Canada
  • Interests
    Developing entertaining software
  1. Emitter Explosion not exploding

    Hey Community, I just updated from 2.5.0 to 2.7.8 and now my emitters don't explode anymore. They produce there particles and them which live for there desired lifespan but don't move anymore. var em = game.add.emitter(0, 0, 10); em.makeParticles('SBCollectibles', ['StarOrangeParticle.png', 'StarPinkParticle.png', 'StarYellowParticle.png']); em.setXSpeed(-300, 300); em.setYSpeed(-300, 300); em.gravity = 500; em.start(true, 500, null, 10); I rolled back to 2.5.0 and work as expected
  2. P2 Static body collision issue

    I've gone with the solution of setting the enemies as static = true while leaving the bullets as none static bodies. Upon collision detection I set: bullet.angularVelocity = 0; bullet.rotation = 0; And the bullets no longer act undesirably when replaced from pool.
  3. Immovable objects

    Done all this reading already but no need to further this topic (aka topic hijacking)
  4. Immovable objects

    can you help with overlap then with pixel perfect collision detection because as fair as I know it's bounds are the image rect.
  5. Immovable objects

    without duplicating posts I can easily direct you to my latest post on the subject:
  6. Immovable objects

    then object not immovable is still rotated or altered and if in a pool with maintain that when reused although params such as rotation or angle still return 0
  7. Immovable objects

    I'm running into the same problem with static / kinematic bodies. Personally I want near pixel perfect collision detection without transferring velocity or any means.
  8. P2 Static body collision issue

    Heyo, I'm currently building a side scrolling space shooter and desired to have pixel perfect collision detection to allow a better experience dodging bullets and correctly colliding with enemies. To do this I used the P2 engine with loadPolygon functionality. However I have run into a problem were I can't stop the physics (velocity) from transferring from my bullet to my enemy and/or rotating either of the objects which becomes more noticeable when re-using pools of objects (although the objects in question retain a angle/rotation of 0). Any solutions I have come across to make the bullet and enemy static has end up with a no collision detection scenario. -Once you set two different body's to static = true they no longer fire collision events. -If body's kinematic = true then the same happens with no fire collision events. I've reviewed the examples page, however the kinematic and/or static demo's only work if your not kill/reset 'ing the objects. Once that happens there is no collision or in my case the player is auto firing currently so it's bullets are kill/reset before enemies are even placed on the screen. Much googling has come across postings of similar issues in the 2014 and 2015 and I was wondering if there is any resolution to this problem yet? Having two static/kinematic P2 bodies collide without transferring any velocity to each other, just need a collusion detection event for firing custom logic (kill bullet, damage enemy); Snippet of working example prier to static/kinematic setting: (similar code is used for enemies / player and enemy bullets and collision work 100% until static/kinematic is turned on to all parties)[this.player], true); this.player.body.clearShapes(); this.player.body.loadPolygon('enemy_physics', 'player'); // this.player.body.static = true; // this.player.body.kinematic = true; this.player.body.setCollisionGroup(this.playerCollisionGroup); this.player.body.collides([this.enemyBulletsCollisionGroup, this.enemiesCollisionGroup], this.killPlayer, this);
  9. Erro with bitmapText

    in 2.4.6 phaser there is an error with bitmapText lines 46318 - 46320 bitmapText: function (x, y, font, text, size, group) { if (group === undefined) { group =; } return group.add(new Phaser.BitmapText(, x, y, font, text, size)); }, It does not suppoer the 'align' param as documented. From the doc the following should be the correct code. bitmapText: function (x, y, font, text, size, align, group) { if (group === undefined) { group =; } return group.add(new Phaser.BitmapText(, x, y, font, text, size, align)); },
  10. Is it possible that when we call tween.stop() that we can have the tween jump to the end/complete the tween? Further more can we be able to jump to the end of the following chained tween(s)? In this case I have a tween to scale up chained with a tween to scale back to normal. Wish we had a Tween.fromTo(obj, param.from, param to, ...). However I need to be able to handle the edge case that if the tween needs to be stopped that the object being tweened can be left in a state it should have been if the tween played out to the end. forceCompletion. I understand that I could write an onComplete and fire it with a tween.stop(true) and then force the object to the set params I wanted but this gets redundant and slow to write this into every possible tween created for edge cases. However in this case if TweenA (scaling up) has an onComplete just encase to reset params. Then that onComplete will fire prier to the chained TweenB (scale down) which then will cause the Tween to skip the effects of scaling down because on onComplete I have already reset the params. Suppose this has already been requested as well but how about the tweenManager having a getTweens(obj) which can check the list of tweens for any tweens effecting the object in question and return it in an array? Update: I've updated my phaser library from 2.4.4 to 2.4.6 and tween.stop(true); does fire the next chained tween in this case TweenB the scale down tween. Which then needs it's own tween.stop(); it is possible to tweenA.stop(true); tweenB.stop(true); and have an onComplete of tweenB to reset the values if I once again submit to having to record and set the desired params of the final desired state.
  11. Font Problems

    This is still happening even with 2.4.4
  12. pixelPerfectOver causing 'cross-origin'

    The server I was using was a local Vagrent - VM - Ubuntu running apache, However the issue was resolved, it's actually buried in the phaser.js plugin in the comments about the issue and the resolution steps. Just posting the resolution for ease of future devs
  13. pixelPerfectOver causing 'cross-origin'

    Resolve the issue by adding : this.load.crossOrigin = 'Anonymous'; To the create: function() {} of my first state. "Boot.js" as per the Phaser Game Template for anyone using that.
  14. pixelPerfectOver causing 'cross-origin'

    So I can load and display the image but i don't have permission to pixelPerfectOver it? Please explain. Also please read the question as I stated that Access-Control-Allow-Origin "*" was already set
  15. Hey Phaser's, I'm having a problem were I am setting up input events on a sprite and if I turn on pixelPerfectOver then I get a nasty crash when I touch the sprite: "Uncaught SecurityError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data." This does not happen with loading assets, so its not a loading issue which all web search results of this error indicate. My access is given in htaccess file. There is no problem if I turn pixelPerfectOver off. The pixelPerfectOver setting is the source of this issue. The following example is modified from my source to cut out the unrelated fat. function PurchaseView() { this.purchaseCmp_group =; var i, iTot, bPosX = [35, 265, 35, 265], bPosY = [75, 75, 305, 305], cBtn; iTot = bPosX.length; for (i=0;i<iTot;i++) { cBtn = game.add.sprite(bPosX, bPosY, 'BuyCards', 'BuyCard'+(i+1)+'.png', this.purchaseCmp_group); cBtn.inputEnabled = true; cBtn.input.pixelPerfectOver = true; // <-- commenting out this line will remove the error cBtn.input.useHandCursor = true;, this); this.cardSelAr.push(cBtn); } }; PurchaseView.prototype.btnUp = function(sprite, pointer, isOver) { if (isOver) { console.log('Correctly Touched'); } };