Search the Community

Showing results for tags 'phaser 2'.

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 30 results

  1. tanmoy749

    Loading assets

    How to load images or assets from local address instead of phaser assets through web? Whenever I try to load assets from my local drive it doesn't show the contents.I want to load my assets offline. Thanks in advance.
  2. Need to make a drawing tool where sprites would be pipes of different shapes and they need to be controlled through drag and drop and virtual joystick.
  3. Hello I made a game by phaser 2. Ragnarok Triple Triad is a strategy game design base on Triple Triad : a card game originating from Final Fantasy VIII Ragnarok Online : massive multiplayer online role-playing game Game Play Ragnarok Triple Triad is played on a three-by-three (3x3) square grid of blank spaces where monsters will be placed as the game progresses Each monster has lv, hp numbers placed in top, bottom; Monsters can have elemental alignments that affect the gameplay if there are elemental icons on the game board. FEATURES - Reset Game. You could start the game from the start at any time you want. - Upgrade Monster. You could obtain stronger monster by exchange numbers of low lv monsters - PVP : Working on. The Design is on working so it's a little off. Website Demo Link : This game purpose design to play in mobile so it's rotate 90 degree You should play it in your mobile with lock enable. You could try it here. Android link : Demo Play Link Some Images. Having any problems? Any suggestions? I would love to hear from you! Please contact me:
  4. Hi, recently i moved from Phaser 2 to Phaser 3 and i started some new project. Here is my problem: In Phaser 2 its easy to add text to sprite like this: var sprite = game.add.sprite(...); var button_style = { font: "27px Verdana", fontWeight: "bold", align: "center", fill: "#000000", stroke: '#ffffff', strokeThickness: 2 }; button_text = game.add.text(0, 0, 'blabla', button_style); sprite.addChild(button_text); After few days i am very tired of searching to get solution on Phaser 3 to add text on sprite. Can anybody help me please ? Thanks in advance.
  5. Reservoir Cleansing. Short arcade type game, just kill the enemies each level: ARROWS (UP & DOWN) - Switch character Z - Attack X - Heal C - Power up (Character upgrades when bar fills) (MAX is Golden armour) It was just a small project to take a break from a big one (kaeBLUE). Won't be doing much to this , but any feedback will help improve any future versions, or even other games. - PLAY ON KONGREGATE - Thanks 😀
  6. AzraelTycka

    What happened to Lazer?

    Hi, I've been off the grid for a quite a while. I'd like to ask what happened to Lazer project? Is it now Phaser 3 or is that a branch of Phaser 2? Thank you guys.
  7. Hi, I'm making a dismemberment function of a sprite (human) when it died. This is how i see it : Get 6 bitmap (pooled) Copy with copyRect part of the sprite's texture (legs, torso, ...) and eventually resize these bitmaps Get 6 Image (pooled) and apply theses different textures Play some tweens to make parts fly randomly When tweens finished, free the 6 bitmaps and 6 image ( return to pool queue) Do you have any advices ( performance, ...) about this way ? Thanks
  8. Hi, Which is the most efficient way when you need to deal with many text to display (mobile/pc) ? Because i spent times on forum and didnt find a clear answer (sometimes Phaser.Text, but often BitmapText) : Thanks
  9. Hi All I've been working on a top down endless runner , where the player jumps from one platform to another and should not leave the screen. How to make a platform move horizontally I'm spawning platforms and adding x and y velocity its working but is it a right of doing it ? if not how to make it look better this.initX = this.x; this.body.velocity.y = -200; platform.prototype.update = function () { if (this.moving) { if (this.x > (this.initX + this.width)) { this.speed = -200; } if (this.x < (this.initX)) { this.speed = 200; } this.body.velocity.x = this.speed; }
  10. Hi all, I am new to Phaser game development. I want to build a game like this: The idea is that I want to use blockly to play the phaser game instead of keyboard input. Basically I want to write some javascript code that would make the Phaser game figure move (write code to play the game). My question is: is there any API in Phaser can help me achieve that? Or the only way to achieve that is to simulate keypress in browser? Thank you all! Update: I figure out I just need to set the cursors properties. This question has been resolved.
  11.;; var wallCollisionGroup =; var playerCollisionGroup =; var doorCollisionGroup =;; // I've created all the necessary collisions as in expamle: and it works perfect. player.body.collides(wallCollisionGroup); player.body.collides(doorCollisionGroup, wrongDoor, this); cursors =; } wrongDoor() { player.body.velocity.x = 0; player.body.velocity.y = 0; //player.body.setZeroVelocity(); //player.body.velocity.x = -20000; //player.body.velocity.y = -20000; //player.body.static = true; result = 'You last hit: The wall :)';'Message', 'text'); } update() { player.body.velocity.x = 0; player.body.velocity.y = 0; if (cursors.left.isDown) { player.body.velocity.x = -300; } else if (cursors.right.isDown) { player.body.velocity.x = 300; } if (cursors.up.isDown) { player.body.velocity.y = -300; } else if (cursors.down.isDown) { player.body.velocity.y = 300; } } Hello. I'm making a game where player have to reach the right door and created all the necessary collisions and it works almost perfect, except the call back function wrongDoor. I want to create a dialog line when player collides wrong door and make his velocity = 0 while dialog line is on screen, but I can't. Every time player colldes the door dialog line displays on screen but the player sprite still moves. How can I make him stop on collision with door? All the //commented stuff I've tried and it didn't help. I tried to add this function in Update function but it triggers wrongDoor all the time and displays dialog line again and again from the start of the game. I've tried set velocity = -20000 but it doesn't set -20000 velocity, like it doesn't see the player. On screenshots I press up and right buttons so character moves up and right after wrongDoor triggers.
  12. We moved our game from Phaser 2.6.2 "Kore Springs" to 2.10.3 and encountered this error in Firefox and Internet Explorer: IndexSizeError: Index or size is negative or greater than the allowed amount The exception is trown from PIXI.Sprite.prototype._renderCanvas: renderSession.context.drawImage(this.texture.baseTexture.source, cx, cy, cw, ch, dx, dy, cw / resolution, ch / resolution); The arguments are: cx : 803 cy : 899.37 cw : 168 ch : 0 dx : -0 dy : -0.6299999999999955 resolution : 1 Everything was fine in "Kore Springs" but we wanted to take advantage of all the fixes and updates on tilemaps in CE.
  13. KungFuFlames

    What are the major changes in Phaser 3

    I resently started working with Phaser 3 and so far I learn some of the differences compared to Phaser 2: Scenes No pixi engine Is there any other notable differences at this point?
  14. Hi guys, Im kinda new here but I need help with Phaser 2 (PhaserCE 2.10.3) and loading videos.. My code is : main.prototype = { preload: function(){"earth_1", "assets/video/earth_1.mp4"); }, create: function(){ var video ="earth_1");; video.addToWorld(); var flare = spawner.spawn(g.sprites.flare) var ring = spawner.spawn(g.sprites.ring) var highly_recommended = spawner.spawn(g.sprites.highly_recommended) var logo = spawner.spawn(g.sprites.logo) ... it works fine when I run it in web using a local server.. but when I compile it with cocoon using canvas+, i get an error. using the cocoon developer app i get the errors attached.. i tried my best to google it out and also look at the docs as well as the main site but i just cant crack this running out of ideas.. does the video resolution have an effect? im using an .mp4 video as an animated background
  15. Hi, so I'm trying make a doodle jump type of a game , so far I've created the infinity world and added 6 ledges. now I want to kill and revive the ledges with the new X and Y coordinates, but somehow can't get it to work. I've managed to kill the ledges as they go out of camera bounds by using (forEachAlive)but got issues with reviving them. I've tried getFisrtDead and reset but nope, cant get it to work. Does anyone know how I could solve this? so this is how I create the platforms: generatePlatforms: function(){ //grouping the platforms platformPool =; platformPool.enableBody = true; var ground = game.add.sprite(0, -32 ,'ground' ); platformPool.add(ground); ground.scale.setTo(3,2); ground.body.immovable = true; for (var i= 0; i < 6; i++){ var randomX =game.rnd.integerInRange(0, -50); var randomY = -100 *i; ledge = game.add.sprite(randomX,randomY,'ground'); platformPool.add(ledge); ledge.scale.setTo(0.3,0.3); ledge.body.immovable =true; } }, and this is how I kill the ledges under the update function: platformPool.forEachAlive(function(el){ var platformYMin = el.y; if(el.inCamera == false){ el.kill(); } },this); Thanks in advance
  16. EpicKingdom_

    Is it still acceptable to use Phaser 2?

    I am thinking about just using Phaser 2 for my games since there are so many available examples online unlike Phaser 3.
  17. Hello, I'm using Phaser CE trying to make a very simple game were two cowboys shoot them but in the middle there is a Cactus which gets destroyed with every shot. I followed this example run nice in every browser. So I have almost everything working in chrome but in Firefox I cant see anything drawn over the BMP. It's hard to simplify my original code. So I tried to build a very simple one to showcase my problem by extracting code from the example link. I just want to draw a whole when pressing key A. I also tried with different blending modes. It still does run ok in chrome but not in FF nor safari. Has it anything to do with my code or with the browsers...? var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update }); var background; var landBMP; function preload() { game.load.image('land','assets/images/land.png'); game.load.image('background','assets/images/background.png'); } function create() { boomKey = game.input.keyboard.addKey(Phaser.Keyboard.A); boomKey.onDown.add(drawBoom, this); // Load Background background = this.add.sprite(0, 0, 'background'); // Load bmp data landBMP = this.add.bitmapData(992, 480); landBMP.draw('land'); landBMP.update(); landBMP.addToWorld(); } function drawBoom(){ landBMP.blendDestinationOut();, 400, 60, 'rgba(0, 0, 0, 255'); landBMP.blendReset(); landBMP.update(); } function update() { } Any help is apreciated PS: I attached my results with chrome and firefox after pressing A key
  18. elkranio

    Exoplanet Express

    Hey hey. We've just finished our new game - Exoplanet Express. It's a very distant Lunar Lander relative You need to deliver the cargo from point A to point B and try to get it there in one piece. There are 50 levels on 5 different planets. Each planet has it's own theme and offers new challenges. Simple trailer: Standard version: All levels unlocked: Feel free to drop us a line if you're interested in buying a license:
  19. I've seen a gantt chart with a planned "phaser 2 to 3 migration guide" but now it seems to be deleted. I have a lot of 2.x code and I would love to migrate to 3.x in an ordered way. So, will there be any migration guide or should I just start seeing the examples and tutorials and figure out the best way to do it? It's nice to have such amazing library!
  20. dartheater

    6 x 6 grid

    I need to know how to program a really simple 6x6 grid in Phaser - I can't figure out how to do it and I've been trying for ages! I am planning on further developing it with some friends later but I need to get this sorted first
  21. Hello, i am new to using Phaser, and i would love to know if i am able to use DOM elements within my Phaser stage (canvas). I have a div which is styled to look like a ball and i would like to use this ball in the phaser game to physicly bounce on any of the ledges i will define in the future. My question: can i use this DOM element to do so? Or should i use a sprite/image? Because whenever the ball hits any of the ledges, i want it to change color. (I know this is possible with sprites and sprite recoloring) Greetings, Regentix
  22. ugajin

    is the Phaser 2 repo closed?

    I was about to file a bug report on gitHub and saw a notice that the repo is for Phaser 3 related issues only. So, is the Phaser 2 repo closed? The bug relates to the beginFill(...) and arc(..., true) methods see below. Perhaps this has been fixed in v3? Here is the issue... let myGraphic =,; myGraphic.beginFill(0xFF3300, 0.5); myGraphic.arc(0, 0, 135, game.math.degToRad(0), game.math.degToRad(90), true); let myGraphic =,; myGraphic.beginFill(0xFF3300, 0.5); myGraphic.arc(0, 0, 135, game.math.degToRad(0), game.math.degToRad(90), true); The issue may be reproduced with the above code using the bool direction parameter set to true [anticlockwise] together with beginFill(...). Rather starting the arc at due east 0º, the fill is begun from about 7º. Oddly if rendered using lineStyle(...) only and without beginFill(...) it draws correctly, beginning at 0º The same issue may be seen in the example at: -u
  23. I was wondering is there function in Phaser that will allow me to generate pixel data object from current Phaser Scene (cover the whole canvas or part of it) and pass this object in I don't know which form to the second Phaser Stage and display it as it is at certain position? Something like this: Or I just fall back to plain Canvas API and use ImageData object?
  24. I am struggling to make Phaser text field show special characters like these: [ {"str":"ā","codeValue":257,"analog":"-a", "analogCodes": [45, 97]}, {"str":"ī","codeValue":299,"analog":"-i", "analogCodes": [45, 105]}, {"str":"ū","codeValue":363,"analog":"-u", "analogCodes": [45, 117]}, {"str":"ṛ","codeValue":7771,"analog":"r.", "analogCodes": [114, 46]}, {"str":"ṝ","codeValue":7773,"analog":"-r.", "analogCodes": [45, 114, 46]}, {"str":"ḷ","codeValue":7735,"analog":"l.", "analogCodes": [108, 46]}, {"str":"ḹ","codeValue":7737,"analog":"-l.", "analogCodes": [45, 108, 46]}, {"str":"ṁ","codeValue":7745,"analog":".m", "analogCodes": [46, 109]}, {"str":"ṃ","codeValue":7747,"analog":"m.", "analogCodes": [109, 46]}, {"str":"ḥ","codeValue":7717,"analog":"h.", "analogCodes": [104, 46]}, {"str":"ñ","codeValue":241,"analog":"~n", "analogCodes": [126, 110]}, {"str":"ṅ","codeValue":7749,"analog":".n", "analogCodes": [46, 110]}, {"str":"ṭ","codeValue":7789,"analog":"t.", "analogCodes": [116, 46]}, {"str":"ḍ","codeValue":7693,"analog":"d.", "analogCodes": [100, 46]}, {"str":"ṇ","codeValue":7751,"analog":"n.", "analogCodes": [110, 46]}, {"str":"ś","codeValue":347,"analog":"'s", "analogCodes": [39, 115]}, {"str":"ṣ","codeValue":7779,"analog":"s.", "analogCodes": [115, 46]} ] People call them Sanskrit:IAST letters, romanic version for letters from Devanagari alphabet. Some of them are not show at all, apart from those that are near code 256. Ones that are bigger like 7773 or such are not shown. Which font should I use or are there some style settings I could use?
  25. I'm completely new to Phaser and am coming to it from a general Web Development background. I need to be sure I understand a few of the terms/nouns used when defining/answering "What am I looking at/rendering?". Currently, it seems to me that: State (as in the StateManager) - the difference between booting, loading, login, main menu, tactical game map, full-screen mini map Scene - the difference between the tactical map when the player is in sector A1 vs. B1 vs. C1 Level - really only related to game design and a subset of Scene changes World (Phaser.World) - little more than a container for everything in the game; mostly used to use the default Stage, bound the Camera, and potentially affect physics Camera - the portion of the Stage which is currently being rendered in Phaser's web browser element (e.g. using WebGL/canvas) Stage - the subset of the World which stores and controls renderable stuff 1. Am I correct that a tactical game map and a game minimap would be different State objects? 2. Going through the initial tutorial and looking at the paucity of World examples implies to me that the world is a relatively background object, only incidental to the game insofar as it is used as a method to bound the stage, camera, and physics. Is that really it, or is the World probably the key point to, for example, manage dynamically adding and removing data about nearby stuff in a particularly large game map? 3. Could a Scene be validly defined in the context of Phaser as "the set of things to be rendered"? If so, then what meaningful difference is there between a Scene and a World? Otherwise, is a Scene really more "about" the graphic/art/audio side of game design the way a Level might be mostly about the game mechanics, difficulty curve, and narrative flow? Looking at some videos of game creation with tools like Unity, "Scene" seems to have a fairly specific and technical connotation within the context of game design, but Google has not provided me any indication of exactly what that definition and connotation is. I do see that the Phaser 2 docs don't reference "scene". 4. Are there terms I am missing that I should make sure I understand because they might not mean quite what I think they mean (e.g. I expect the verb "render" to approximately mean "putting stuff on screen", and the noun "view" to mean something along the lines of "view" in MVC).