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 3 TileMap 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

Complex Objects – Phaser

Leave a Comment / Javascript, Phaser Intermediate / By William

Most of the time when we are writing games in Phaser we are using simple objects like a sprite, text, or a button. I really enjoy writing in Phaser, but sometimes I miss when I use to make flash games and I could create a lot of different elements within a class. While I can …

Complex Objects – Phaser Read More »

Making Missiles in Phaser

Leave a Comment / Games, Phaser Advanced / By William

In this video, we look at how to make and shoot missiles in Phaser with only 23 lines of code! The basic idea is to create a sprite, the missile, inside of a group. We place the sprite at the x position of the mouse and the y position below the height of the game. …

Making Missiles in Phaser Read More »

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

Phaser Snippers

  • Phaser 2 Snippets
  • Phaser 3 Snippets

Guides

  • Learn JavaScript Classes in 10 minutes
  • Phaser 3 Basics – Images, Text and Click
  • Set Up Phaser 3 Project Template
  • Scaling in Phaser 3
  • Dispatching Custom Events
  • Change image when clicked
  • Extend a sprite in Phaser 3
  • Image anchors

Affordable Game Assets

Subscribe for Updates!

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

  • Loading TIleMaps in Phaser 3 and JSON
  • How to use Phaser 3 TileMaps
  • Floating in Phaser 3
  • How to make a health bar in Phaser 3
  • How to flip a sprite in Phaser 3
Copyright © 2023 Phaser Games | Powered by Astra WordPress Theme