Questions tagged [phaser-framework]
Phaser is a JavaScript framework for game development on desktop and mobile platforms. This tag can be used for all versions of Phaser.
phaser-framework
2,172
questions
2
votes
1
answer
22
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
19
views
How to make 2 sprites follow the same angle in Phaser 3?
Using this example, I'm trying to have to rectangle rotation around its Origin point, while have another sprite (white circle) at the end of it, that follows along.
Right now they are obviously ...
0
votes
1
answer
27
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
33
views
How can i add another panel into a Rex ScrollablePanel when click a button?
Basically, i want to create a mini chat dialog, when i type and click send, it will display into a scrollable table.
First i add an click event:
this.dialogChatInput.addListener("click");
...
1
vote
1
answer
25
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
37
views
How can i make Nested Sizer Scrollable in RexUI
Here is code for creating an nested sizer form winner_joiner
create() {
this.dialog;
var x = 1200,
y = 1600,
minWidth = 300,
minHeight = ...
2
votes
1
answer
66
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
66
views
How can i Resize text and add Icon to RexUI panel?
here im trying to create a scrollable panel by creating this small panel
const COLOR_PRIMARY = 0x4e342e;
var CreatePanel = function (scene) {
var panel = scene.rexUI.add.sizer({
width: ...
1
vote
1
answer
33
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 ...
1
vote
1
answer
43
views
How do I set a border around /background image under the minimap?
I have a minimap on the top right of my screen, and would like to add a border/background under it that way I can see it more clearly! Is there anyway to add an image under the minimap?
Everything I ...
0
votes
1
answer
50
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 ...
0
votes
1
answer
40
views
Is there any way i can get both Matter and Arcade physic in Player object
I tried to create a player object
export default class Player extends Phaser.Physics.Matter.Sprite {
constructor(data) {
let { scene, x, y, texture, frame } = data;
super(scene....
1
vote
1
answer
30
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 ...
1
vote
1
answer
43
views
How to access a custom class Settings global variable from Phaser.scene `game` instance?
I want to create a Settings global variable, which contains all the game setting and I can use in the different scenes. I want to access the settings in my LevelSelect-scene, to display which levels ...
0
votes
1
answer
52
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>...