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
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 3,062 results

  1. Hi guys! I'm developing a game with Phaser 2.6.2 and it properly works on PC desktop (every browser) and on Mac (every browser). On a 2009 Mac laptop with Safari it struggle. On iPhone SE with Safari it give an (for me) inexplicable blank page. I've connected the iPhone to the Mac and launched the web inspector... but it give me nothing, nor the message "Phaser v2.6.2 | Pixi.js v2.2.9 | WebGL | WebAudio |". I've tought that maybe a let game: Phaser.Game = new Phaser.Game(1280, 720, Phaser.AUTO, 'content', { preload: this.preload, create: this.create, update: this.update, render: this.updateRender }); was to big, so I've tried let game: Phaser.Game = new Phaser.Game(800, 600, Phaser.AUTO, 'content', { preload: this.preload, create: this.create, update: this.update, render: this.updateRender }); but I've always the blank page. Any suggestion on what can go wrong with Phaser & iPhone?
  2. We have been building an interactive, game-based test for a client of ours, and we need a developer to pick it up - starting pretty much immediately. The vast majority of the groundwork and design has been completed, and what we have is a SCORM compliant package (built within Articulate Storyline) with a traditional multiple choice course option, and then the same questions as a set of interactive games that have been developed using the Phaser framework. Knowledge of SCORM is essential for this project. Please get in touch with me if this project matches your skillset and you are available for the next 2. 5 weeks. We are based in London, UK, and our ideal scenario is that the dev would work on site, but accept that due to the short notice this may not be possible. Needs to be someone in the UK or somewhere where there is not too much of a time difference (we have a very tight schedule for this project)
  3. Hi all! Winter Sprinter is a simple Christmas themed casual endless dodging game - made with Phaser, as a Christmas promotion for Dodge icicles, collect PC parts, don't die. My top score is about 800... have at it.
  4. Habbo WebGL Game Engine

    This is strictly for educational purposes only Since Flash is pretty much being deprecated in most browsers so is Habbo. Since there's retro versions, most of Habbo's assets are available on the internet. I've been using Pixi for now to create a 2D loading screen, which I did successfully. Then it occurred to me that Pixi is mostly just a renderer, and doesn't support 3D the same way as Three or Babylon does. Problem is that, I found coding of 2D UI elements in both Three and Babylon really difficult compared to Pixi. In Habbo it's really minimal what is going to be 2.5D / 3D as only the rooms, avatars and furni are, the rest is basically 2D GUI. So this is how I've done it for now Some questions: Is Habbo; 2D with projecting, 2.5D or 3D, and would it be enough to use Pixi only? If no: Would it be possible to extend Pixi with Three or Babylon when there's going to be rendered 2.5D /3D objects? If it's truly 2D with projecting, should I just use Phaser instead? What would be best to do?
  5. In my platformer, the player has a number of different weapons (gun, energy blast, homing missile) and there may be a number of enemies (up to maybe 6) who will have one of the same weapons. From my understanding of the weapon plugin and tutorials, I should then be making a different weapon object for each of the players weapons and for each enemy. As I am wanting to attach a particle emitter to missiles I'm then going to extend the bullet class to make a missile. Question 1: I want autofire from enemies to fireAtSprite rather than just fire, I'm assuming the best way to do this is to extend the weapon class and overwrite the fire() method to call fireAtSprite() instead? Or is there a better way? Question 2: Where do I put the collision checks for the bullets? I can see a couple of options but would really like to know the performance implications as to which would be better. 1) Put an arcade collision call in the extended bullet update method to handle hitting scenery and hitting enemies - this seems neat in some ways as the code for the bullet hitting something sits with the bullet itself, however it feels like I'm going to end up with a lot of separate collision calls. 2) Put an arcade collision call in the state update along the lines of: this.enemies.forEach(function(enemy){, this.collisionLayer, this.shotCollisionLayer, null, this);, this.player, this.shotPlayer, null, this); }, this); 3) In the custom bullet constructor, add all enemy bullets to an enemyBulletsArray and collide this in the state update method, this.collisionLayer, this.shotCollisionLayer, null, this);, this.player, this.shotPlayer, null, this); Many thanks, Gordon
  6. Animation working when he want

    Hi, I use phaser 2.6.1. I have created an animation. This work fine but sometimes this not starting. I dont know why. In create() function i add animations for my spritesheet: = game.add.sprite(,500, 'car');'mover',[0,1,2,3],1000, true); = true; When overlap i start the function for animate this game.physics.arcade.overlap(, this.borders, this.canMove, null, this); This is my function },canMove: function(car, objet){ if(crash == 0){ crash = 1;"mover"); console.log("fire") setTimeout(function(){; = 0; crash = 0; },1000) } } When the car overlap a border, this function is start. The console.log() show but the animation suddenly not start. I can restart a lot of time my page, suddenly the animation not starting but the console.log() is show. Thanks for your help
  7. I am making a platformer game with Phaser 2.9.2 where the map is loaded from a JSON file and am having difficulty trying to make interactive tiles which are replaced by a new tile with a collision from a single-direction. I have found a function which allows me to control the direction of collision direction of tiles, so I am hoping to find out how to activate a function and replace individual tiles when there is the sprite and tile are overlapping. I have been thinking of adding the tiles individually in JSON with unique properties and using the .createFromObjects method, but I want every tile to have the same properties and the potential to make multiple stages. So I am hoping there is way to activate a function when the players sprite overlaps with the tile, and in the function it replaces that individual tile with another tile from the tilemap.
  8. Hello I am new to phaser and I'm having a problem with my player who seems to not be able to jump left and right but can jump up and down when I just press the jump button. Can somebody help me? //-------------------player rendering------------------------------------- this.player =, 282, 'exitar');, Phaser.Physics.ARCADE); this.player.body.gravity.y = 300; this.player.body.collideWorldBounds = true; this.player.anchor.setTo(0, 0); this.player.body.setSize(50, 100, 20, 0);; this.player.animations.add('right', [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], 10, true); this.player.animations.add('left', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12], 10, true); this.player.animations.add('jump_left', [26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], 7, true); this.player.animations.add('jump_right', [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47], 8, true); this.player.animations.add('win', [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], 17, false); this.player.animations.add('still', [48, 49], 2, true); //-------------------cursor settings--------------------------------------- this.cursors =; jumpButton =; left =; right =; }, update: function () {, this.groundLayer);, this.stairsLayer);, this.trash); //this.my_time(); if (state_direction) { if (left.isDown && this.player.body.blocked.down) { this.player.body.velocity.x = -100;'left'); } else if (right.isDown && this.player.body.blocked.down) { this.player.body.velocity.x = 100;'right'); } else if (jumpButton.isDown && left.isDown && this.player.body.blocked.down) { this.jumpLeft(); } else if (jumpButton.isDown && right.isDown && this.player.body.blocked.down) { this.jumpRight(); } else if (jumpButton.isDown && this.player.body.blocked.down) { this.jump(); } else if (, 744, 510) < 92) { this.player.alpha = 0;'close'), this.go, this); } else {'still'); this.player.body.velocity.x = 0; } } }, jumpLeft: function () { state_direction = false; this.player.body.velocity.y = -200; this.player.body.velocity.x = -100, this.my_time, this);'jump_left'); //state_direction = true; }, jumpRight: function () { state_direction = false; this.player.body.velocity.y = -200; this.player.body.velocity.x = 100;, this.my_time, this);'jump_right'); //state_direction = true; }, jump: function () { state_direction = false; this.player.body.velocity.y = -150;, this.my_time, this); //'jump_right'); },
  9. [PHASER] Rendering player (CANVAS)

    Hi, I'm a actually making a game using PHASER. On this game, player have to jump to escape balls rolling on the ground, like on an infinite runner. Actually, everything is working fine but the player is showed using a spritesheet divided on 128*128 resolution. The character animation running doesn't use 128 pixels on width causing the ball to collide with the player even if the player doesn't hit the ball. The player hitbox is actually configured to 128*128 but I know that in previous versions of PHASER, it was possible to render player to make his hitbox scale his skin. I didn't find this function in the actual version of PHASER. Can someone help ? Thanx in advance. For information : Phaser example on previous versions :
  10. is there a gradient tint in phaser?

    is there any way to do a gradient tint in sprites/images in phaser? i'm using canvas mode , not auto or webGL Thanks. Sorry, for bad english :|
  11. BitmapText disappears

    I'v got a really odd issue, which happens the same way in multiple versions of phaser (definitely 2.6.2 & 2.9.2) I am using bitmap text, which works fine when I play the game first time around, but, bizarrely when the game ends & restarts the text disappears. It's used on the splash screen, and this problem isn't replicated there (i.e. every time you go back it appears!) Any ideas?
  12. Multiple upload recursively

    Good morning! I've a (really probably) noob question. I have to preload all the file in one folder and its subfolder. If I know before the upload all the stuff stored in these folders I can easly do it with game.load.images([keys], [urls?]); or game.load.pack(key, url?, data?, callbackContext?); but if I don't want to edit multiple times the string or json file (in example to have the same code valid for multiple projects or if I have some stuff now and in the future a lot more), there is a way to do it? I've google for a while finding nothing for Phaser, nor Typescript nor JavaScript. Thanks to whoever can help me! :-)
  13. Top Down Tower Defense Game, O_O

    A friend of mine and I have been working on this game for a few months now. It's a top down, tower defense game that has been prototyped out, and manages player progression. Story: You stole an artifact from a highly evolved society and fled to space. You crash land on this planet that has only progressed to middle age level tech. Waves of ships from the home planet are in pursuit. Survive as long as you can. Every wave gets progressively harder and introduces new enemies. Every 5 waves a boss will spawn. After defeating the boss, the Shop Merchant opens the house door and allows you to enter. While in the shop you can purchase mercenaries, additional towers, player upgrades, weapon upgrades, and access to the Dungeon(in development)! A lot of this is actively in development (when we get free time) and open anyone who wants to be a part of it. Would be interested in making it opensource if anyone else wants to help out. Mercenaries: Melee Merc: Charges towards the nearest enemy and damages them with his mighty sword (in development and op atm). High Health Healing Merc: Heals the player and nearby mercs when damaged. Ranger Merc: Good all around support merc. Carries a Rifle and mid range health. Weapons: Will be progressively unlocked as player level increases. Currently all are available all the time (dev mode) Pistol: single fire, mid damage, short range Rocket: single fire, high damage, AOE damage, mid range Assault Rifle: High fire rate, mid damage, long range. Laser: High damage, penetration, slow fire rate. Upgraded Laser: High Damage, Penetration, high fire rate. Enemies: Melee Enemy: Does significant damage when close to player. Low health Shotgun Enemy: high damage, close range, mid health Rifle Enemy: mid damage, high fire rate, mid health Boss: Progressively harder with player level and wave. Weapons change as player gets higher level Turrets: Just added. Have preset locations. 4 Modes for turrets that currently evolve with the player level. Want to make them paid unlocks. Pistol AOE: Shoots a pistol shot in all 360 degrees Laser: Pew Pew Beam: Peeeeeeeeeeeeeeew Roadmap: Dungeon bosses with progression More assets Additional levels Tower Placement Night mode with flashlight effect (already developed just buggy) Multiplayer (have our server built with in place) ? Tech Stack: Javascript Node.js Phaser A* Tiled Texture Packer Trying to track down the person who made the sprite asset for credit. Let us know what you think. Code Below: To play: NPM Install NPM start localhost:7000/ Game play directions in "Controls"
  14. We wish to build a platform game like súper Mario bros and to be fair this is very similar to many others so maybe if you have another one made you can adapt it to our needsTo begin with, we will have 5 levels and a boss at the end to beat.The player will have 3 lives to attempt all the levels. As they go through the game they will have the chance to collect coins which increases their score and also they can jump on crates. The crates will be ítems they have to collect to finish the level. When they jump on the create an image will appear on the screen and some audio. Each crate will have a different item, all loaded from a json file (image, audio etc. I can provide the format they will come in).The player will come across different enemies as they go through the levels. The player has to either jump on the enemy or shoot them. The player will have limited bullets so this will be something else to collect. If the enemy touches them they will die.To finish a level they must collect all the crates and go through the transporter at the end. If they reach the transporter and they have not collected all the crates they will have to go back to break them.When they get to the end of the 5th level they will have to fight the end boss.They will need to hit him a certain amount of times. (to be discussed).When the end boss is beat the images and audio will display 1 by 1. loaded from the json.A total score will be collected based on coins and the time it took for them to finish each level. The ranking will be needed to be saved into a var as it will be sent to another page later.We have all the images ready for the game.We will also provide the buttons GUI images .There are 6 enemies (including the end boss ) in this collection so we can introduce a new one for each level. At the top of the page we will need to display bullets, lives, an icon for the crates. might be best a picture of the crates the a number over lay 2/8. Any questions please let me know.
  15. problem detecting collisions in game

    Hello, I am making a game using this tutorial: I made some changes to it using the Phaser Basic Project template. I am having a problem with the collision detection. In the update function I have these lines detecting if a collision has happened: update: function () { console.log("in the update function!!!!!!!!!"); // Honestly, just about anything could go here. It's YOUR game after all. // Eat your heart out! // player land on ground instead of falling through, this.ground, this.playerHit, null, this); // player bitten by a flea, this.fleas, this.playerBit, null, this); // player can overlap with dirt mounds, this.mounds, this.collect, this.checkDig, this); This collision mechanism works as long as the player does not collide with a flea or digs. (I guess this means the collision mechanism does not work.) For example when the player collides with a flea, this.playerBit is called: playerBit: function (player, flea) { //remove the flea that bit our player so it is no longer in the way flea.destroy(); //update our stats this.scratches++; this.refreshStats(); //change sprite image this.player.loadTexture('playerScratch');'scratch', 10, true); //play whine audio; //wait a couple of seconds for the scratch animation to play before continuing this.stopped = true; this.player.body.velocity.x = 0; * 2, this.playerScratch, this); }, refreshStats: function () { this.pointsText.text = this.points; this.fleasText.text = this.maxScratches - this.scratches; }, playerScratch: function () { this.stopped = false; // check the number of scratches, if 5 or greater // the player dies if (this.scratches >= 5) { console.log("scratches greater than 4"); this.player.alive = false; // reset world, this.fleas.destroy(); this.mounds.destroy(); this.player.loadTexture('dog');'walk', 10, true); this.player.body.setSize(this.player.standDimensions.width, this.player.standDimensions.height); //.. then run home this.player.anchor.setTo(.5, 1); this.player.scale.x = -1; this.player.body.velocity.x = -1000; // run off the screen; //..then go to Game Over state, this.gameOver, this); } else { console.log("in the playerScratch function!!!!!!!!!"); this.player.loadTexture('dog');'walk', 3, true); this.player.body.setSize(this.player.standDimensions.width, this.player.standDimensions.height); } console.log("leaving the playerScratch function"); }, After the player scratches, the player sinks below the ground. Why is this? Here is the update function : update: function () { console.log("in the update function!!!!!!!!!"); // Honestly, just about anything could go here. It's YOUR game after all. // Eat your heart out! // player land on ground instead of falling through, this.ground, this.playerHit, null, this); // player bitten by a flea, this.fleas, this.playerBit, null, this); // player can overlap with dirt mounds, this.mounds, this.collect, this.checkDig, this); //only respond to keys and keep the speed if the player is alive if (this.player.alive && !this.stopped) { this.player.body.velocity.x = 250; //We do a little math to determine whether the game world has wrapped around. //If so, we want to destroy everything and regenerate, so the game will remain random if (!this.wrapping && this.player.x < { //Not used yet, but may be useful to know how many times we've wrapped this.wraps++; // once we wrap we want to destroy everything and regenerate the world this.wrapping = true; this.fleas.destroy(); this.generateFleas(); this.mounds.destroy(); this.generateMounds(); // then put things back in the correct order;;; } else if (this.player.x >= { this.wrapping = false; } //take the appropriate action for swiping up or pressing up arrow on keyboard //we don't wait until the swipe is finished (this.swipe.isUp), // because of latency problems (it takes too long to jump before hitting a flea) if (this.swipe.isDown && (this.swipe.positionDown.y > this.swipe.position.y)) { this.playerJump(); } else if (this.cursors.up.isDown) { this.playerJump(); } //The game world is infinite in the x-direction, so we wrap around. //We subtract padding so the player will remain in the middle of the screen when //wrapping, rather than going to the end of the screen first., -( / 2), false, true, false); } },
  16. Hi All, I just released my new game Blassty. It is really fun and addictive puzzle game. I made the game using Phaser Game Framework and wrapped into apk using Cocoon. It is totally free. No ads or something. Gameplay: You need to connect at least 3 blocks to pop them up in 4x4 grid. I hope you enjoy Blassty Google Play Link:
  17. Phaser export image sequence

    Hi, Having had the most cursory look, it seems that you can export an image from Phaser (I've not tried it, but it seems you can.) I need to create an animation, that will be far easier to create via code, but I wondered about exporting multiple images from phaser? Anyone tried this? Or, something like this? Other thoughts?
  18. Hi, please check our new game. Play Cave Golf
  19. So I am preloading an atlasXML spritesheet game.load.atlasXML('sheet', 'images/sheet.png', 'images/sheet.xml'); and I can create a sprite using: game.add.sprite(,, 'sheet', 'playerShip1_orange.png'); I am trying not to use a for loop to create many sprites for a a sprite group I'm creating by using Group.createMultiple Now if I'm just loading a sprite or image, I can do this.meteorGrey =; this.meteorGrey.createMultiple(25, 'meteorGreyBig1.png'); Now when it's in a atlas sprite, this is where I'm running into trouble. this.meteorGrey =; this.meteorGrey.createMultiple(25, 'sheet', 'meteorGreyBig1.png'); It ends up displaying nothing
  20. I created a Mario map in tiled. Then when i try to put it into phaser it wont load. its giving me this error I've searched the internet and haven't found any solutions to this problem. My javascript file lists as follows: Please help, Thanks EDIT: I fixed this problem but now i have a new one. I'm get this error Anybody know how to solve it? Thanks
  21. Unable to repick tile

    Hi folks, first time into Phaser, and so far so good except... I have Tilemap with data from CSV, with one board checker. My goal is to have possibility to pick and set it to new playing field. With below snippet after one "pick and leave" it is not possible to pick him again. private _updateMarker(): void { this.pointer.x = this.playerLayer.getTileX( * Constants.TILE_SIZE; this.pointer.y = this.playerLayer.getTileY( * Constants.TILE_SIZE; if ( { if(this.currentTitle !== null) {, this.playerLayer.getTileX(this.pointer.x), this.playerLayer.getTileY(this.pointer.y), this.playerLayer);, this.currentTitle.y, this.playerLayer); this.currentTitle = null; } else { this.currentTitle =, this.pointer.y, this.playerLayer); } } } So maybe you have some idea what is going wrong here Thanks in advance!
  22. Hello, guys! I'm new here and in the world of games in general, that is why i need the quality feedback from community. I just finished my first game with Phaser, using a modern strucuture for the Javascript. The game is simple, but the organization of the code can serve as a reference for the community. I used ES6 for writing javascript and divided the code according to CommonJS pattern, using Browserify + Babel for this. I still used a linter (JSHint) for syntax tests and the Gulp for create and manage tasks like minify CSS, uglify JS, run the tests and do JS code via browserify (commonJS in client-side) + Babel (transpiler of ES5 for ES6). Ah, of course, all dependecies manages by NPM. I think that, for less experienced developers in hard code and javascript in general, my code can serve like a guide/boilerplate. Please, have a look at the repository and use the code as you prefer: Read the and talk to me, for any question. On the other hand, how I'm new in the world of games, i need on your tips to enhance user experience and gameplay. ******************************************************************************************************************************* Paw Patrol Game Description: A simple 2D phase game with "Paw Patrol" theme, aimed at childrens. In total there are four stages and the player has to get all the bones of each phase before the time runs out. Direct link for the game: Thanks!
  23. [ANDROID] Chip Chip Crap

    Hello world! Just realeased my first Phaser + Cocoon game. It is really a basic starter (side-)project but I'm quite happy how it came out. I plan to continue upgrading things so I'd really appreciate any suggestion/feedback. Hope you give it a try! Have a great day!
  24. Body vs Sprite (ARCADE physics)

    Hello to everyone, I am new to Phaser. These days I am studying the tutorials and I suddenly came across the many problems related to sprite of different dimensions. So I am learning to use Texture Atlas. I have create an animation with the related json file. All work just fine (visually). Playing with the json file I am able to adjust the sprite width (green box) but not the body size (red box). The ARCADE Physics has only ONE box size? Is there a way to automatically adjust the body size following the sprite size? Or I must move on onto more complicated physics. Thanks to enyone who can help me.
  25. [PHASER] Collide an ITEM with GROUND.

    Hello, I am actually trying to make my very first game with Phaser ! Saddly, I am not able to get it work. Actually, the game is simple : There is a ground, a character (player), and a "coin" that fall from the top of the game to the ground. If the player hit it, the score increase by 1. All of this work fine. But I want to end the game if the "coin" hit the grounds. For this, I want the coin to collide with the ground. But unfortunally, the player collide with the ground, and the coin pass through the ground. I don't understand why. Demo here. Keep in mind that this code & game is only for testing PHASER. Here is the full code : Could you please help ? ;...; xxx lol EDIT : I got the problem solved, just misstake to place it : Now I wonder why my function endGame() isn't call when gold hit the ground. EDIT² : I got my second problem solved with this code : But I don't understand the difference between my code and game.physics.arcade.overlap();. Can someone explain me ? Code updated aswell !