Search the Community

Showing results for tags 'phaser'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 3,343 results

  1. Nebulocity

    Question about documentation

    I'm looking at the Sprite class, specifically the Lifespan property. I thought to add it to an enemy with 1000 set as the lifespan (which I understand to be in ms), but it didn't die after the time was up. Could someone please explain how one generally goes about unraveling the mysteries locked in the codex of the documentation? ;-) The URL to the property is: The URL to the definition in the Sprite.js file is: I don't understand how to implement this, and it's a problem that I find myself having every time I go looking through a class: I find a property or method that I want to play around with (to learn), and it ends up not working. But looking further into it (into the actual definition itself), it either says nothing about it, or is too archaic (to me) to understand. For example, the source for Lifespan (as noted in the docs) starts on line 76. Here is what that section (and subsequent lines) states. Nothing about it gives any indication of how to use it. The only thing that I can understand is that it's dealing with displaying a frame...which it also says in the comments ;-) /** * @property {Phaser.Frame} currentFrame - A reference to the currently displayed frame. */ this.currentFrame = null; if (key instanceof Phaser.RenderTexture) {, key); this.currentFrame =; } else if (key instanceof Phaser.BitmapData) {, key.texture, key.textureFrame); this.currentFrame = key.textureFrame; } else if (key instanceof PIXI.Texture) {, key); this.currentFrame = frame; } else { if (key === null || typeof key === 'undefined') { key = '__default'; this.key = key; } else if (typeof key === 'string' && === false) { key = '__missing'; this.key = key; }, PIXI.TextureCache[key]); if ( { this.animations.loadFrameData(; if (frame !== null) { if (typeof frame === 'string') { this.frameName = frame; } else { this.frame = frame; } } } else { this.currentFrame =; } }
  2. Karma Octopus

    Monster Collector

    Hi all. This is my first ever HTML5 game. Your goal in the game is to collect as many monsters as you can during three rounds. Different monsters are worth different amounts. Below are some screens. I would love your feedback on this game. I always strive to create the best games possible. If anyone is interested in a license of the game you can PM me or send an email to contact at Game link:
  3. DWboutin

    Button animation

    Hi, I want to create an animated button, how can i do it? Can i set some animations on the over, up and active states of the button? Thank you
  4. Benjans

    Performances questions

    Hi everyone, Just begining with Phaser, i love the phylosophy and how it works For my game, I'm drawing a big tilemap (100 x 100), adding static objects with no problems. Then I want to add moving objects, so I create a group and add sprites to the group, with a simple velocity. And... it doesn't work very well. It seems like each time a new sprite is attached to the group, the animation stops, then restart, so it's not smooth at all Maybe I'm doing something wrong, but I don't think so (i'm properly destroying objects). I tried with Tweens too, but the result is the same. You can check it here : Thank you for your help guys!
  5. Hey, We have a 3/4 perspective game running at 800x800 with about 50 32x32 sprites on the screen at one time. After loading our game, within about 30 seconds with movement of our character, the game starts to bog down, shortly hangs, and we receive the error in the Javascript Console: Cannot set property '__next' of null (line 4197 of phaser.js) We are running the dev version of phaser, but have tried with the stable version with no success either. I suspect we just need to optimise our game, but it doesn't seem to be overly complicated - we are surprised that it starts to bog down with only 80 or so sprites on the screen. Any help would be greatly appreciated Thanks
  6. Please tell me, how I can use P2.js physics in phaser framework? Whether there is an example of this? I have seen what p2 files included in sources framework? but I don't know how to call P2 physics in phaser. I would be very grateful for the help)
  7. 2D Heroes

    My Super-Generic Newbie Games!

    Hey guys! I'm just getting started in HTML5 development so I thought I'd join up and post what I'm up to. In the last week I've created two super small, generic games, using two different frameworks. They're extremely basic, as I'm still learning the ins and outs of developing plugin-free games! Pixols - TypeScript + Phaser Link: BoxBot - Haxe + OpenFL Link: Feedback is more than welcome, and if you have any guidance for a newbie like myself, I'd love to hear it. Cheers!
  8. Well, I found this just today and didn't remember seeing it in the forum. There is no talking or whatever but hey it's coding experience and it's in nice quality. So if you have intereset and time can check it. Game Development p.s. I don't have contacts with author but the videos are public, and I hope he doesn't mind posting them here.
  9. Hi, I want to change temporary my main character's spritesheet by another one on overlap. When my character overlap a NPC, he will take his spritesheet and inherit of his animations. I tried to change it with Sprite.loadTexture, but it glitch between the frames. How can i handle this? Thank you
  10. Here is my first try at HTML5 games, built in few weeks with Phaser JS for GitHub Gameoff. Personally, the best "feature" must be randomly generated level, there are couple of errors / corner cases that could do with extra polish. I was planning to add changing level graphics (ie if timer runs out, the level becomes covered with snow etc), but unfortunately ran out of time. Sprites are mine, but all the tiles are from In case anyone feels like giving some coding pointers, the source code is a bit of a mess, a bit of a quickly bash out some code and hope for the best. At first I used global variables to deal with everything, which is OK for simple example program, but not really a working game. Once I got to the enemies, everything is held in individual objects along with helper methods that deal with AI or death animations etc. Links Play [] Source code [] Conclusion I found Phaser JS to be extremely fitting with my own coding style, and in the end I feel pretty confident on how I would tackle my next HTML5 game. On the negative side, I'm not as strong in game art than I assumed I was and it was much harder to actually finish a simple game than it seems when looking at stuff other people put out. On to the next challenge?!
  11. mandarin

    Group trouble or Pixi?

    Hi. I use Phaser 1.1.3, and this code gives me this error: Uncaught TypeError: Object TurnGroup has no method 'addChild' at line 10897 Here's the code: <!DOCTYPE html><html lang="en" xmlns=""><head> <meta charset="utf-8" /> <script src="js/phaser.min.js"></script></head><body><div id="gameContainer"></div><script type="text/javascript">SQ = {};SQ.Game = function(game) { = game;};SQ.Game.prototype = { create: function() { this.turn = new SQ.Turn(this); }};SQ.Turn = function(sq_game) {,, 'TurnGroup', true);};SQ.Turn.prototype = Object.create(Phaser.Group.prototype);SQ.Turn.prototype.constructor = SQ.Turn;window.onload = function() { var game = new Phaser.Game(288, 512, Phaser.CANVAS, 'gameContainer'); game.state.add('Game', SQ.Game); game.state.start('Game');};</script></body></html>
  12. DWboutin

    Sprite body size transform

    Hi, I got my sprite, who is 58 x 74 and i set it body at this.sprite.body.setSize(30, 63, 6, 11);It's a character, so when i press the left button i scale it at -1 in X. But i don't know how i can adjust the body size. There's a screenshot of both position, how can i adjust the left one? Thank you
  13. All of the attached files within are located in my www root directory wamp folder. phaser.min.js is also included but I am unable to upload it to the forums. Anybody else having this problem? aliengame.html
  14. jonbon

    Retina Graphics

    Hi, Does Phaser support supplying high resolution graphics (@2x) for retina displays? I cant find any information on this. If so, how do you go about implementing this? Thanks
  15. playh5

    Setting full screen in Phaser

    Hi!, I'd like to ask why setting full screen in Phaser can only be called using the input from the user game.input.onDown.add(gofull, this);function gofull(){ Phaser.StageScaleMode.EXACT_FIT = 0; game.stage.scale.startFullScreen(); alert('full screen');}When calling the function gofull() in the create function or update function, the game doesn't go full. Thanks in advance!
  16. It seems that the TypeScript definition for Phaser.Animation.generateFrameNames is missing. I think that's the problem since the function seems to be in the Phaser JS but I can't use that function in TS.
  17. DWboutin

    On key up event or on release

    Hi, I want to make my character jump, but stop the acceleration in Y when i release the up key. How can i do this? (sorry for the noob question) Thank you
  18. woratana

    Timer Countdown in Phaser ?

    Hello, I would like to know how hard is it to make an accurate timer count down. For example, count down for 1 minute. I would also need to tell player the time left every second. I have heard that setTimeout may not be accurate. What is the best way to do this?
  19. lrodriguez

    Mode Landscape

    I would like my device always display mode landscape the game that I do with phaser, ie that no matter what position move the device, my game always see in landscape position, the question is phaser has some functionality for it? . otherwise as always manages to force the game in landscape mode
  20. Hi, How can i play right with the acceleration of the velocity? In this tutorial (really well done), but it only change the velocity. How can i accelerate it the way a race game works? I want to accelerate it from 0 to a maximum number, or it's current value to a maximum number. How can i do this? What's the best way to handle it and create a maximum speed? Thank you very much guys
  21. DWboutin

    Enhanced physics

    Hi, Is there a way to enhance the framework's physics? like if i have a platform who fall on another one, but they touch just a little, I want the falling one to rotate like real gravity collision. For now, it just stop falling and stay horizontal. How can i do this or how can i enhance it (tutorial on how to create a pahser plugin or extension maybe)? Thank you
  22. Hello, I have found that some website e.g. is able to download multiple SVG, PNG, JS files simultaneously (You can use Google DevTool in 'Network' tab to see this) Currently the preload function in Phaser seems to download one file at a time which make loading game slow for graphic/audio heavy game. Is there a way or future plan to make the preload download multiple files simultaneously?
  23. I have downloaded Phaser from github and I saw all the examples and tutorials there are using phaser.min.js or phaser-example.js. However I saw in the src folder there are a ton of js files. My question are to what extend I can keep using phaser.min.js? And when it is necessary to import those js files from src folder? I am sorry if this obvious question. I am new to js and just moved from flixel. I would be grateful if someone would like to explain me.
  24. Hello I tried installing Phaser on localhost and tested example games. Breakout and Tanks game background seems to be shaking all the times (tested in Mac OS Chrome and Firefox). In Chrome, I also experience blinking background in both games. What is the cause of this issue and is it possible to fix this in the current version of Phaser? *UPDATE* After I tried other demos, it seems to be 'Tiling Sprite' that cause the problem. Not sure if it is problem with hardware? *UPDATE 2* Just download latest version of Phaser and this problem should disappear.
  25. Hello, I finish making a simple game today with Phaser: I found that in some desktop or mobile device, the game lag a little bit after I press 'PLAY AGAIN' button. I think this is because I have to clear out some variables but I'm not sure how to do this in Phaser. So my question is: Does anyone has good tips for memory management / clear out variables data in Phaser? Most elements I used in my game is group, sprite, text, and sound.