@kevinorriss/tappy-plane

1.0.2 • Public • Published

Tappy Plane

Tappy plane is a clone of the popular Flappy Bird game, created in the Phaser HTML5 game framework.

A simple game created to experiment with Phaser games in React.

Tappy Plane

How to play

Simply click or tap anywhere on the game scene to make the plane ascend and try to fly safely between as many rocks as you can.

Requirements

Usage

You can use this package directly with Phaser like so:

import Phaser from 'phaser'
import TappyPlane from '@kevinorriss/tappy-plane'

const tappyPlane = new Phaser.Game({
    ...TappyPlane,
    scale: {
        ...TappyPlane.scale,
        parent: 'tappy-plane',
        fullscreenTarget: 'tappy-plane'
    },
    loader: { 
        ...TappyPlane.loader, 
        baseURL: 'http://localhost:4566/',
        path: 'images/tappy-plane'
    }
})

By overriding the scale object, you can specify the DOM element by ID where you want Phaser to place the HTML5 canvas. The same element can also be specified when in fullscreen mode otherwise the scaling and centering won't work.

The loader scene sets the baseURL and path values which are prepended to all load calls when loading the game assets.

Game Assets

This game was created for a React application so the assets do not get included in the package so that they can be lazy loaded.

You can download the assets for this game over on GitHub.

Readme

Keywords

none

Package Sidebar

Install

npm i @kevinorriss/tappy-plane

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

49.3 kB

Total Files

15

Last publish

Collaborators

  • kevinorriss