Skip to content

e10101/phaser-breakout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Breakout game

Set and Run

Clone

clone the project

Install node dependencies

npm install

OR

yarn install

Build

npm run build

Run

npm start

TODO

  • Add friction to paddle
  • Add bricks
  • Add brick kill function
  • Add bricks auto scale function
  • Add out box check
  • Add GameOver state
  • Refactor the image to code based sprite
  • Check win
  • Add sound effect
  • Implement splash state
  • Mobile friendly
  • Add animation
  • Faster on mobile or large screen.

RESEARCH HISTORY

Doc

How Phase work and get start

Breakout game in Phaser

Phaser with TypeScript

Phaser starterkit

States and lifecycle

Draw box

Create MENU

Physics

Webpack add custom css

Touch / mouse input

Learned:

mousePointer: The most recently active Pointer object. When you've limited max pointers to 1 this will accurately be either the first finger touched or mouse.

activePointer: The mouse has its own unique Phaser.Pointer object which you can use if making a desktop specific game.

pointer1: does not work when mouse click.

Typescript export class / static class

Move to

update delta

Drag

Friction

Box2D

Need buy, pass.

By usning collide callback function simulate friction

Add Bricks

Typescript export config

Destroy sprite

Group scale

Centering canvas

Debug game

Group position

Use the pivot of group, not the anchor. becouse anchor is used for sprite.

Out of bounds check

Add text

Game over

Draw box / circle sprite

Google colors

Group all killed count

Collide callback

Mobile friendly

Tween

Audio

World bound touch callback

About

Simple Breakout game made by Phaser & TypeScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published