Questions tagged [phaser-framework]

Phaser, an exceptional JavaScript framework, empowers developers to create captivating games for diverse platforms including desktop and mobile. This versatile tag is applicable across all iterations of the groundbreaking Phaser toolkit.

How can I retrieve properties from a superclass in Typescript/Phaser?

Within my parent class, I have inherited from Phaser.GameObjects.Container. This parent class contains a property called InformationPanel which is of a custom class. The container also has multiple children of type Container. I am attempting to access the ...

Having trouble uploading images from my personal computer onto Phaser 3

Currently in the process of coding a game for a school project using Phaser. I am quite new to Phaser and have very little knowledge of JavaScript. Despite searching online for potential solutions, none seem to be effective for me. I have included my cod ...

What is the best way to create a T-shaped hitbox for an umbrella?

I've recently dived into learning Phaser 3.60, but I've hit a roadblock. I'm struggling to set up the hitbox for my raindrop and umbrella interaction. What I'd love to achieve is having raindrops fall from the top down and when they touch the umbrella, the ...

Socket.io - Error 404: The requested resource was not found (polling-xhr)

I've browsed through similar queries on this platform, but unfortunately, none of the solutions seem to work for my specific issue - I'm starting to feel a little overwhelmed. My current project involves the integration of socket.io. I have successfully s ...

Encountering issues with the phaser framework while setting up a server on xampp, faced with errors in javascript and html

Recently, I've been working on a game using Phaser and encountered some issues while trying to run the code in XAMPP. The game's base is located at htdocs/itw/test.html, with the necessary pngs and json file stored in htdocs/itw/assets/. The pngs ...

Phaser - Revamp cache of DOM elements in loadState and bootState for

I created a game using Phaser.js and now I want to clean the cache of my loadState and bootState in order to remove image links. Currently, I am using Phaser.Cache to remove all the cache in my Game, but it seems that only the Game cache is being cleared. ...

Phaser 3 shows images as vibrant green squares

In my project, I have two scenes: Loading and Menu. In the loading scene, I load images with the intention of displaying them in the menu. Here is the code for the Loading scene: import { CTS } from './../CTS.js'; import { MenuScene } from &apo ...

Having trouble downloading the compression webpack plugin using npm, as it keeps throwing an error

Hey there, this message pops up when attempting to execute the following command: npm install compression-webpack-plugin Here is the accompanying error: `PS D:phaser gamesgame-slot-machine> npm install compression-webpack-plugin npm ERR! code ERESO ...

Exploring the 'events' module in npm can enhance event handling in Reactjs with eventEmitters. Let's delve into utilizing npm's '

I am looking to integrate npm's 'events' module into my React application. Currently, I have a game built in phaserjs with a level editor that requires communication with the game module. Following is my Folder Structure starting from the ...

What is the correct approach for detecting object collisions in Phaser 3?

Hey everyone, I'm facing a problem and could use some assistance. Currently, I am trying to detect when two containers collide in my project. However, the issue is that the collision is being detected before the objects even start moving on screen. It se ...

Pass data between JavaScript and PHP using the Phaser framework

I am trying to pass a JavaScript variable to PHP and then store it in a database. Despite searching for solutions on Google, I have not been successful. Most suggestions involve using AJAX, but the code doesn't seem to work when I try it. I attempted ...