All Questions
Tagged with phaser.js or phaser-framework
2,229 questions
1
vote
0
answers
58
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 ...
2
votes
2
answers
134
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
105
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 ...
3
votes
2
answers
168
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....
1
vote
1
answer
120
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: &...
0
votes
2
answers
105
views
How to detect fullscreenchange if it came from pressing f11
I'm creating a function for full screen via pressing f11 or from icon. What is the efficient way to detect if the fullscreenchange event came from pressing f11 below is my code going full screen by ...
1
vote
2
answers
77
views
After zooming in the main camera, how do I get a sprite's zoomed in viewport coordinates?
On a default Phaser project, I have a sprite positioned at 100, 100.
I want to get its coordinates when zoomed in to place an absolute div on top of it in HTML.
On zoom 1 this works:
const ...
2
votes
1
answer
122
views
Rotating a container about its center
So, I am trying to make a tetris game. I have created a tetriminoe using a group of tiles that is helped by a container. The container rotates fine, but I am trying to rotate this container by its ...
2
votes
1
answer
85
views
Making a Tile Follow Another Tile in Phaser 3
This is more of a logic question than a Phaser 3 question. I am trying to make the game 'snake'. I can move 1 body up, down, left, and right easily, however, I do have issues when there is more than 1 ...
1
vote
1
answer
108
views
Hold to interact button
I'm developing a game for cats with phaser 3.The game consists of a mouse that keeps moving in the screen and every time the cat touches it, it dies and then he comes from another direction and faster....
-1
votes
1
answer
77
views
making a light behind text with phaser [closed]
please i would like to add light behind text using phaser js like in this image (its the purple light)
i've tried to use these functions
this.add.pointlight(this.scoreText.x, this.scoreText.y, 0, ...
1
vote
1
answer
53
views
Animation stops at frame 1 in Phaser 3
In a specific section of my code, the animation for a sprite stops at frame 1 when I run this.sprite.anims.play("key", true).
I have ran animations in other sections of my code and they have ...
1
vote
1
answer
44
views
Spine2D Atlas 404 Error in Phaser with Webpack 5
When I try to load Spine2D's atlas in Phaser, using Webpack 5, I receive 404 for the skeleton.png asset.
// File: skeleton.atlas
skeleton.png
size:2046,1890
filter:Linear,Linear
...
Spine2D's atlas ...
1
vote
1
answer
109
views
Ghost AI not moving through intersections (Phaser 3, PacMan)
I am trying to make a pac_man game with Phaser 3. I have implemented the pac_man movement, however, I really need help with the ghost AI. The ghost is moving by its self, however, it is not passing ...
1
vote
1
answer
42
views
Tweens method converts my buttons back to their original size an and not the custom one I gave them
I'm creating four buttons, using the game engine Phaser 3. I try to give each button a custom size based on the screen size (so it always fits nice in the screen no matter what screen size). At first ...
1
vote
1
answer
97
views
Text and Image Quality is Very Low
I’m learning to use Phaser. I made a project in Vanilla Framework using Vite.js. In this project, image and font quality are showing very low. When I try to zoom in, then images and fonts are looking ...
-1
votes
1
answer
46
views
Best way to display LaTeX-style expression in phaser 3
Has anyone tried to display LaTeX-style expression in phaser 3? I need to display this latex-style expression
0
votes
0
answers
41
views
output or use a js variable from the function (function ($, Drupal) {}) Drupal
After sending data from my php to my js with DrupalSettings, I can use this data only in the function
(function ($, Drupal) {
var myData = null;
Drupal.behaviors.customJs = {
attach: ...
0
votes
1
answer
91
views
In phaser 3 what is the efficient way to transition from portrait to landscape and vice versa
import Phaser from 'phaser';
import PlayScene from './PlayScene';
import PreloadScene from './PreloadScene';
import QuestionScene from './QuestionScene';
import NotificationBannerScene from './...
2
votes
1
answer
831
views
How to set background color to transparent with Phaser 3
Trouble
I added two Text objects to a scene.
But for the latter one, I couldn't set background color to transparent.
Can anyone help me?
Here is the screenshot.
What I tried
I want the Text objects to ...
-2
votes
1
answer
110
views
How can I get my bullets to work in Phaser 3?
This is the code I currently have, the commented code was my initial try and the movements for the bullet are inspired by what I researched on Google, but the game continues to crash upon input.
'use ...
2
votes
1
answer
52
views
Tiled Map not loading in Phaser, getting only the bg color
Following is my code:
demo.json file (exported map from tiled):
{
"compressionlevel":-1,
"height":16,
"infinite":false,
"layers":[
{
"...
70
votes
2
answers
50k
views
Decide Pixi.js or Phaser [closed]
One of my school project is to make a realtime multiplayers webpage game, I am currently having difficulty to decide if I should go Pixi.js or Phaser for the game graphic and control, could anyone ...
2
votes
1
answer
98
views
How to prevent Phaser 3 shader from moving with camera?
I'm having trouble with a shader in my Phaser game. I've applied the shader as a post pipeline, hoping it would cover the whole screen with a water effect. But when I move my character around, the ...
1
vote
1
answer
72
views
Phaser object not Draggable
This code does not allow the rectangle w/topbar to be draggable. What do I need to change? I created a scrollabel Phaser scene and can get the 'box' to draw but it is not draggable. When the user ...