All Questions
Tagged with phaser.js or phaser-framework
2,229 questions
1
vote
1
answer
417
views
Phaser 3 console.log() tile properties for a specific game character
anyone can suggest on a general level how to achieve following with Phaser 3:
I need to be able to console.log() in an updated manner the tile or terrain properties enemy sprite is on. Idea is to ...
0
votes
1
answer
46
views
Sprite passing through immovable wall?
So I'm trying to make a simple maze in Phaser.js, but collision has been a pain. I have gotten to the point where I can detect collisions between the sprite and my wall, but the sprite passes right ...
0
votes
1
answer
149
views
Slightly darken when hovered in phaser?
I'm making a menu for my phaser game, and I want the buttons to slightly darken when hovered over. I tried using this.setTint(), and my color (about the middle of white and black). This still just ...
1
vote
1
answer
41
views
Phaser won't render assets in React app but no problem outside of React
I've integrated Phaser into React app. I'm facing difficulty rendering
assets though. Assets render just fine outside of React application with server and template rendered but getting error when I ...
1
vote
1
answer
848
views
How to use polygon collision detection with Arcade Physics Engine in Phaser 3
I'm currently working on a side scrolling game project using Phaser 3 and the Arcade Physics Engine. However, I've encountered a challenge regarding collision detection with polygon shapes. I'd like ...
1
vote
2
answers
1k
views
TypeError: Cannot read properties of undefined (reading 'width')
I am trying to make my own world editor in Javascript. I am using a folder of individual tiles and placing them on screen. Then when you press on the tile you basically choose it. That works, but when ...
1
vote
0
answers
54
views
How to make objects without loss of speed using phaser js matter?
Example, removed gravity, removed friction, made maximum elasticity. The balls still stop. What else can you do to make the balls move endlessly? Or is this a phaser js bug?
var config = {
type: ...
1
vote
0
answers
88
views
matterjs physics not behaving correctly
In my game, I have a scenario where (simple) polygons are created dynamically in parts from vertices.
However, I am facing what appears to be a bug with the physics between these Polygons.
Take the ...
1
vote
1
answer
178
views
Phaser3 preFX addGlow doesn't work with scaling
I'm trying to use Phaser3 .. currently tried 3.70 and the 3.80 beta with no avail.
If I try to use someSprite.preFX.addGLow() it works when there is no scaling, but
if I use scaling the sprites ...
1
vote
0
answers
82
views
Error deploy on vercel in my webproject nextJS
I have a new project in next.JS in which I display a tiled map with phaserJS.
But when I deploy my project I get this error on vercel (on my localhost I have no problem)
here is my code on Home.js :
...
1
vote
1
answer
201
views
How do I upload a Spine folder using Phaser 3 and load the Spine object afterwards?
I am trying to familiarize myself with Phaser 3 by creating a project that can display a Spine animation and should then give the option to upload a folder with Spine files inside it and load this ...
1
vote
1
answer
68
views
Why Can't Phaser Load a Sprite when it's in another function?
Hello community of Stack Overflow,
I'm getting started with using both JavaScript and the Phaser framework. I'm playing around with creating sprites right now, and the code from where I'm creating the ...
1
vote
1
answer
252
views
Phaser 3: Rotate a sprite and automatically rotate all subsequent sprites
I have a series of horizontally-lined sprites in Phaser 3:
const sprite1 = this.add.sprite(20, 40, 'diamonds');
const sprite2 = this.add.sprite(50, 40, 'diamonds');
const sprite3 = this.add.sprite(80, ...
4
votes
1
answer
174
views
I'm having issues with Phaser 3 collisions
I created 2 objects (one solid circle and a stroke circle). But they simply don't collide as expected.
Here is my code:
const config = {
type: Phaser.AUTO,
width: 400,
height: 400,
...
1
vote
0
answers
131
views
How to make two buttons work on mobile - phaser 3
It's a very classic spaceship game where you kill enemies.
On mobile, I made a joystick to move the player and a button to shoot.
The problem is that when you move the player, you can't shoot. You can'...
1
vote
1
answer
93
views
how to have a scrool scroll animation on a script
what i mean by that is i am makeing a website and it has scroll animation and a phaser.js game what i want is to that scroll animation to be able to the same afect on the phaser game
i have 2 class ...
1
vote
1
answer
51
views
How can I load texture in scenes subclass?
I have a loading scene which preloads my textures..
preload() {
this.load.image("ship", "./assets/ship.png")...
and a level-scene with a custom player object..
export class ...
2
votes
1
answer
294
views
correct way to set mipmapFilter
Fiddle to test here: https://jsfiddle.net/oz9p5jx3/4/
Even setting mipmapFilter in many places I'm still getting sprite pixelated.
var config = {
backgroundColor :'#000000',
scene :...
1
vote
1
answer
241
views
Phaser 3 Game, Want To Resize GameObject Rectangles On Screen Resize
I am trying to resize some rectangles on screen on a screen resize. I am using Phaser 3.60 along with Tailwind CSS 3, and want to match the Tailwind breakpoints inside of my Phaser code. So for ...
1
vote
1
answer
69
views
Phaser.JS Spritesheet Animation not working
This isn't creating a Phaser.js animation and cycling through it one the 'wind' spritesheet. The wind spritesheet is 8 wide and 1 tall, and each sprite is 32x32 pixels.
All variables not defined in ...
1
vote
1
answer
90
views
Is there a way to cycle through a 2d array and change a text element's text with phaser.js
Trying to just cycle through them as shown below opens the dialogue, displays the first bit of dialogue, but then doesn't let me move forward. Any variables not defined in this snippet of code are ...
1
vote
1
answer
116
views
Phaser Making a fade to black reaction, having trouble with repeating events
I'm trying to add a fade to black event to my game. It triggers after a certain dialogue is triggered, and causes the screen to fade to black and then switch to another scene. I started by creating a ...
0
votes
1
answer
67
views
Create from objects not working in Phaser 2 CE
When working with Phaser3, this worked:
map.createFromObjects('Layer_Objects', 'sprite', { key: 'item' })
'Layer_Objects' is the name of layer in Tiled. 'sprite' is the image name that will replace ...
0
votes
1
answer
191
views
how Detecting Collisions in phaser.js
"what i am trying to do is when the 2 images hit each other they both stop i am making this for a game the 2 images are just going into each other plse help me the code is below the git fof ...
0
votes
1
answer
131
views
How to reproduce an animation right after one finishes in Phaser 3 Javascript
So i have two animations, the first one is just two frames where the character just starts walking and the other is one where the character is walking, the second one is looped, im using anims.chain ...