phaser workshop internet world 2014

14
Phaser workshop

Upload: alvinsight

Post on 06-May-2015

400 views

Category:

Technology


1 download

DESCRIPTION

Phaser workshop at the Internet World 2014 in London, the session was run by the wonderful people at BeMyApp (http://events.bemyapp.com)

TRANSCRIPT

Page 1: Phaser Workshop Internet World 2014

Phaser workshop

Page 2: Phaser Workshop Internet World 2014

Alvin@alvinsight

HTML5 game developer

WHO AM I ?

Page 3: Phaser Workshop Internet World 2014

What we will cover

- What Phaser is

- What Pixi is

- A (quick) overview

- Get our hands dirty

Page 4: Phaser Workshop Internet World 2014

What is Phaser ?

An HTML5 game framework for 2D which takes care of all of the groundwork for you

Unlike some others, is built for the mobile browsers

One of the most feature-complete frameworks out there

Page 5: Phaser Workshop Internet World 2014

What is Phaser ?

Built by Richard Davey

So Big Disclaimer

It uses the amazing pixi.js as a renderer

Page 6: Phaser Workshop Internet World 2014

What is Pixi.js then ?

Really fast WebGL renderer for 2D

Most importantly, it provides you with a canvas fallback if need be

Page 7: Phaser Workshop Internet World 2014

WebGL + 2D = ?

Because WebGL doesn’t necessarily means 3D

Page 8: Phaser Workshop Internet World 2014

A (quick) overview

What Phaser provides you with :

- Standardised input

- Full-featured audio support (uses Web Audio and can fall back to the <audio> tag

- Mobile-friendly

- Not one, not two, but three physics engine

Page 9: Phaser Workshop Internet World 2014

Get our hands dirty

https://github.com/photonstorm/phaser

Page 10: Phaser Workshop Internet World 2014

To start with

var game = new Phaser.Game(400, 550, Phaser.AUTO,'', { preload: preload, create: create, update: update});

Page 11: Phaser Workshop Internet World 2014

Phaser’s core functionsvar game = new Phaser.Game(400, 550, Phaser.AUTO,'', { preload: preload, create: create, update: update, render: render });

function preload(){

}

function create(){

}

function update(){

}

function render(){

}

Page 12: Phaser Workshop Internet World 2014

Phaser’s core functionsvar game = new Phaser.Game(400, 550, Phaser.AUTO,'', { preload: preload, create: create, update: update, render: render });

function preload(){

// Don’t count your assets before they’re preloaded

game.load.image('bird', 'assets/planeRed2.png');

}

+ Audio, spritesheets, Json, CSV, tilemap, etc

Page 13: Phaser Workshop Internet World 2014

Phaser’s core functionsvar game = new Phaser.Game(400, 550, Phaser.AUTO,'', { preload: preload, create: create, update: update, render: render });

function create(){

// Finally display your image, using WebGL or Canvas

var bird = game.add.sprite(100, 200, 'bird');

}

Page 14: Phaser Workshop Internet World 2014

THANK YOU

Coding time !

http://alvinsight.com/workshops/quacky/workshop.zip