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.js
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 2,858 results

  1. How to use Spriter in Phaser

    How to use spriter in phaser/javascript, and how to export it?
  2. [Phaser] Color Stars

    Hello devs! I want to share with you the first demo of Color Stars, It's a color puzzle flat game with an educational component. The game will be available on web and mobile (cocoon) Play here: I appreciate your feedback and comments Thanks UPDATE Add some "modifiers or traps" Speed fixed New planets added The game is almost ready, thanks to people who helped me testing it.
  3. Hi, I try to use Multitexture, but I get this log in IOS (Iphone 6) [Warning] setTexturePriority: Image "sAdivinhaAi" was given textureIndex=0 because there is no available texture space (0). (phaser-no-physics.min.js, line 3); [Warning] setTexturePriority: Image "sKeyboard" was given textureIndex=0 because there is no available texture space (-2048). (phaser-no-physics.min.js, line 3); And some textures get framed, taken from another BitmapFont Thansk, preload() { game.load.atlasJSONHash('sAdivinhaAi','sAdivinhaAi.png', 'sAdivinhaAi.json'); game.load.atlasJSONHash('sKeyboard', 'keyboard.png', 'keyboard.json'); // Fontss game.load.bitmapFont('Open', 'fonts/Open.png', 'fonts/Open.fnt'); } create() { var enabled = game.renderer.setTexturePriority(['sAdivinhaAi', 'sKeyboard']); if (enabled) {'Open').base.textureIndex = enabled.length + 1; } }
  4. Hi there, I'm Alexander the CEO of SOFTGAMES. Based in Berlin, the creative capital of Europe, SOFTGAMES is the world’s largest producer and distributor of HTML5 games. We’re delivering fun to millions of users every month across 6 continents on the device of their choosing. Our vision is to help users to instantly discover and engage with games they like, while helping brands to reach their target audiences. We're Facebook Instant Games launch partner (plus several other messengers and social networks) and are now looking for a super-talented, self-motivated and passionate Senior Game Developer to join us. At SOFTGAMES you have the chance to join a small team of super talented people to build awesome HTML5 games using Phaser that will entertain millions of people. The position is full-time and based in our Berlin office. The Senior Game Developer role is responsible for building great games from beginning (prototyping) to the end (launch). You will work closely with artists and game producers to deliver a great player experience and with other Game Developers to share learning and best practices. The successful candidate will ship robust and high performance code, is proactive, and act as a fount of knowledge when it comes to game development. As part of a small game team you will enjoy a creative, challenging and collaborative environment and are expected to have the entrepreneurial spirit with a “getting things done” attitude. Interested? Then I'm looking forward to your application ( or PM me your CV! Best, Alexander
  5. Fruit Spritzer is a WIP match3 (Candy Crush, Bejewelled) style game. Simple mechanic, fun, fast paced, score as much as possible in 60 seconds. High scores are recorded online, thanks to GameJolt. Swipe to swap neighbouring fruits, 3 matched fruits squish, longer matches result in bonus combos, that when matched result in super-squishes: Explode - squish all fruits surrounding the match in all directions. Slicer - squish all fruits in the row/column from the match. Blender - squish all fruits of the same type as the match, matches with any fruit type. Match two bonus combos for surprise super-combos. Unlike many match3 games, the engine doesn't prevent interaction while the previous match is still running. Because time is of the essence, Fruit Spritzer allows you to continu making matches even while fruit are dropping and chain reactions happening, resulting in frantic and challenging gameplay. Think quickly, move fast, score high.
  6. Multiplayer Framework Suggestions

    Hi everyone, I am working on a multiplayer board game and am having trouble finding a suitable framework for handling client/server communication. I have been using NodeJS with socketIO which i like because the API is pretty straightforward, however, since it is not a dedicated game framework, I've had to write my own logic for having multiple rooms to handle multiple game instances and this got ugly really quick. I found this library,, however, there is little documentation and activity. The other one that I've considered is this,, but I was wondering what others have used. Since this is a 2d board game, with users simply taking turns, performance is not a huge deal and I'd like to keep it as minimal as possible. This is really just a learning project so I am super concerned about things like server authentication, etc. Thank you for any help!
  7. [Phaser] Zombie Cannon Attack!

    Zombie Cannon Attack! is a zombie-themed endless runner, with cannons! Cannon-fire test zombies to infect the local populace and create your very own rampaging zombie horde. Gather data and use it to upgrade your zombies and build the perfect undead army. Available now on Play Store, download FREE here: Created using Phaser, and packaged for Android with Cordova. For further details see this blog post. I'd appreciate any comments or feedback, and a download and rating on the Play Store would be fantastic. I'm also happy to answer any questions anyone might have.
  8. Online Body Editor Hi guys. during the development in Phaser i found out, that there is no simple online editor for Making Physics bodies for P2 physics in Phaser. So i came up with an simple idea. To do a simple online body editor to make json files for Phaser. I know its super simple and it could do much more things as other desktop body editors can do, but when you want just simple body in two minutes, i think its a good way. I took me less than two hour to do it, so dont judge it for bad appearance and not efficient solutions for the algorithm. Maybe ill do things like more bodies in one json file, or auto edge-tracer adn stuff like that, but fell free to comment and come up with your ideas to improve it for the future. So please, if have have anything to say to this, comment below, i would be pleased.
  9. Controlling rendering of sprites

    Hello everyone, I have a case where I have lots of sprites on screen and each sprite has a Phaser.Text attached to it. Right now, I'm rendering in this order : renderSprite -> renderText, renderNextSprite -> renderNextText, thus having to flush the context every time I draw the text since it's not using a common sprite atlas. What I'd like to do is : renderAllSprites -> renderAllTexts So my question is, is there a way to tell Phaser not render any of these objects, and in the render() function of my current state, call what to render manually ? I'm opened to other suggestions, but please bear in mind that I cannot switch to bitmap fonts due to the fact that I need to support many languages. Thanks.
  10. Hi Guys, I'm currently making a game and I've run into a bit of an issue with one of the states that is loading multiple animations. There are 5 animations in total that play as soon as the state loads. They also loop. The problem that I'm having is that the state with the animations is taking around 5+ seconds to load, even though the spritesheets have been loaded in the Preload State. I feel this might be because the animations are being set so 60 FPS. I would prefer it if I could add this extra loading time to the Preload State if possible (because it has a loading bar) so I was wondering if there is a way to create the animations in a previous state and then have them play instantly on the page I need them to. Any help would be appreciated.
  11. Whippy Chute

    Simple 2D game where you have to avoid obstacles. I used Phaser as a game development framework.
  12. Hi, I have read quite a few posts on the subject, so I know this has been mentioned a lot, but I didn't find a good solution for this. I'm loading Google webfont from within the game using WebFontConfig: WebFontConfig = { google: { families: ['Roboto'] } }; and: game.load.script('webfont', '//'); I can set a text to use the google font (Roboto, for example) without a problem, but I can't set its weight. I believe it defaults to 400. I know that using .fontWeight won't work, so I tried as someone offered in another post: {font: '100 20px Roboto'} but it won't work either (it actually resets the text font to the default browser font). I also tried loading specifically Roboto:100,400 in the WebFontConfig but that doesn't work either. Any suggestions?
  13. Part 7 is here, concluding our series: Check out the demo: Thanks for the support throughout the series! Let me know if you want to see more tutorials like these ones.
  14. Hi Guys, I have developed a game using Phaser js. In which I have added a intro video.In iPhone while playing the video it opens it on the default video player(with fullscreen).Is it possible to block default player to open? Anyone help me. Thanks, Sakthi
  15. Hello, I have just finished the third level for my html5 game, Adventure of Ryan Hunter. Please check it out and let me know what do you think. Thank you, Priyo Hutomo
  16. Hello, I'm using Phaser for a school project. were making a 2d platformer game. I have multiple states for different levels. The transition works fine, next level is displayed properly, enemies function as the should, everything scrolls, but the keyboard stops recognizing input. right now i have: this.cursors = this.input.keyboard.createCursorKeys(); in the create function of both Level.js and Level2.js but they are not working for level 2. i have also modified the create cursor keys function in phaser.js to add a few key codes so now it reads like this: return this.addKeys({ 'up': Phaser.KeyCode.UP, 'down': Phaser.KeyCode.DOWN, 'left': Phaser.KeyCode.LEFT, 'right': Phaser.KeyCode.RIGHT, 'ctrl':Phaser.KeyCode.CONTROL, 'shift':Phaser.KeyCode.SHIFT, 'alt':Phaser.KeyCode.ALT, 'enter':Phaser.KeyCode.ENTER}); Basically wondering what i should be doing different to get keyboard input recognized in multiple states. i tried doing the game.input.resetLocked=true; in the create functions of either level.js or level2.js, it either did nothing (for level2) or stopped the game from running (for level1)
  17. Hello, I am new to Phaser. What is the best way to create scene (menu, top, settings, game itself) for puzzle game? Should I create scene manually (code) or should I use some GUI and export results as JSON file which later I can use in Phaser? Thanks in advance and I hope my question was not answered hundreds times
  18. Releasing a Phaser game

    Hey guys, I'm about to release a game made with Phaser 2.8.2 targeting Desktop browsers. I was wondering if there's anything I need to do to make sure the code runs as optimized/smooth as it can on players browser? In native world, I would simply create a "release" type build with compiler optimizations enabled. Is there such a thing? Thanks.
  19. Alien Invasion

    Hello everyone I'm creating a new game and I have the basics working. It would be really nice to hear what you think. The game is still under construction but you should be able to play the first level of each mission I am working on the next levels. It is still under construction but i hope to be able to create a fully working version. here is the link:
  20. Camera shake black bars problem

    Hi, I have a problem with camera.shake(). It shakes the screen instead of moving the camera and black bars appear. In this example, it works fine. What am I doing wrong? Im using Phaser 2.8.3 CE if (player.weapon.canFire) { var bullets =;, 400); }
  21. Hello I'm new in HTML game development. Want to create a website that will contain a 2D scoreboard in order to be viewed in Smart TV Web Browsers. I've just create a simple prototype with Phaser 2.4.2 but it didn't work out although used Phaser.CANVAS option in Phaser.Game constructor. Web browser supports Canvas but does not support WebGL. Opera web browser on Linux. Is it possible to make Phaser run? Or are there any other proper html game engines i can use to build my website? Thanks.
  22. Hi, I updated phaser lib from older version to 2.6.2 and now there is no more "alpha" property in "sprite" object. I see "alpha" is still available using tween. But what if I want to change it directly like it was in previous version? : this.background = this.add.sprite(0, 0, 'back'); this.background.alpha = 0; thanks
  23. Ladder

    510/5000 Good night people! I'm developing a game where the character needs to climb a ladder. The problem I am facing is when he needs to enter a tile that is down the ladder, as I try to illustrate in the image below. When hitting the tile the pesonagem stops to move because the tile needs to be solid so the character can walk on it, but when he is on the stairs he must pass over this tile. Could someone show an example of how I can do this? Since then, thank you very much.
  24. Hello comrades, I'm new to phaser and I can't seem to create new objects to the group "capetinhas", even though I can load the sprite through game.add.sprite. Here's the code: var game = new Phaser.Game(448, 448, Phaser.AUTO, '', { preload: preload, create: create, update: update }); function preload () { game.load.image('tabuleiro','assets/tabuleiro.png') game.load.spritesheet('devil','assets/devil.png',32,32); var capetinhas; } function create (){ capetinhas =; game.add.sprite(window.width,0,'tabuleiro');//loading the background game.add.sprite(128,128,'devil'); // this works capetinhas.create(32,32,'devil'); // this doesnt } function update (){ } Any helpe would be really apreciated. Thanks in advance.
  25. Phaser lags after 2 minutes

    Hi, I downloaded the following from Why is it everytime I played the game in the chrome browser/firefox after 1 minute it started to become laggy, Thanks <!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Basketball Game</title> <script type="text/javascript" src="js/phaser.js"></script> <h2>Basketball Game (inspired by Facebook Messenger!)</h2> <style type="text/css"> body { margin: 0; } canvas { margin: 0 auto; border: thin solid black; } span { display: block; margin: 30px auto; width: 500px; text-align: center; } h2 { text-align: center; } </style> </head> <body> <script type="text/javascript"> // NOTE: Originally 640x1000. Other possible sizes: 512x800, 400x625 var game = new Phaser.Game(400, 625, Phaser.CANVAS, '', { preload: preload, create: create, update: update }); function preload() { game.load.image('ball', 'assets/images/ball.png'); game.load.image('hoop', 'assets/images/hoop.png'); game.load.image('side rim', 'assets/images/side_rim.png'); game.load.image('front rim', 'assets/images/front_rim.png'); game.load.image('win0', 'assets/images/win0.png'); game.load.image('win1', 'assets/images/win1.png'); game.load.image('win2', 'assets/images/win2.png'); game.load.image('win3', 'assets/images/win3.png'); game.load.image('win4', 'assets/images/win4.png'); game.load.image('lose0', 'assets/images/lose0.png'); game.load.image('lose1', 'assets/images/lose1.png'); game.load.image('lose2', 'assets/images/lose2.png'); game.load.image('lose3', 'assets/images/lose3.png'); game.load.image('lose4', 'assets/images/lose4.png');'score', 'assets/audio/score.wav');'backboard', 'assets/audio/backboard.wav');'whoosh', 'assets/audio/whoosh.wav');'fail', 'assets/audio/fail.wav');'spawn', 'assets/audio/spawn.wav'); } var hoop, left_rim, right_rim, ball, front_rim, current_score = 0, current_score_text, high_score = 0, high_score_text, current_best_text; var score_sound, backboard, whoosh, fail, spawn; var moveInTween, fadeInTween, moveOutTween, fadeOutTween, emoji, emojiName; var collisionGroup; function create() { game.physics.startSystem(Phaser.Physics.P2JS); game.physics.p2.setImpactEvents(true); game.physics.p2.restitution = 0.63; game.physics.p2.gravity.y = 0; collisionGroup = game.physics.p2.createCollisionGroup(); score_sound ='score'); backboard ='backboard'); backboard.volume = 0.5; whoosh ='whoosh'); fail ='fail'); fail.volume = 0.1; spawn ='spawn'); game.stage.backgroundColor = "#ffffff"; // high_score_text = game.add.text(450, 25, 'High Score\n' + high_score, { font: 'Arial', fontSize: '32px', fill: '#000', align: 'center' }); current_score_text = game.add.text(187, 312, '', { font: 'Arial', fontSize: '40px', fill: '#000', align: 'center' }); // 300, 500 current_best_text = game.add.text(143, 281, '', { font: 'Arial', fontSize: '20px', fill: '#000', align: 'center' });// 230, 450 current_best_score_text = game.add.text(187, 312, '', { font: 'Arial', fontSize: '40px', fill: '#00e6e6', align: 'center' }); // 300, 500 hoop = game.add.sprite(88, 62, 'hoop'); // 141, 100 left_rim = game.add.sprite(150, 184, 'side rim'); // 241, 296 right_rim = game.add.sprite(249, 184, 'side rim'); // 398, 296 game.physics.p2.enable([ left_rim, right_rim], false); left_rim.body.setCircle(2.5); left_rim.body.static = true; left_rim.body.setCollisionGroup(collisionGroup); left_rim.body.collides([collisionGroup]); right_rim.body.setCircle(2.5); right_rim.body.static = true; right_rim.body.setCollisionGroup(collisionGroup); right_rim.body.collides([collisionGroup]); createBall(); cursors = game.input.keyboard.createCursorKeys(); game.input.onDown.add(click, this); game.input.onUp.add(release, this); var instructions = document.createElement("span"); instructions.innerHTML = "Instructions: Quickly drag the ball to shoot the ball into the hoop!"; document.body.appendChild(instructions); } function update() { if (ball && ball.body.velocity.y > 0) { front_rim = game.add.sprite(148, 182, 'front rim'); ball.body.collides([collisionGroup], hitRim, this); } if (ball && ball.body.velocity.y > 0 && ball.body.y > 188 && !ball.isBelowHoop) { ball.isBelowHoop = true; ball.body.collideWorldBounds = false; var rand = Math.floor(Math.random() * 5); if (ball.body.x > 151 && ball.body.x < 249) { emojiName = "win" + rand; current_score += 1; current_score_text.text = current_score;; } else { emojiName = "lose" + rand;; if (current_score > high_score) { high_score = current_score; // high_score_text.text = 'High Score\n' + high_score; } current_score = 0; current_score_text.text = ''; current_best_text.text = 'Current Best'; current_best_score_text.text = high_score; } emoji = game.add.sprite(180, 100, emojiName); emoji.scale.setTo(0.25, 0.25); moveInTween = game.add.tween(emoji).from( { y: 150 }, 500, Phaser.Easing.Elastic.Out, true); fadeInTween = game.add.tween(emoji).from( { alpha: 0 }, 200, Phaser.Easing.Linear.None, true, 0, 0, false); moveInTween.onComplete.add(tweenOut, this); } if (ball && ball.body.y > 1200) { game.physics.p2.gravity.y = 0; ball.kill(); createBall(); } } function tweenOut() { moveOutTween = game.add.tween(emoji).to( { y: 50 }, 600, Phaser.Easing.Elastic.In, true); moveOutTween.onComplete.add(function() { emoji.kill(); }, this); setTimeout(function () { fadeOutTween = game.add.tween(emoji).to( { alpha: 0 }, 300, Phaser.Easing.Linear.None, true, 0, 0, false); }, 450); } function hitRim() {; } function createBall() { var xpos; if (current_score === 0) { xpos = 200; } else { xpos = 60 + Math.random() * 280; }; ball = game.add.sprite(xpos, 547, 'ball'); game.add.tween(ball.scale).from({x : 0.7, y : 0.7}, 100, Phaser.Easing.Linear.None, true, 0, 0, false); game.physics.p2.enable(ball, false); ball.body.setCircle(60); // NOTE: Goes from 60 to 36 ball.launched = false; ball.isBelowHoop = false; } var location_interval; var isDown = false; var start_location; var end_location; function click(pointer) { var bodies = game.physics.p2.hitTest(pointer.position, [ ball.body ]); if (bodies.length) { start_location = [pointer.x, pointer.y]; isDown = true; location_interval = setInterval(function () { start_location = [pointer.x, pointer.y]; }.bind(this), 200); } } function release(pointer) { if (isDown) { window.clearInterval(location_interval); isDown = false; end_location = [pointer.x, pointer.y]; if (end_location[1] < start_location[1]) { var slope = [end_location[0] - start_location[0], end_location[1] - start_location[1]]; var x_traj = -2300 * slope[0] / slope[1]; launch(x_traj); } } } function launch(x_traj) { if (ball.launched === false) { ball.body.setCircle(36); ball.body.setCollisionGroup(collisionGroup); current_best_text.text = ''; current_best_score_text.text = ''; ball.launched = true; game.physics.p2.gravity.y = 3000; game.add.tween(ball.scale).to({x : 0.6, y : 0.6}, 500, Phaser.Easing.Linear.None, true, 0, 0, false); ball.body.velocity.x = x_traj; ball.body.velocity.y = -1750; ball.body.rotateRight(x_traj / 3);; } } </script> </body> </html>