Questions tagged [phaser]

Phaser is a JavaScript framework for game development on desktop and mobile platforms.

Filter by
Sorted by
Tagged with
0
votes
2answers
244 views

Why is my spritesheet displaying all messed up in game?

I'm having an issue I don't quite understand, where my spritesheet is looping strangely and not showing the full sprite I want, even though I feel like I'm specifying it correctly. My code is in ...
0
votes
1answer
105 views

Setting a jump counter in my 2d platformer built with phaser

I have a platforming game, written in javascript with the Phaser.js framework, where my character collects objects. I thought trying to collect all objects in the least amount of jumps would be ...
1
vote
2answers
3k views

Why can't i change the background color in Phaser?

what is wrong with my code? i'm using game.stage.backgroundColor but the screen remains black. main.js: ...
1
vote
0answers
34 views

What are the key considerations I should have when choosing between Phaser 2 and 3? [closed]

I'm planning on experimenting with basic HTML5 game development. Since I'm just learning the ropes I'm sure either engine could support my needs. At the same time I would prefer to focus on the engine/...
0
votes
2answers
713 views

Phaser is not loading the same map created in Tiled software

I have created a sample map using the tiled software. Then tried to load the same on a webpage using phaser.js. But I am not getting the proper result. Is there any mistake in my code or something ...
0
votes
2answers
2k views

How player(sprite) in the phaser will opposite or reverse while going left and right?

I am developing a game where my player has to look to see forward when I am pressing right arrow key. But how can I make it look reverse after pressing left arrow? I can create a sprite of reverse ...
0
votes
1answer
1k views

phaser.io mouse cursor sprite

I am trying to build a game and i want people to be able to select stuff with a pointer but i don't want it to be just an ugly looking default pointer so i wrote this code to try and get a image as it ...
-1
votes
1answer
54 views

Phaser problem with .damage oneshots

I am trying to damage player or enemy when they collide.(enemy will be damaged when collided with bullet and player will be damaged when collided with monster) ...
1
vote
0answers
332 views

Phaser Pulling Data from Firebase and Loading it as a sprite

I am trying to pull img data from database to replace it with player sprite url. ...
0
votes
1answer
475 views

Rotating a group of bodies in Phaser

I want to create a game where enemies spawn, fly toward the player's ship, and stick to the side of it. The player can then rotate the ship and the stuck enemies will rotate with it. The way I have ...
2
votes
1answer
657 views

Component based architecture in TypeScript

I'm doing a game using Phaser with TypeScript. I want to implement a component based architecture for Actors. What I'm trying to achieve is this: ...
1
vote
1answer
745 views

Phaser Always Fix Camera Position to Sprite

I am developing a cross-platform overhead game using Phaser. Is there a way to always fix the position of a camera to a sprite? The following function works great, but I want the camera to always be ...
1
vote
0answers
203 views

Multiplayer client-side physics

I'm trying to handle all the physics on the client and correct data on the server. e.g. ...
2
votes
1answer
725 views

Infinite scroll with tweens in Phaser

Let's say you have a bunch of tweens running like this: http://holbrook.no/tests/featherfall.html Now you want to scroll them horizontally while they fall. By updating camera x, they start moving, ...
3
votes
0answers
2k views

Phaser: Scaling to fill screen, maintain pixel ratio, but not aspect ratio

I've used libraries in other languages before that provide different types of scaling via viewport types. The best example of what I want is from a library called libgdx for Java, their ScreenViewport....
1
vote
0answers
175 views

Create styled grid with phaserJS gaming framework

I am new to Phaser and this is my first game with Phaser gaming framework. Am trying to find the right way of coding a grid what you see in below image In some articles is being suggested to code it ...
1
vote
1answer
2k views

Planet gravity? [duplicate]

I am trying to make a game with the Phaser game engine and would like to implement some sort of planetary gravity. Essentially I just want the player to be able to walk on a circle or orbit a point. I ...
2
votes
1answer
617 views

Collision not working in phaser node multiplayer

I'm writing a tank trouble clone just for fun using phaser and node, so this is my tank instantiation ...
-1
votes
1answer
1k views

How to use custom font in Phaser?

I am trying to load WebFont in Phaser. I have seen the Phaser example, but I can't understand what asset do I need, what function I have to call, & what ...
0
votes
1answer
62 views
-2
votes
1answer
156 views

Phaser Shooting Game [closed]

I am making an shooting game in Phaser. I want to control the gun using the arrow keys i.e.: upArrow, DownArrow and Enter upArrow : is to increase the angle downArrow : is to decrease the angle Enter ...
2
votes
1answer
252 views

How do I add a PIXI container into a Phaser Game?

How do I add a PIXI container into a Phaser Game? I have a game made ONLY with PIXI. but now i would like to port it to a Phaser. All my game content happens inside a pixi container "...
3
votes
2answers
387 views

Pathfinding in Isometric Phaser with Tunnels

I want to create a 2D isometric game. Currently I'm looking and testing Phaser game engine with isometric plugin. Almost everything at the moment looks possible except few things. I will create a ...
0
votes
1answer
63 views

Phaser game is not registering collisions and input - but only on my machine [closed]

I was developing a game with Phaser and the Zenva Phaser Tutorial. I did some work on it last night, checked it was working, and went to bed. This morning, it isn't working! Input (either touch or ...
1
vote
0answers
363 views

Creating 2D worldbuilding games like Terraria or Starbound in frameworks like PhaserJS or PixiJS? [closed]

Frameworks like Phaser or Pixi support tilemaps, but I'm curious if that is already enough to get a map where the player can change everything that he wishes. I'm also not sure if browsers would be ...
1
vote
0answers
175 views

PIXI v4 - Is possible to disable Multi Texture Batching in PIXI v4 ?

