Category "phaser-framework"

How to make sprite not collide with another sprite but only with player. Phaser 3 and matter js

Big story short: I'm using matter js with phaser3 and I have a player, platform, saw and tree. Like in a regular platformer, the saw should be halfway between t

How to make a sprite moving at the same speed of tileSprite in Phaser3

I am new in Phaser. I want to make a background which represent the ground moving and there should be a bunch of rocks above it which I made them as a sprite gr

Integrate Phaser Game with React as component

I'm new to React, I want to make a component for my phaser game to insert it into a react project. My Game component: import React, { Component } from 'react' i

Having a problem with Javascript Phaser 3 Class

I'm trying to implement the following code into a class, as follows is the code ,and the attempted class. Implementation //----------------------------MIST--

Phaser 3 interactive hitarea of a container

I have a container containing an image and some text; We are facing an issue with the interactive hitarea of the container this.image = this.add.image(0, 0, 'Gr

Phaser 3 - Groups of Dynamic Sprites Not Colliding

I can’t get two groups of dynamic sprites or a dynamic sprite and a group of dynamic sprites to collide. I can get each to collide with groups of static

`Phaser.Display.Align.In.Center` works well with the first line of my text but doesn't center my 2nd line. How do I fix it?

I'm trying to make some kind of a notification/message box giving players hints to advance the gameplay, here is the code var game = new Phaser.Game({ wid

Phaser 3 (Game framework): collider callback is called, but somethimes object still passes through other object, instead of colliding

I'm working on a small flappy-bird-like-game demo. Everthing seems fine, but I have a small problem/question. I setup a collider function, and the callback work

Phaser3 Scene switching error. How can i do?

I have this error when I touch a wall to change scene: Cannot read properties of undefined (reading 'start') I tried several techniques but none worked, yet I

It seems Phaser 3 throws "animationcomplete" notification twice for a single animation, how do I make it one?

I'm confused about the 'animationcomplete' notification. I thought I would receive the notification one time when the animation I listen finishes. It turns out

Phaser 3: Call function from another class

I have create updateCanvas() function in file a.ts: export class loadscene extends Scene { textures1!: any textures2!: any textures3!: any constructor()

How to make Phaser3 GlowFilterPostFx work in an ES6 project?

I'm trying to apply a dynamic glow effect to some of my Phaser3 game objects. There's no built-in glow effect, but the framework author publishes a separate pac

use free texture packer for phaser3

I'm using phaser3 and free texture packer, is it possible to do that? if yes please tell me how? I tried to use addAtlasJSONHash but it was logging that this fu

How to get target who are touching on a specific sprite

I am trying to make a mini-game by phaser.js. In my idea. A sprite object can collided to a static sprite and continually perform desired effect if they are sti

Phaser 3: Clone Sprite on click & drag immediately

I have a sprite that works as a button, but as you press it, it duplicates and lets you drag the duplicate. I've almost got it to work, however currently you ha

How to delete matter js object on collision dynamically phaser js

I'm making a platformer game in which there is player and some powerups. To check the collision I used matterjs collisionactive function: this.matter.world.on("

How can I fix the visual borders bug for Phaser 3 Particles?

I use the Particle Emitter in Phaser 3 to make shooting stars in my background. This technically works great, but there is still a problem with the particles it

How can I get data from tiled map editor to my javascript file?

I have a JavaScript game, using the Phaser 2 framework, and I am trying to add a new map to my game. So I made a scene in Tiled map editor so I can export to my

Phaser JS 3: how to debug game performance

So, I'm working on a project, attempting to learn Phaser as a ruby dev (JS isn't my most confident programming language). Having run my game on a lower-spec la

How to read position x of Shape Object when during tween

I have the Circle object that extends shape and am trying to get the value of x or position of the object in 2d plane. During animation (tween) the position doe