Skip to content

Phaser Games

  • Home
  • Tutorials
    • Phaser 3
    • Basics
    • Intermediate
    • Advanced
    • Games
    • Set Up Phaser 3 Project Template
  • Resources/Tools
    • Getting Started
    • List Of Resources
    • Phaser 3 Text Designer Tool
  • Snippets
    • Phaser 3 Snippets
      • Phaser 3 Starter Snippets
      • Phaser 3 Sprite Snippets
      • Phaser 3 Time Snippets
      • Phaser 3 Tween Snippets
      • Phaser 3 Animation Snippets
      • Phaser 3 Physics Snippets
    • Phaser CE Snippets
      • Phaser Starter Snippets
      • Phaser Sprite Snippets
      • Phaser Physics Snippets
      • Phaser Button Snippets
      • Phaser Text snippets
      • Phaser Tween Snippets
      • Phaser Sounds Snippets
      • Phaser Game Snippets
      • Phaser Snippets Miscellaneous
      • Phaser MVC Snippets
      • Phaser Class Snippets
  • Shop & Freebies
  • Purchase History
  • Contact

Phaser game.input.onUp event firing twice!

Leave a Comment / Bugs! / By William

Yesterday I was making a game for an online course I’m writing. The game has a flying cat and when you click anywhere on the canvas the cat will change position. This is the line of code I was using: game.input.onUp.add(this.changePos, this); The game was working fine on desktop mode, but when I changed to …

Phaser game.input.onUp event firing twice! Read More »

Sprite Characters with Keyboard Control

Leave a Comment / Games, Phaser Intermediate / By William

This is a project I made in response to a request on youtube to show how to make an animated sprite controlled by the keyboard. We can do this with just a few steps. 1. load the image 2. set up the animations 3. detect keyboard presses 4. change the robot’s position 5. adjust the …

Sprite Characters with Keyboard Control Read More »

Generate a random string in Javascript/Phaser

Leave a Comment / Javascript / By William

One of the thing I’ve had to do commonly over the years in making games is to be able to generate a random string. Now lot of times I do this on the server side of code to be able to generate a none, one time use code. But there are times where I have …

Generate a random string in Javascript/Phaser Read More »

Get the angle between 2 objects in Phaser

Leave a Comment / Phaser Advanced / By William

Something that has been very useful for me lately is to be able to get the angle between two objects or get the angle between the mouse and a central character. For example in a game with a spaceship where you want to click and fire, you need to know the angle to be able …

Get the angle between 2 objects in Phaser Read More »

Faking a Swipe in Phaser

2 Comments / Phaser Intermediate / By William

One of the advantages native programs like Java for Android or Swift for IOS has over web languages like HTML5 is having built-in detection for detecting swiping. But with a little bit of coding, we can detect the actions of a swipe. For that, we need to break down the action of a swipe The …

Faking a Swipe in Phaser Read More »

Adding a Toast Message in Phaser

Leave a Comment / Phaser Advanced / By William

A toast message is a text message that fades in and out. It is named a toast message because it is similar to someone raising a glass, making a toast and then lowering the glass again. It gets your attention without interrupting the experience. Here is an example The Code var StateMain = { preload: …

Adding a Toast Message in Phaser Read More »

Posts navigation

← Previous Page 1 … 7 8

Affordable Game Assets

JavaScript For Beginners – Free Course

Join The FaceBook Group

Facebook Group

Create and Publish HTML5 Games in 24 Hours

Create and Publish HTML5 Games in 24 Hours

Recent Posts

  • Floating in Phaser 3
  • How to make a health bar in Phaser 3
  • How to flip a sprite in Phaser 3
  • How to Double Click in Phaser 3
  • How to get Delta Time in Phaser 3
Copyright © 2021 Phaser Games | Powered by Astra WordPress Theme