• Content Count

  • Joined

  • Last visited

  • Days Won


darkraziel last won the day on August 19 2019

darkraziel had the most liked content!

About darkraziel

  • Rank
    Advanced Member
  • Birthday 04/09/1988

Profile Information

  • Gender
  • Location
    ViƱa del Mar, Chile

Recent Profile Visitors

1003 profile views
  1. I had to do exactly this for a project I worked some time ago, and ended up going with the Rectangles approach. My game objects were classes that extended Phaser.Sprite and each of them had a Phaser.Rectangle that updated it's position on update. this.rectangle.x = this.sprite.x; this.rectangle.y = this.sprite.y; And then when I needed to check for collision I just used Phaser.Rectangle.intersects(), even with a lot of sprites on screen (around 45-50) it worked like a charm.
  2. Just Edge. Chrome, Firefox, Safari and Opera work perfectly.
  3. Hi everyone, I just tested the keyboard input examples of Phaser on Microsoft Edge and it doesn't work as it should. Sometimes it won't detect key presses or keep a key pressed down even if I already stopped pressing it. I had the same problem with a game we're developing and I even noticed that some of the old games we've developed have the same problem when testing on Edge. Has anyone else had this problem? Should I raise it as an issue on the repository?
  4. The update method itself is empty and meant to be overriden, either by assigning a function to the sprite update (like in your example) or by extending the Sprite class for personal use. So if you ever add override the update method you can then set it to return if exists, alive or visible is false, depending on what you need.
  5. I asked this to Rick some time ago, specifically why is it that setting exists to false (which kill() also does) won't stop the update method. This was his answer:
  6. I just wanted to confirm that lucidmoon solution works perfectly. Thanks =)
  7. Nice, I should test that to see if it works. I have another question though, is it possible to play the animation in reverse? for example by settings speed to a negative value?
  8. Hi all, I have a simple question about phaser animations. Right now I'm working in a game where I animate some spheres that roll down a road. The animation frameRate depends on the sphere "speed", so if the spheres go faster the animation will move faster too and so on. I'm currently changing each sphere frame manually on the update method. To do this each sprite has an array with the frameNames. for (i = 0; i < 80; i++){ this.redOrbFrames.push('orb_red_' + i +'.png'); this.greenOrbFrames.push('orb_green_' + i +'.png'); this.blueOrbFrames.push('orb_blue_' + i +'.png'); this.goldOrbFrames.push('orb_gold_' + i +'.png'); this.purpleOrbFrames.push('orb_purple_' + i +'.png'); this.calypsoOrbFrames.push('orb_calypso_' + i +'.png'); this.blackOrbFrames.push('orb_black_' + i +'.png');}sphere.orbFrameNames = this.redOrbFrames.update(){ i++; this.frameName = this.orbFrameNames[i];}Something like that. I wanted to know if there's another way to do something like this by using phaser animations and if it would be more efficient performance-wise. Excuse the poor english and thanks for any help provided.
  9. Thanks for this answer. I ended up using this method and then adding the tile sprite to a group that scales itself if the window is resized. Works perfectly.
  10. I ended up using scale and re-sizing in case the world size changed.
  11. Thanks a lot for the answer Rich, I'll just keep using Sprites then.
  12. I wanted to avoid drawing a rectangle using graphics since it slowed performance on an specific device. But I already found another way to do it. Thanks.
  13. Let's say I have a 1x1 pixel black image that I want to cover the entire screen with. How could I do this without modifying its scale property? I want to use this 1 black pixel to create a black transparent overlay for popups in my game. Any help is appreciated.
  14. In the phaser docs I can see that the biggest difference between Sprite and Image is that you cannot animate or add a physics body to an Image, but in Image properties you can see an animationManager. I'm a little confused about this. Anyone?
  15. I had some performance problems and was trying to find out what was causing it. Since I had a lot of sprites on screen I thought that maybe this method wasn't the best, though it seems the problem was elsewhere.