2,227 questions
1 vote
1 answer
63 views
Phaser collision detection between a group and a tile layer
How can you detect a collision between a group and a tilelayer in Phaser? A reason could be for example to delete bullets hitting a wall. In theory it is easy, just use a collider, but nothing works. ...
-3 votes
1 answer
336 views
How to give a pixel wood texture to font similar to Stardew Valley?
I'm currently working on my bachelor's project, I downloaded the Stardew Valley Title font to use it in my Web Game but I'm having problems getting that wooden texture. Here is how my title related ...
1 vote
0 answers
92 views
Hexagonal Tiled map appears offset and misaligned in Phaser 3 (missing rows, gaps, and wrong tile positions)
enter image description here I’m working on a Phaser 3 game that uses a hexagonal (staggered) map created in Tiled. However, when I load the map into Phaser, the tile layout appears offset where some ...
0 votes
0 answers
65 views
Camera follow not working properly in Phaser 3
I'm working on a Phaser 3 project where I want the camera to follow a physics-enabled sprite (an orc). I've set world bounds and camera bounds and used startFollow, but the camera doesn't seem to ...
2 votes
2 answers
184 views
How to color only a part of a Text object?
I'm trying to make slightly fancier text objects where part of the text in a Phaser text object is coloured. Googling around there seemed to be an addColor function to achieve this (shown off here, ...
0 votes
1 answer
93 views
Disable multiple keys in phaser 3
I use the right arrow key for my character’s movement. The problem is, when I press another key at the same time, the movement stops. Is there a way to keep the character moving even when other keys ...
0 votes
1 answer
118 views
Disabling Bootstrap event delegation for specific DOM elements
Environment Bootstrap version: 5.3.3 Browser: Chrome (latest) Framework: Vue.js 3 with Phaser 3.87.0 Problem Description I'm developing a game using Phaser 3 within a Vue.js application that uses ...
2 votes
1 answer
62 views
Is it possible to run a function inside Phaser 3, this.input.on dragstart?
I am writing a game of Solitaire in Phaser 3 and want to run a function inside of this.input.on('dragstart', .... I can drag a single card inside of dragstart, but I need a function to work out which ...
1 vote
1 answer
198 views
Phaser setting FPS is incorrect?
I am setting the FPS in my Phaser game like this: const config = { type: window.Phaser.AUTO, width: window.innerWidth, height: window.innerHeight, scene: GameScene, physics: { default: &...
1 vote
1 answer
51 views
cursors is not defined at Game.update (Phaser 3)
I'm currently learning Phaser and decided to use this Vite template (https://github.com/phaserjs/template-vite). These are the changes I've made: Boot.js: import { Scene } from 'phaser'; export ...
1 vote
1 answer
101 views
Phaser.js: mismatch between coordinates for graphics and Matter.js body
I'm trying to mathematically create some shape graphics in Phaser.js, and to attach matching Matter.js physics bodies to them. I'm finding that the coordinate systems used for these two things don't ...
0 votes
1 answer
70 views
How to make dom elements stay in it's place when camera scroll in phaser
I need to make my dom elements stay in it's place when the camera scroll in phaser. I tried setting setScrollFactor(0) but doesn't work. Is there other solution aside from updating dom elements ...
0 votes
1 answer
103 views
Manipulate matter.js Body
I run into an issue with generated bodies in matter.js. if i generate a body from svg via: Matter.Svg.pathToVertices(svgPath, 1) It can happen that the generated Body consists of more shapes like ...
0 votes
1 answer
49 views
Insert Image between, before or after texts in phaser 3
I want to combine text and an image in Phaser 3 and place them inside a container. What is the most efficient way to achieve this? Ideally, the layout should adapt to the container’s width. Is there a ...
3 votes
2 answers
203 views
Create physics body from svg in phaser with matter.js
I'm loading a svg as xml in the preload function: this.load.xml("xml-pipe-bottom", "assets/svg/shape_pipe_b.svg"); and create a body and the svg as sprite: const shapeBody = this....