Skip to main content

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
0 votes
1 answer
9 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 ...
Koffee's user avatar
  • 329
0 votes
1 answer
24 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', './...
Newboy11's user avatar
  • 3,038
1 vote
1 answer
32 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"); ...
Nguyễn Hải Long's user avatar
1 vote
1 answer
24 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 ...
Koffee's user avatar
  • 329
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 = ...
Nguyễn Hải Long's user avatar
2 votes
1 answer
65 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); ...
Nguyễn Hải Long's user avatar
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: ...
Nguyễn Hải Long's user avatar
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 ...
LeftClickMage's user avatar
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 ...
LeftClickMage's user avatar
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 ...
LeftClickMage's user avatar
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....
Nguyễn Hải Long's user avatar
1 vote
1 answer
29 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 ...
starizard's user avatar
  • 531
1 vote
1 answer
42 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 ...
BdR's user avatar
  • 2,924
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>...
Newboy11's user avatar
  • 3,038
0 votes
0 answers
31 views

Using 'this' in custom Phaser classes

I'm working on an old school RPG using Phaser.js. I have what I know is a simple question. In my custom classes almost all have: export default class Chest extends Phaser.Physics.Arcade.Sprite{ ...
maddogandnoriko's user avatar

15 30 50 per page
1
2 3 4 5
145