Search the Community

Showing results for tags 'phaser'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 3,291 results

  1. dcgames

    Jumping Cube

    I just did HTML5 implementation of an old game from Unix platform which seemed pretty much lost. The AI is moderate to avoid performance issues on the client browser. Expecting some feedback on it. Web: http://www.playonlinedicegames.com/jumpingcube Android: https://play.google.com/store/apps/details?id=com.algotgames.jumpingcube
  2. virginia_games

    TileMap Shuffle

    I'm having trouble using Phaser's TileMap.shuffle. When I use it, it shuffles the area of tiles like it should, but the tiles lose their unique properties after being shuffled. Is there some way I can shuffle tiles without losing collision properties? I'm using shuffle like this: myTileMap.setCollision(tileID, true, layer); // set a few collisions myTileMap.setTileIndexCallback(tileID, function (player, tile) { // I have two callbacks // do stuff myTileMap.shuffle(tile.x, tile.y, 5, 5, layer); // call shuffle }, game, walls); When the callback runs, the 5x5 area on the map loses its specific tile properties. Inside the callback, I can re-set the collision tiles, but I can't rewrite the callback I am in. Is there another way I should be going about achieving this? Thank you.
  3. Hello all. I am having a browser-specific issue with Phaser 2.10.0 that I cannot seem to understand. I have the following code for a button. minDimension = Math.min(game.width, game.height); resetButton = game.add.sprite(game.width * 0.5, game.height * 0.925, 'Reset'); resetButton.anchor.setTo(0.5, 0.5); resetButton.width = resetButton.height = minDimension * 0.075; resetButton.inputEnabled = true; resetButton.events.onInputDown.add(resetProcess, this); This puts a reset button image at the middle of the bottom of the browser window. As expected, when clicked or tapped, the resetProcess() function is called and the level in my game is reset. This works as expected in most browsers on desktop and mobile; however, in Android Chrome (in my case, Android 7.0.0 and Chrome 64.0.3282.137) the button appears but does not do anything when clicked. I verified that the issue is not in my resetProcess() function. It seems that the onInputDown event isn't working properly. I also tried the following code, using a button instead of an image. minDimension = Math.min(game.width, game.height); resetButton = game.add.button(game.width * 0.5, game.height * 0.925, 'Reset', resetProcess, this); resetButton.anchor.setTo(0.5, 0.5); resetButton.width = resetButton.height = minDimension * 0.075; This caused behavior identical to the snippet above. Previously, a few months ago, I was able to get my button working as expected no matter the browser, and no changes were made to this part of my code since then. Does anyone have any thoughts as to what might be causing this issue, and how to fix it? Thanks.
  4. Hello guys, in this tutorial we implement entering username for players by creating another login phaser state. Tutorial: http://gojasonyang.com/post/phaserMultiplayerGamePart7.html Github: https://github.com/dci05049/Phaser-Multiplayer-Game-Tutorial
  5. Hi everyone, I'm actually working on an app using phaser. I receive inputs from a device and i need to draw the last 200 points received each frame. I looked all day trying various solutions with bitmapdata and render textures but i couldn't find any way to draw all thoose points at once, each time i check with the firfox's canvas inspector i get to 202 drawings with something like 800 calls, i'm totally lost. Could any one help me? Thank you in advance!
  6. DavidAames

    Error when adding sounds with phaser

    Hey guys, first things first: sorry for my bad english. I have a big problem with phaser. I build a educational game without a webserver and everything's going fine and runs perfectly (using Phaser.CANVAS). But when i load a sound (game.load.audio("theme","assets/music/theme.ogg");) i get this error: "Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https." I've watched online and it seems, i need to have a webserver. But there are some questions and problems with this kind of thing. 1. Why can i add pictures, animations,code and more from my harddrive but music is a no go?! 2. I want the Game runs complete offline. It's important because the guy i am making this game for is teacher and they still have no Internet in his school. (unbelivable but true) 3. If I would setup a local server, then every who gets the game need one to?! it's so frustrating. i build the game as a html-file because this game should go to other schools with linux, mac etc. I just wanted it runs everywhere. With or without internet, no matter what OS is using. But what is a game without a Soundtrack? I have build the whole game and the only thing missing, is sound. I hope somebody can help me.
  7. Hi, Our company develop simulations of aircraft systems. We are looking for developers that use Phaser Editor, and has knowledge of Typescript or Javascript and Phaser. Also we will provide you our own framework for developing easier and faster. It's a fully freelance job and we will give you only deadline. Payment method is open to negotiation. You can check our examples here: http://www.flycoglobal.com/B737schematics/ExteriorLightingLocations/ http://www.flycoglobal.com/B737schematics/BleedAirSystem/ http://www.flycoglobal.com/B737schematics/HydraulicPowerDist/
  8. I finished my first HTML5 Game which was very modest in scope. I wanted to build a simple connect the pipes via rotation game. It took me to 2 weeks to complete at 2-4 hours a day on my off hours, in total 38 hours. I build it using Phaser, CoffeeScript and Sinatra. It uses LZ and store.js for storing data. The hardest part was drawing the flow graphic overtop of the pipes as I had to reverse the animation depending one which way it flowed into the pipe. If anyone is interested, I am considering open-sourcing the game. http://www.kongregate.com/games/omenking/piepezania
  9. FahrulID

    Responsive Fullscreen

    I want to ask,, I want to make a game that it would fit to Phone Screen at any Screen Resolution with 800x600(or etc) canvas is it possible ? how can i do that ?
  10. CyborgNachte

    Stop all animations in a sprite group

    Hey there! I was wondering how you stop all animations in a sprite group when clicking one of them. I can't seem to get it to work. Heres my code that deals with it: function create(){ cardPack = game.add.group(); cardPack.create(game.world.centerX - 250, game.world.centerY, 'card'); cardPack.create(game.world.centerX - 75, game.world.centerY, 'card'); cardPack.create(game.world.centerX + 100, game.world.centerY, 'card'); cardPack.callAll('animations.add', 'animations', 'flip', [0,1,2,3], 12, true); cardPack.callAll('play', null, 'flip'); cardPack.setAll('inputEnabled', true); cardPack.setAll('input.useHandCursor', true); cardPack.setAll('events.onInputDown.addOnce', stopAnimation, this); cardPack.setAll('input.priorityID', 1); } function stopAnimation(){ cardPack.callAll('animations.stop', 'animations', null, true); } Is the error in the callAll for the animation stop or in the setAlll for event onInputDown? I've tried manipulating both and looking for examples for this but I'm coming up empty handed or just not searching correctly.
  11. I've started writing a generator for Phaser 3 typescript definitions using Richard's JSDoc annotations. If anyone is interested in helping: https://github.com/troyedwardsjr/phaser3-tsd
  12. coelacanth

    Cannot read property '2' of undefined

    Here is the code from an example. I have separte tiles images. <!doctype html> <html> <head> <script src="phaser.min.js"></script> </head> <body> <script> var game = new Phaser.Game(1024, 1024, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create }); function preload() { game.load.tilemap('map', 'bsdmap.json', null, Phaser.Tilemap.TILED_JSON); game.load.image('terrain', 'terrain.png'); game.load.image('p1', 'p1.png'); game.load.image('p2', 'p2.png'); game.load.image('bg_tile', 'bg_tile.png') //game.load.image('phaser', 'assets/sprites/arrow.png'); //game.load.spritesheet('coin', 'assets/sprites/coin.png', 32, 32); } var map; var layer; function create() { map = game.add.tilemap('map'); map.addTilesetImage('terrain'); map.addTilesetImage('p1'); map.addTilesetImage('p2'); map.addTilesetImage('bg_tile'); layer = map.createLayer('Tile Layer 1'); layer.resizeWorld(); } </script> </body> </html> Here is a tiled map in json format { "height":32, "infinite":false, "layers":[ { "data":[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], "height":32, "name":"Tile Layer 1", "opacity":1, "type":"tilelayer", "visible":true, "width":32, "x":0, "y":0 }], "nextobjectid":1, "orientation":"orthogonal", "renderorder":"right-down", "tiledversion":"1.1.2", "tileheight":32, "tilesets":[ { "columns":0, "firstgid":1, "grid": { "height":1, "orientation":"orthogonal", "width":1 }, "margin":0, "name":"tileset", "spacing":0, "tilecount":4, "tileheight":32, "tileproperties": { "0": { "blocked":"" }, "1": { "blocked":"" }, "2": { "platform":"" }, "3": { "platform":"" } }, "tilepropertytypes": { "0": { "blocked":"string" }, "1": { "blocked":"string" }, "2": { "platform":"string" }, "3": { "platform":"string" } }, "tiles": { "0": { "image":"..\/..\/..\/..\/Users\/Andrew\/Desktop\/totem burners assets\/tiles2\/terrain.png", "imageheight":32, "imagewidth":32 }, "1": { "image":"..\/..\/..\/..\/Users\/Andrew\/Desktop\/totem burners assets\/tiles2\/bg_tile.png", "imageheight":32, "imagewidth":32 }, "2": { "image":"..\/..\/..\/..\/Users\/Andrew\/Desktop\/totem burners assets\/tiles2\/p1.png", "imageheight":32, "imagewidth":32 }, "3": { "image":"..\/..\/..\/..\/Users\/Andrew\/Desktop\/totem burners assets\/tiles2\/p2.png", "imageheight":32, "imagewidth":32 } }, "tilewidth":32 }], "tilewidth":32, "type":"map", "version":1, "width":32 } All the tiles are embedded in Tiled. But I got an error: Uncaught TypeError: Cannot read property '2' of undefined at Object.parseTiledJSON (phaser.min.js:3) at Object.parse (phaser.min.js:3) at new i.Tilemap (phaser.min.js:3) at i.GameObjectFactory.tilemap (phaser.min.js:3) at Object.create (index.html:33) at i.StateManager.loadComplete (phaser.min.js:3) at i.Loader.finishedLoading (phaser.min.js:3) at i.Loader.processLoadQueue (phaser.min.js:3) at i.Loader.asyncComplete (phaser.min.js:3) at i.Loader.fileComplete (phaser.min.js:3)
  13. Many 2D even 3D frameworks now support Spine. Even Phaser 2.6.2 has a plugin for Spine, thanks to Orange Games. So do you plan integrating Spine in Phaser 3?
  14. eyo_omat

    Ticking time bomb in a game

    I am trying to create a bomb that only goes off after the player has collides with it but delays for a number of seconds. Currently it goes off immediately I have my collision as below game.physics.arcade.collide(this.player, this.tnts, this.tntCollision, null, this); and the collison handler as below tntCollision: function (player, tnt) { if (player.body.touching.right){ player.body.velocity.x = -200; } else if (player.body.touching.down) { tnt.kill(); var explosionGroup = "explosionSmallGroup"; var explosion = this[explosionGroup].getFirstExists(false); explosion.reset(tnt.x, tnt.y); explosion.animations.play('explode', 30, false, true); } else if (player.body.touching.left) { player.body.velocity.x = 200; } }
  15. I am trying to make an android build via cocoon.io using Canvas+ The game imports json tilemap data generated by Tiled. The game works fine in the browser, it evenr works when I use cocoon.io's webview instead of canvas+ (very slow though, like 1 FPS). I understand that this is probably a cocoon.io issue, but maybe someone else had this problem? Any idea what might be wrong?
  16. Kalablum

    Projected Trajectory

    Hi, could some one point me to right direction on how to do this kind of predicted trajectory?
  17. I'm very new on Phaser, Hope you all can help me This is my fresh code <!doctype html> <html> <head> <meta charset="UTF-8" /> <title>hello phaser!</title> <script src="//cdn.jsdelivr.net/phaser/2.5.0/phaser.min.js"></script> </head> <body> <script type="text/javascript"> window.onload = function() { // Note that this html file is set to pull down Phaser 2.5.0 from the JS Delivr CDN. // Although it will work fine with this tutorial, it's almost certainly not the most current version. // Be sure to replace it with an updated version before you start experimenting with adding your own code. var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create }); function preload () { game.load.spritesheet('courtrecordbtn', 'src/images/court-record.png', 194, 71); game.load.spritesheet('profilesbtn', 'src/images/profiles.png', 194, 71); game.load.spritesheet('nextbtn', 'src/images/next.png', 194, 71); game.load.image('logo', 'phaser.png'); } function create () { var logo = game.add.sprite(game.world.centerX, game.world.centerY, 'logo'); logo.anchor.setTo(0.5, 0.5); // Court-Record Button var courtrecordbtn = game.add.button(606, 0, 'courtrecordbtn', actionOnClick, this, 2, 1, 0); courtrecordbtn.onInputOver.add(over, this); courtrecordbtn.onInputOut.add(out, this); courtrecordbtn.onInputUp.add(up, this); // Profiles Button var profilesbtn = game.add.button(0, 0, 'profilesbtn', actionOnClick, this, 2, 1, 0); profilesbtn.onInputOver.add(over, this); profilesbtn.onInputOut.add(out, this); profilesbtn.onInputUp.add(up, this); // Next Button var nextbtn = game.add.button(game.world.centerX - 97, 529, 'nextbtn', actionOnClick, this, 2, 1, 0); nextbtn.onInputOver.add(over, this); nextbtn.onInputOut.add(out, this); nextbtn.onInputUp.add(up, this); } function up() { console.log('button up', arguments); } function over() { console.log('button over'); } function out() { console.log('button out'); } function actionOnClick () { background.visible =! background.visible; } }; </script> </body> </html> I want to know how to make a button or images will appear if called, and can disappear too. Thankyou Very Much.... Edited : I Figured out i can use "If ", but i want to know another simplier way <!doctype html> <html> <head> <meta charset="UTF-8" /> <title>hello phaser!</title> <script src="//cdn.jsdelivr.net/phaser/2.5.0/phaser.min.js"></script> </head> <body> <script type="text/javascript"> window.onload = function() { // Note that this html file is set to pull down Phaser 2.5.0 from the JS Delivr CDN. // Although it will work fine with this tutorial, it's almost certainly not the most current version. // Be sure to replace it with an updated version before you start experimenting with adding your own code. var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create }); // Variable var courtrecordbtnenable = true; var profilesbtnenable = true; var nextbtnenable = true; function preload () { game.load.spritesheet('courtrecordbtn', 'src/images/court-record.png', 194, 71); game.load.spritesheet('profilesbtn', 'src/images/profiles.png', 194, 71); game.load.spritesheet('nextbtn', 'src/images/next.png', 194, 71); game.load.image('logo', 'phaser.png'); } function create () { var logo = game.add.sprite(game.world.centerX, game.world.centerY, 'logo'); logo.anchor.setTo(0.5, 0.5); // Court-Record Button if (profilesbtnenable == true) { var courtrecordbtn = game.add.button(606, 0, 'courtrecordbtn', delnextbtn, this, 2, 1, 0); courtrecordbtn.onInputOver.add(over, this); courtrecordbtn.onInputOut.add(out, this); courtrecordbtn.onInputUp.add(up, this);} else { } // Profiles Button if (profilesbtnenable == true) { var profilesbtn = game.add.button(0, 0, 'profilesbtn', profilesbtnclicked, this, 2, 1, 0); profilesbtn.onInputOver.add(over, this); profilesbtn.onInputOut.add(out, this); profilesbtn.onInputUp.add(up, this);} else { } // Next Button if (nextbtnenable == true) { var nextbtn = game.add.button(game.world.centerX - 97, 529, 'nextbtn', actionOnClick, this, 2, 1, 0); nextbtn.onInputOver.add(over, this); nextbtn.onInputOut.add(out, this); nextbtn.onInputUp.add(up, this);} else { } } function up() { console.log('button up', arguments); } function over() { console.log('button over'); } function out() { console.log('button out'); } function actionOnClick () { background.visible =! background.visible; } function profilesbtnclicked() { alert('Profiles Button Clicked'); } function delnextbtn() { } }; </script> </body> </html>
  18. I am developing a game where I need to zoom in entire map also I can be able zoom out. I have created a tilemap using tiled software and rendered it using phaser.js. How can I add this function to my game?
  19. jevisan

    Sprite flickering

    Im having an issue with my game. The player sprite flickers when positioning at certain points in the game. My tile maps are made in tiled editor so no risk of misplacing a tile. The flickering is only vertical and the physical body of the sprite is set a little smaller than the actual sprite which is 32 x 32 while the physical body is 16 x 28. I've also noticed that the flickering varies with the setting of the velocity. As an example, when jumping above a certain platform the sprite flickers when the assigned negative velocity of y and y gravity are assigned certain value, but it doesn't flicker when assigned another value. On the other hand, on another part of the game the whole screen/camera flickers at certain height. Any thoughts?
  20. CyborgNachte

    Tween on Click stops after rapid clicks

    Hey there! I'm pretty new to Phaser, but I've been making an idle clicker in it to learn the ropes. I've run into some issues with tweens that I'm not to sure how to fix. I have a sprite, and when you click it, it increments a counter and plays a 'bouncy' tween, to display you clicked on it. This is cookie clicker style, so the user will inevitably rapid fire click it at some point. The issue seems to be that after several rapid fire clicks, the tween just sort of gives up and stops working. My first assumption is that because we're creating a tween each time we get some kind of overload of them because we're not properly destroying them? I'm unsure how to effectively do this in this situation. The ways I attempted to fix it: use game.tween.remove(tweenName) at the end of the function (expecting the next click to create a new one) store tween in variable and if variable != null, clear variable before creating new tween in it. Neither of these had results which makes me think I'm not understanding this correctly. Code: crystal = game.add.sprite(game.world.centerX, game.world.centerY - 5, 'crystal'); crystal.anchor.set(0.5); crystal.inputEnabled = true; crystal.input.pixelPerfectOver = true; crystal.input.useHandCursor = true; //on click event firing crystal.events.onInputDown.add(actionOnclick, this); //this tween is just it moving up and down to 'float' game.add.tween(crystal.position).to( {y: game.world.centerY + 5}, 2200, Phaser.Easing.Linear.InOut, true, 500, 20, true).loop(true); //on click event function function actionOnclick(){ game.add.tween(crystal.scale).to({x: 0.95, y: 0.95}, 300, Phaser.Easing.Bounce.None, true, 300, 0, true); counter++; text.setText('Glamour: ' + counter); } Note: the tween doesn't need to complete if the user clicks again, just start over. It does this, but after so many rapid clicks it stops doing anything.
  21. Webdva

    [WIP] Kawaii Ketchup

    I've kinda been developing this game in a vacuum. So, if it wouldn't be too much trouble for you, and if you would like to, could you give me criticism or feedback such as what the game does that appeals to you or what the game does that you don't like? I might be missing something, I think. It's still a work in progress (kinda like an alpha version?) and I hope to have it really polished by the end of the first quarter of 2018. Also, I kinda just wanted to share and promote the game It's like an arcade game where you try to avoid getting hit by flying ketchup bottles and then you eat raisins in order to stay alive. https://webdva.itch.io/kawaii-ketchup And also, you can look at the source code. https://github.com/webDva/Kawaii-Ketchup
  22. Hey guys, I'm new to phaser and I'm not quite sure if this is a bug or a mistake of myself. In this code if the player has a circle as his body and if he is colliding with one of this obstacles he won't get separated as it is described in the phaser documentation. So if you move up and collide with the obstacle the console starts printing out true even if you stop moving. In addition to that if you walk against an edge of the obstacle the player gets stuck on it and can't get away of that. I'm confused because this doesn't happen if the players body is an rectangle. Does anybody have an idea? var game = new Phaser.Game(600, 600, Phaser.AUTO, "", {preload: preload, create: create, update: update}); var player; var cursors; var obstacles; function preload(){ game.load.image("robot", "player.png", 32, 48); game.load.image("obstacle", "box.png"); } function create(){ player = game.add.sprite(game.world.centerX, game.world.centerY + 200, "robot", 5); game.stage.backgroundColor = 'rgb(239, 228, 176)'; game.physics.arcade.enable(player); player.body.setCircle(player.width/2);// player don`t get seperated in the collide function //player.body.setSize(player.width * 0.8, player.height*0.8,player.width * 0.1, player.height*0.1 ); //player get seperated in the collide function player.anchor.set(0.5); player.angle = -90; cursors = game.input.keyboard.createCursorKeys(); obstacles = game.add.group(); game.physics.arcade.enable(obstacles); obstacles.enableBody = true; obstacles.create(game.world.centerX, game.world.centerY - 200, 'obstacle'); obstacles.create(game.world.centerX - 190, game.world.centerY - 200, 'obstacle'); obstacles.create(game.world.centerX + 150, game.world.centerY - 100, 'obstacle'); obstacles.create(game.world.centerX - 130, game.world.centerY, 'obstacle'); obstacles.create(game.world.centerX - 230, game.world.centerY, 'obstacle'); obstacles.setAll('body.immovable', 'true'); obstacles.setAll('anchor.x', '0.5'); obstacles.setAll('anchor.y', '0.5'); } function update(){ game.debug.body(player); obstacles.forEach(function(item) { game.debug.body(item); }); if (cursors.up.isDown) { game.physics.arcade.velocityFromAngle(player.angle, 200, player.body.velocity); } else { player.body.velocity.set(0); } if (cursors.left.isDown) { player.body.angularVelocity = -300; } else { if (cursors.right.isDown) { player.body.angularVelocity = 300; } else { player.body.angularVelocity = 0; } } game.physics.arcade.collide(player,obstacles,(p1,en)=>{ console.log(true); }, null, this); } cheers landa
  23. I have created tilemap using Tiled software of pixel size 1200x1000. While rendering it using phaser I have set width equal to 500 and height equal to 400.After this only map of 500x400 area is loading and remaining part is missing. How can I show the full map in 500x400 area on my webpage?
  24. jevisan

    Sound effects mashed up

    Hi , i'm having a difficulty while trying to play sounds on player input. The character is supposed to move and play a footstep sound while doing so. But the sound is really short and end up restarting the sound every call to update which causes it to sound mashed up. Is there any way i could fix this? The code isn't really that much relevant but still: update: function() { if (this.cursors.left.isDown) { this.player.body.velocity.x = -this.player.speed; this.player.animations.play('walk-left'); this.footstepA.play(); } } Oh and i would also like to reproduce another footstep sound after playing that one. Like so: footstepA, footstepB, footstepA, etc.
  25. In this multiplayer game tutorial series with Node.js server and Phaser client, it goes over room logic, and implementing maximum number of players. http://gojasonyang.com/post/phaserMultiplayerGamePart6.html