All Questions
Tagged with phaser.js or phaser-framework
2,229 questions
0
votes
1
answer
56
views
Spritesheet not loaded in Phaser.js
I load a spritesheet in preload-method and in the create-method i assign and present it.
this is working if i test it locally in the browser, but when i start the server with ip and want to test it on ...
1
vote
1
answer
91
views
Jest Test Fails with "ReferenceError: PIXI is not defined" in Phaser-CE Project
I am using the phaser-ce version 2.20.0 in my project.
Although being aware of the newer phaser version, I have to stick to the mentioned CE (community edition) version.
When I run a simple test ...
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 ...
0
votes
1
answer
195
views
Cant load Spine Animation in Phaser Editor
I just purchase Phaser Editor and trying to add an Spine Animation to my game from ,.Atlas and .skel file. Here is link to my file :GGdrive
After add those 2, phaser editor seem to cannot load it. My ...
0
votes
1
answer
230
views
How to add Spine animation to Phaser3 game
Im trying to add an animation from Spine to my game using 3 spine files from phaser example
,
but i don't know how it work. First i load spine pack in preload() :
this.load.setPath('assets/images/'); ...
2
votes
1
answer
76
views
Jump trough (up and down) platform in Phaser 3
I followed this tutorial which works great for jumpin up and landing on top of the platform.
I've setup the collision disable trick (so players can also jump down through) which also works great.
My ...
0
votes
1
answer
114
views
Audio key "stretchAudio" missing from cache in phaser 3
I tried adding audio in my game but when I call that audio using this.sound.add('') it encountered an error 'missing from cache'
//preload scene
preload () {
this.load.audio('stretchAudio', './...
1
vote
1
answer
78
views
Animation keep restarting with update() instead of playing normally in Phaser 3
I'm using the latest version of Phaser 3, javascript only (no TS).
I have my main scene that contains an update to a Sprite object within its self update method, like so:
MainGame.js
export default ...
1
vote
1
answer
164
views
How to get X Y in isometric tilemap
Im new to Phaser. I created a isometric map from Tile.
here my code to create my Map:
preload() {
console.log('pre load mainScene');
Cay1x.preload(this);
DatTrong.preload(this);
...
1
vote
1
answer
53
views
Adding Sprite to a Layer causes it to be at top instead of with the layer
I am adding a sprite to a group, and I expected it to be with the group’s layer, instead it is brought to the top of the canvas. Any ideas?
Code:
this.backObjects.add(this.target); //supposed to be in ...
0
votes
1
answer
76
views
How do I make 2 Immovable Objects Collide and Just Stop
I have searched online for many hours for an answer, but no one seemed to be doing movement like I was. I just started my Phaser journey, and got stuck pretty early. I want my game to have movement ...
1
vote
1
answer
62
views
Phaser 3 Tween syntax breakdown for updating properties
I'm new to Javascript and Phaser and I came across the following code while working on a project in Codecademy
this.tweens.add({
targets: obj,
duration: 750,
x: '-= 300',
});
I know ...
0
votes
1
answer
93
views
Refused to apply style from 'http://localhost:8080/style.css' because its MIME type
I'm planning to remove padding in my phaser canvas but when I use external css it doesn't work in my index.html I have the code below
<!DOCTYPE html>
<html lang="en">
<head>...
1
vote
0
answers
71
views
Phaser 3 collision - ball is disappearing in specific collision situations resulting in NaN values for velocity / position properties
I have a simple basketball shooting game built in Phaser 3. It has a ball, a rim with a point on each side where the ball can bounce off of, and a zone underneath the rim that I use to track for ...
2
votes
1
answer
391
views
Phaser 3 - tilemap.createBlankLayer -> putTileAt issues when using multiple tilesets
So I am working on a small hobby project using Phaser 3 and have run into some issues working with Tile map layers.
Right now I am creating a tilemap layer and using multiple spritesheets I'm loading ...
0
votes
2
answers
155
views
Removing extra space in phaser 3 text
'm trying to fit the text exactly the height of container. I set the text fontsize same as container height problem is there is a default space.I already set padding to 0. Is there a way to remove the ...
0
votes
1
answer
267
views
Error where my song key is missing from cache in Phaser JS
This is my first time adding audio in a Phaser (3.60.0) game and so I might have an obvious mistake but when I searched online I couldn't find an answer that fixed my problem.
The error from the ...
0
votes
1
answer
278
views
How to access current velocity of a sprite in Phaser JS
Is there a way to get the current velocity of a sprite in Phaser or another obvious way of finding when the player is still?
2
votes
1
answer
61
views
Add/parent physicsless sprite to matterjs vertexbody such that it moves with the body. PhaserJS using MatterJS
const poly1 = this.add.polygon(200, 200, Ployploy, 0x0000ff, 0.2);
ThisPlayer = this.matter.add.gameObject(poly1, { shape: { type: 'fromVerts', verts: Ployploy, flagInternal: true } });
//add this ...
0
votes
1
answer
79
views
get hitbox as well as image to rotate around a point
I used Phaser.Actions.RotateAroundDistance(spinningfire.getChildren(), { x: 600, y: -1780 }, 0.02, 200) in order to make a the group spinning fire to spin around a sprite. the only problem is that the ...
1
vote
2
answers
458
views
why is the camera not following the player if phaser 3
I tried to get the camera to follow the player with this.cameras.startFollow(this.player) but it still did not work. it just shows a black screen, why is this?
I was expecting it to follow the player ...
0
votes
1
answer
70
views
I have a variable that I want the program to continuously check its value
I have a variable that I want the program to continuously check its value. the code goes something like this:
var score = 1
if (player touches the star)
{
player moves to bottom of screen
score =...
0
votes
1
answer
48
views
Sprite location changes based on canvas size
my game has a dynamic width and height based on the users screen size. Im setting sprites at different locations on the map. The issue is that the sprites location will be off depending on the user ...
-1
votes
1
answer
500
views
Trying to deploy Phaser-game to Github Pages, getting error: Blocked because of a disallowed MIME type
Here is the live site: https://topi1.github.io/phaser-game/
Here is the code: https://github.com/Topi1/phaser-game
Trying to deploy my first phaser game to GitHub Pages, but I get errors:
Loading ...
0
votes
1
answer
87
views
FBInstant games error when loading images from url due to Content Security Policy
Hi im currently making a game for facebook and i ran into a problem regarding content security policy:
error message
I tried changing the content security policy a bunch of times, in the end i decided ...