I would like to know if is possible to disable the multi texture batching in a PIXI V4 game. Recently i jus update my game PIXI lib from version 3 to 4.2. I`m using cocoon Canvas + . It seems ...
3
votes
1answer
2k views

Intellisense with PhaserJS Library in Visual Studio Code

I am trying to use Visual Studio code along with PhaserJS but am confused about why the isn't working. I've read through http://www.johnpapa.net/intellisense-witha-visual-studio-code/ am think I ...
1
vote
1answer
1k views

How do you do tile-based movement in Phaser?

I'm looking to make 2D game that is very similar in movement to Pokemon Red or Blue (player must move a full tile in any direction, the ground moves smoothly beneath the player as they walk). I've got ...
3
votes
0answers
217 views

Find all tiles by ID in layer

In phaser 2.6.2, is there a way to retrieve all tiles given their ID from a TilemapLayer? The method searchTileIndex on Tilemap ...
5
votes
2answers
3k views

Animations with individual images in Phaser.js

So I have this game that I made a while back and I want to port it using Phaser. The game is made using individual PNG files for all the animation frames, and there are over 100 of them. From ...
1
vote
2answers
421 views

Sync bullets node.js phaser.io

i am currently having a struggle thinking about syncing bullets. I am using node js and phaser.io and I am creating top-down shooter. I would do it like this: Player shoots a bullet. Player sends ...
3
votes
1answer
854 views

Is it possible to make a pseudo isometric game with phaser?

If I use the isometric plugin for Phaser, I end up with something like the third case of the following picture: I would like to create a world in pseudo isometric, with only one axis tilted. This ...
2
votes
1answer
154 views

setSize in Phaser.io

so I've been troubleshooting for hours now. I am using the latest version of Phaser.io and I cannot get troubleshoot the errors. I am aware that it is related to ...
0
votes
1answer
847 views

Phaser: show text when overlap sprites

I am trying to work out a way to add a text to the top left corner of the viewport when two of my sprites overlap. One of them is a item and the other is my character. I can already detect for overlap ...
0
votes
1answer
373 views

Trouble loading sprite from spritesheet with Phaser

I am working on re-creating a breakout clone to help me learn Phaser (following the overall design of jsbreakouts.org). Anyway, I have the start screen set up. From the start screen, I can transition ...
1
vote
2answers
141 views

Loading maps on HTML5 Games

I was wondering if my 2D Pixel Art platformer HTML5 game(a lot of words there..) should have loading screens for maps. My game has different maps and I don't know if a loading screen should be ...
0
votes
2answers
2k views

How to kill a fired bullet sprite after certain amount of time in Phaser?

The bullet should be killed after it was shot from the player, and after a certain amount of time. ...
1
vote
2answers
635 views

Phaser BitmapData Pick Color and Paint

Hi guys, Could anyone kindly shows me a little bit of code about pick and paint color to the sprite? here is my code that I have played around, but I still cannot find out and achieve it. Thanks ...
2
votes
1answer
2k views

Does Phaser Arcade.Body velocity include deltaTime or not?

I want to move my character along the x axis with constantly speed. I thought move depends on frame rate. So, technically I should write ...
0
votes
1answer
2k views

add physics to a group or container body in phaser

I'm developing a HTML5 Phaser game. In this game I do have a Group which I would like to behavior as a physics body (arcade-physics). It is a character with a lot of moving parts (sprites) inside ...
1
vote
1answer
162 views

In PhaserJS, how do I get a clicked Physics.P2 body's data?

I have a sprite with Phaser.Physics.P2 enabled, using a custom shape loaded with loadPolygon() from a ...
0
votes
1answer
3k views

Phaser.io with Socket.io - What should the Server calculate and what the Client?

I'm currently playing around with phasio.io and socket.io to create a really simple multiplayer. For the beginning i created basic movement which is synched via socket.io. The clients are sending ...
3
votes
0answers
285 views

Rendering the whole game world

I'm trying to create a live minimap of the complete game world. In order to do that I'm taking a snapshot of the whole game world (not only the part that is displayed) every 100ms or so. The code I'...
2
votes
1answer
117 views

Point plotting with a line graph

Please see attached screenshot. Here's how it works. A is a slider that goes up and down, and the red line uses the centre point of the A slider to draw its start point. B is another slider, but ...
1
vote
0answers
767 views

How to use multiple tilesets in a map?

I'm currently looking at this phaser example: http://phaser.io/examples/v2/tilemaps/blank-tilemap Here, the author creates a simple tilemap editor. In line #33 he adds a preloaded image as tileset. ...
3
votes
1answer
3k views

Phaser / PIXI: World size vs. Stage size

I am using Phaser to build a zoomable / pannable 2D map with the intended functionality being that the home camera position is always in the middle of the World coordinates. I have a problem where my ...
1
vote
0answers
55 views

Sprite not being destroyed after being walked on (Phaser 2.4.6)

I've been developing a game for not long in the Phaser framework so I may be a little nooby so be warned. I have a timer that runs whenever an update is called and it would set the sprite I walked on ...
1
vote
0answers
464 views

Using canvas graphics instead of traditional sprites in phaser

I'm trying to learn Phaser (total beginner with mild JS experience) and I'm following tutorials and such where everything is using sprites. I'm trying to get by with basic canvas shapes instead of ...
2
votes
3answers
2k views

How to center a tilemap in Phaser?

In Phaser, I am loading a Tilemap from JSON. I would like my Tilemap to display in a particular position (for simplicity here I say the middle of the screen). ...
4
votes
1answer
892 views

“Industry Standard” JSON formats for game assets [closed]

This question is inspired by my venture into the Phaser game engine but seems to apply to any engine that uses JSON for its asset format. Phaser relies on PhysicsEditor to export and create the JSON ...