SlideShare una empresa de Scribd logo
1 de 27
© 2016 Healthware. All rights reserved. Confidential and proprietary
Francesco Raimondo
Senior FrontEndDev, HTML5 addicted,
CLM expert, PhaserJs learner, CBM64
Lover… && Retrogamer 4ever!
Presentation Layer Architect @
Healthwareinternational
CO-FOUNDER
www.zero89.it
www.devday.it
mgc.zero89.it
© 2016 Healthware. All rights reserved. Confidential and proprietary
© 2016 Healthware. All rights reserved. Confidential and proprietary
© 2016 Healthware. All rights reserved. Confidential and proprietary
A fast, free and fun open
source framework for
Canvas and WebGL
powered browser games.
PHASER
1. Introduction 2. What we need?
3. Code and Examples 4. Tools and Resources
© 2016 Healthware. All rights reserved. Confidential and proprietary
© 2016 Healthware. All rights reserved. Confidential and proprietary
Introduction
Introduction
Phaser is an HTML5 game framework which aims to help developers make
powerful, cross-browser HTML5 games really quickly and, unlike some
others, has solely been built to work with the mobile browsers. The only
browser requirement is the support of the canvas tag.
© 2016 Healthware. All rights reserved. Confidential and proprietary
Phaser overview
„Desktop and
Mobile HTML5
game framework“
Created by
14.700 stars && 4.800 forks on GitHub
Introduction
• 2D JS framework
• Based on Pixi.js
• WebGL with Canvas fallback
• Tailored for mobile web games
• Open Source <3
© 2016 Healthware. All rights reserved. Confidential and proprietary
What is Phaser?
Introduction
• Aspiring and experienced game developers
• JavaScript developers
• Great for learning game development
© 2016 Healthware. All rights reserved. Confidential and proprietary
Who is it for?
Introduction
Phaser CE 2.7.5 (Community edition)
In November 2016 the ownership of Phaser was handed over to the open
source community.
https://github.com/photonstorm/phaser-ce
Phaser 3 (under development)
Phaser 3 is not yet ready for production use.
https://github.com/photonstorm/phaser/tree/master/v3
http://labs.phaser.io/
© 2016 Healthware. All rights reserved. Confidential and proprietary
Where we are && where we go.
© 2016 Healthware. All rights reserved. Confidential and proprietary
What we
need?
What we need?
• Sublime text
This is the editor the Phaser team use for building the
framework and all projects.
http://www.sublimetext.com
• Visual Studio Code
This should only really be considered if you wish to write your
game using TypeScript instead of JavaScript.
https://code.visualstudio.com
• Brackets
It's a free open-source code editor and runs across Windows,
OS X and Linux.
http://brackets.io
© 2016 Healthware. All rights reserved. Confidential and proprietary
Text editor
What we need?
• Wamp
A Windows web development environment.
It allows you to create web applications with Apache2, PHP and
a MySQL database
http://www.wampserver.com/en/
• Mamp
My Apache - MySQL - PHP for OS X and Windows
http://www.mamp.info/
• Lite-server
Lightweight development only node server that serves a web
app, opens it in the browser, refresh and more.
https://github.com/johnpapa/lite-server
© 2016 Healthware. All rights reserved. Confidential and proprietary
Local server
What we need?
© 2016 Healthware. All rights reserved. Confidential and proprietary
Templates
Phaser + ES6 + Webpack
A bootstrap project to create games
with Phaser + ES6 + Webpack.
https://github.com/lean/phaser-es6-
webpack
Phaser NPM Webpack
Typescript starter project
Project to get you started with your
Phaser games!
https://github.com/rroylance/phaser-
npm-webpack-typescript-starter-project
© 2016 Healthware. All rights reserved. Confidential and proprietary
Code and
Examples
Code and Examples
• Easy setup & preload mechanism
• Common game objects: camera, time, image, text, sprite, group, tween
• Sprite sheets & texture atlases
• TileSprites & collision maps
• Bitmap fonts, Google fonts
• Physics: Arcade, Box2d
• Particles, tinting, WebGL shaders
• Sound and FX (ogg, mp3, m4a )
• Plugins
© 2016 Healthware. All rights reserved. Confidential and proprietary
Features overview
Code and Examples
// create the game
var game = new Phaser.Game(
800, 600, Phaser.CANVAS, 'phaser-example‘,
{ preload: preload, create: create }
);
// preload all assets here
function preload() {
game.load.image(‘HW', 'assets/pics/helloworld.png');
}
// attach everything to the stage here
function create() {
game.add.image(0, 0, 'HW');
}
© 2016 Healthware. All rights reserved. Confidential and proprietary
Hello world!
Code and Examples
© 2016 Healthware. All rights reserved. Confidential and proprietary
Working example: Meetup Rush && Xmas run 2k16
Meetup rush
Meetup participation reward system
http://mr.zero89.it
https://github.com/sH4rk0/meetupRush
Xmas run 2k16
Xmas 2k16 celebration game
http://xmas2016.zero89.it
https://github.com/sH4rk0/xmas2016
© 2016 Healthware. All rights reserved. Confidential and proprietary
Tools and
Resources
Tools and Resources
• Tiled
Your free, easy to use and flexible tile map editor.
http://www.mapeditor.org
• Texture packer
The best sprite sheet generation tool on the market.
https://www.codeandweb.com/texturepacker
• Spriter
Spriter enables the "modular" method of creating silky-
smooth animations where key-frames are constructed
from small, re-useable images
http://www.brashmonkey.com/
© 2016 Healthware. All rights reserved. Confidential and proprietary
Tools
Tools and Resources
• QICI
Free and opensource JavaScript library, based on free
and opensource game engine Phaser, with a web-
based comprehensive suite of HTML5 game making
editor.
https://github.com/qiciengine/qiciengine/
• Phaser editor
The tool to learn Phaser and code html5 games
http://phasereditor.boniatillo.com/
© 2016 Healthware. All rights reserved. Confidential and proprietary
Editor on top
Tools and Resources
• Cocoon
Cocoon provides all the tools and services to build
awesome native HTML5 apps and games with a
simple workflow and all the power of Cordova
https://cocoon.io/
• PhoneGap
Reuse existing web development skills to quickly
make hybrid applications built with HTML, CSS and
JavaScript. Create experiences for multiple platforms
with a single codebase.
http://phonegap.com/
© 2016 Healthware. All rights reserved. Confidential and proprietary
Deploy
Tools and Resources
• Enhance
Enhance modifies your app to automatically implement
third party services and start making money in few clicks.
https://enhance.fgl.com/
• Smaato
To give publishers full control over monetizing their
inventory. It’s the only integrated mobile monetization
solution bringing mobile, native, and programmatic
together on a unified platform.
https://www.smaato.com/
© 2016 Healthware. All rights reserved. Confidential and proprietary
Monetize
Tools and Resources
• Telegram gaming platform
Telegram Bots can offer their users HTML5 games to
play solo or to compete against each other in groups
and one-on-one chats.
Games are a new type of content on Telegram that
your bot can send to users.
https://core.telegram.org/bots
https://core.telegram.org/bots/games
https://telegram.org/blog/games
© 2016 Healthware. All rights reserved. Confidential and proprietary
Integration
Tools and Resources
Github: https://github.com/photonstorm/phaser-ce
Phaser homepage: http://www.phaser.io/
Phaser docs: http://docs.phaser.io/index.html
Phaser examples: http://examples.phaser.io/
Phaser forum: http://www.html5gamedevs.com/forum/14-phaser/
Phaser books: http://phaser.io/shop/books
Tutorial website: http://www.emanueleferonato.com/
Game Mechanic Explorer: http://gamemechanicexplorer.com/
Phaser Book: https://leanpub.com/html5shootemupinanafternoon
Blogger website: https://www.truevalhalla.com
Game publishers: https://www.truevalhalla.com/
© 2016 Healthware. All rights reserved. Confidential and proprietary
WWW Resources
Some input from: http://www.slideshare.net/IndieOutpost/making-html5-games-with-phaser
© 2016 Healthware. All rights reserved. Confidential and proprietary

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

De 0 à Angular en 1h30! (french)
De 0 à Angular en 1h30! (french)De 0 à Angular en 1h30! (french)
De 0 à Angular en 1h30! (french)
 
Hcx intro preso v2
Hcx intro preso v2Hcx intro preso v2
Hcx intro preso v2
 
Le développement mobile avec Vue.js : cross-platform et progressive web apps ...
Le développement mobile avec Vue.js : cross-platform et progressive web apps ...Le développement mobile avec Vue.js : cross-platform et progressive web apps ...
Le développement mobile avec Vue.js : cross-platform et progressive web apps ...
 
Cv ing saber zaafouri
Cv ing saber zaafouriCv ing saber zaafouri
Cv ing saber zaafouri
 
Hébergement Web
Hébergement WebHébergement Web
Hébergement Web
 
Microservices avec Spring Cloud
Microservices avec Spring CloudMicroservices avec Spring Cloud
Microservices avec Spring Cloud
 
Spring ioc
Spring iocSpring ioc
Spring ioc
 
Bringing an open source project to the Linux Foundation
Bringing an open source project to the Linux FoundationBringing an open source project to the Linux Foundation
Bringing an open source project to the Linux Foundation
 
VSICM8_M02.pptx
VSICM8_M02.pptxVSICM8_M02.pptx
VSICM8_M02.pptx
 
The rise of malware(ransomware)
The rise of malware(ransomware)The rise of malware(ransomware)
The rise of malware(ransomware)
 
AutoHackOS.pptx
AutoHackOS.pptxAutoHackOS.pptx
AutoHackOS.pptx
 
Introduction àJava
Introduction àJavaIntroduction àJava
Introduction àJava
 
Rapport sécurité
Rapport sécuritéRapport sécurité
Rapport sécurité
 
Software licencing techniqes
Software licencing techniqesSoftware licencing techniqes
Software licencing techniqes
 
SSL/TSL Protocols
SSL/TSL ProtocolsSSL/TSL Protocols
SSL/TSL Protocols
 
CloudStack Overview
CloudStack OverviewCloudStack Overview
CloudStack Overview
 
Crear un portable con 7z
Crear un portable con 7zCrear un portable con 7z
Crear un portable con 7z
 
Administrateur Système Réseaux Junior
Administrateur Système Réseaux JuniorAdministrateur Système Réseaux Junior
Administrateur Système Réseaux Junior
 
Server virtualization by VMWare
Server virtualization by VMWareServer virtualization by VMWare
Server virtualization by VMWare
 
Laravel - The PHP Framework for Web Artisans
Laravel - The PHP Framework for Web ArtisansLaravel - The PHP Framework for Web Artisans
Laravel - The PHP Framework for Web Artisans
 

Similar a Introduction to Phaser.js

Minko - Why we created our own Flash platform and why you should care
Minko - Why we created our own Flash platform and why you should careMinko - Why we created our own Flash platform and why you should care
Minko - Why we created our own Flash platform and why you should care
Minko3D
 
Adobe and the Flash Gaming Landscape
Adobe and the Flash Gaming LandscapeAdobe and the Flash Gaming Landscape
Adobe and the Flash Gaming Landscape
Joseph Labrecque
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
davyjones
 
Emulators as an Emerging Best Practice for API Providers
Emulators as an Emerging Best Practice for API ProvidersEmulators as an Emerging Best Practice for API Providers
Emulators as an Emerging Best Practice for API Providers
Cisco DevNet
 
Adobe gaming flash gamm michael
Adobe gaming flash gamm michaelAdobe gaming flash gamm michael
Adobe gaming flash gamm michael
Michael Chaize
 
Cerebro for vfx eng
Cerebro for vfx engCerebro for vfx eng
Cerebro for vfx eng
CineSoft
 
The Evolution of the Flash Platform
The Evolution of the Flash PlatformThe Evolution of the Flash Platform
The Evolution of the Flash Platform
Peter Elst
 
Portfolio - PROGmaatic Developer Network
Portfolio - PROGmaatic Developer NetworkPortfolio - PROGmaatic Developer Network
Portfolio - PROGmaatic Developer Network
Habib Ullah Bahar
 

Similar a Introduction to Phaser.js (20)

OSX/Pirrit: The blue balls of OS X adware
OSX/Pirrit: The blue balls of OS X adwareOSX/Pirrit: The blue balls of OS X adware
OSX/Pirrit: The blue balls of OS X adware
 
Minko - Why we created our own Flash platform and why you should care
Minko - Why we created our own Flash platform and why you should careMinko - Why we created our own Flash platform and why you should care
Minko - Why we created our own Flash platform and why you should care
 
HTML5 Game Development frameworks overview
HTML5 Game Development frameworks overviewHTML5 Game Development frameworks overview
HTML5 Game Development frameworks overview
 
Adobe and the Flash Gaming Landscape
Adobe and the Flash Gaming LandscapeAdobe and the Flash Gaming Landscape
Adobe and the Flash Gaming Landscape
 
Build (Web)VR with A-Frame (COSCUP 2019 Taipei)
Build (Web)VR with A-Frame (COSCUP 2019 Taipei)Build (Web)VR with A-Frame (COSCUP 2019 Taipei)
Build (Web)VR with A-Frame (COSCUP 2019 Taipei)
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There TodayHTML5 is the Future of Mobile, PhoneGap Takes You There Today
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
 
Native - Hybrid - Web Mobile Architectures
Native - Hybrid - Web Mobile ArchitecturesNative - Hybrid - Web Mobile Architectures
Native - Hybrid - Web Mobile Architectures
 
Emulators as an Emerging Best Practice for API Providers
Emulators as an Emerging Best Practice for API ProvidersEmulators as an Emerging Best Practice for API Providers
Emulators as an Emerging Best Practice for API Providers
 
DevOps Unleashed: Strategies that Speed Deployments
DevOps Unleashed: Strategies that Speed DeploymentsDevOps Unleashed: Strategies that Speed Deployments
DevOps Unleashed: Strategies that Speed Deployments
 
Adobe: Adobe Gaming NOW!
Adobe: Adobe Gaming NOW!Adobe: Adobe Gaming NOW!
Adobe: Adobe Gaming NOW!
 
Adobe gaming flash gamm michael
Adobe gaming flash gamm michaelAdobe gaming flash gamm michael
Adobe gaming flash gamm michael
 
Cerebro for vfx eng
Cerebro for vfx engCerebro for vfx eng
Cerebro for vfx eng
 
Apache Flex and the imperfect Web
Apache Flex and the imperfect WebApache Flex and the imperfect Web
Apache Flex and the imperfect Web
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
 
Electron - Build cross platform desktop apps
Electron - Build cross platform desktop appsElectron - Build cross platform desktop apps
Electron - Build cross platform desktop apps
 
Sydney Identity Summit: Addressing the New Threat Landscape with Continuous S...
Sydney Identity Summit: Addressing the New Threat Landscape with Continuous S...Sydney Identity Summit: Addressing the New Threat Landscape with Continuous S...
Sydney Identity Summit: Addressing the New Threat Landscape with Continuous S...
 
Introduction to html5 game programming with ImpactJs
Introduction to html5 game programming with ImpactJsIntroduction to html5 game programming with ImpactJs
Introduction to html5 game programming with ImpactJs
 
The Evolution of the Flash Platform
The Evolution of the Flash PlatformThe Evolution of the Flash Platform
The Evolution of the Flash Platform
 
Portfolio - PROGmaatic Developer Network
Portfolio - PROGmaatic Developer NetworkPortfolio - PROGmaatic Developer Network
Portfolio - PROGmaatic Developer Network
 
For Business Success, Choose Cross Platform App Development
For Business Success, Choose Cross Platform App DevelopmentFor Business Success, Choose Cross Platform App Development
For Business Success, Choose Cross Platform App Development
 

Último

Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 

Último (20)

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 

Introduction to Phaser.js

  • 1. © 2016 Healthware. All rights reserved. Confidential and proprietary
  • 2. Francesco Raimondo Senior FrontEndDev, HTML5 addicted, CLM expert, PhaserJs learner, CBM64 Lover… && Retrogamer 4ever! Presentation Layer Architect @ Healthwareinternational CO-FOUNDER www.zero89.it www.devday.it mgc.zero89.it
  • 3. © 2016 Healthware. All rights reserved. Confidential and proprietary
  • 4. © 2016 Healthware. All rights reserved. Confidential and proprietary
  • 5. © 2016 Healthware. All rights reserved. Confidential and proprietary A fast, free and fun open source framework for Canvas and WebGL powered browser games. PHASER
  • 6. 1. Introduction 2. What we need? 3. Code and Examples 4. Tools and Resources © 2016 Healthware. All rights reserved. Confidential and proprietary
  • 7. © 2016 Healthware. All rights reserved. Confidential and proprietary Introduction
  • 8. Introduction Phaser is an HTML5 game framework which aims to help developers make powerful, cross-browser HTML5 games really quickly and, unlike some others, has solely been built to work with the mobile browsers. The only browser requirement is the support of the canvas tag. © 2016 Healthware. All rights reserved. Confidential and proprietary Phaser overview „Desktop and Mobile HTML5 game framework“ Created by 14.700 stars && 4.800 forks on GitHub
  • 9. Introduction • 2D JS framework • Based on Pixi.js • WebGL with Canvas fallback • Tailored for mobile web games • Open Source <3 © 2016 Healthware. All rights reserved. Confidential and proprietary What is Phaser?
  • 10. Introduction • Aspiring and experienced game developers • JavaScript developers • Great for learning game development © 2016 Healthware. All rights reserved. Confidential and proprietary Who is it for?
  • 11. Introduction Phaser CE 2.7.5 (Community edition) In November 2016 the ownership of Phaser was handed over to the open source community. https://github.com/photonstorm/phaser-ce Phaser 3 (under development) Phaser 3 is not yet ready for production use. https://github.com/photonstorm/phaser/tree/master/v3 http://labs.phaser.io/ © 2016 Healthware. All rights reserved. Confidential and proprietary Where we are && where we go.
  • 12. © 2016 Healthware. All rights reserved. Confidential and proprietary What we need?
  • 13. What we need? • Sublime text This is the editor the Phaser team use for building the framework and all projects. http://www.sublimetext.com • Visual Studio Code This should only really be considered if you wish to write your game using TypeScript instead of JavaScript. https://code.visualstudio.com • Brackets It's a free open-source code editor and runs across Windows, OS X and Linux. http://brackets.io © 2016 Healthware. All rights reserved. Confidential and proprietary Text editor
  • 14. What we need? • Wamp A Windows web development environment. It allows you to create web applications with Apache2, PHP and a MySQL database http://www.wampserver.com/en/ • Mamp My Apache - MySQL - PHP for OS X and Windows http://www.mamp.info/ • Lite-server Lightweight development only node server that serves a web app, opens it in the browser, refresh and more. https://github.com/johnpapa/lite-server © 2016 Healthware. All rights reserved. Confidential and proprietary Local server
  • 15. What we need? © 2016 Healthware. All rights reserved. Confidential and proprietary Templates Phaser + ES6 + Webpack A bootstrap project to create games with Phaser + ES6 + Webpack. https://github.com/lean/phaser-es6- webpack Phaser NPM Webpack Typescript starter project Project to get you started with your Phaser games! https://github.com/rroylance/phaser- npm-webpack-typescript-starter-project
  • 16. © 2016 Healthware. All rights reserved. Confidential and proprietary Code and Examples
  • 17. Code and Examples • Easy setup & preload mechanism • Common game objects: camera, time, image, text, sprite, group, tween • Sprite sheets & texture atlases • TileSprites & collision maps • Bitmap fonts, Google fonts • Physics: Arcade, Box2d • Particles, tinting, WebGL shaders • Sound and FX (ogg, mp3, m4a ) • Plugins © 2016 Healthware. All rights reserved. Confidential and proprietary Features overview
  • 18. Code and Examples // create the game var game = new Phaser.Game( 800, 600, Phaser.CANVAS, 'phaser-example‘, { preload: preload, create: create } ); // preload all assets here function preload() { game.load.image(‘HW', 'assets/pics/helloworld.png'); } // attach everything to the stage here function create() { game.add.image(0, 0, 'HW'); } © 2016 Healthware. All rights reserved. Confidential and proprietary Hello world!
  • 19. Code and Examples © 2016 Healthware. All rights reserved. Confidential and proprietary Working example: Meetup Rush && Xmas run 2k16 Meetup rush Meetup participation reward system http://mr.zero89.it https://github.com/sH4rk0/meetupRush Xmas run 2k16 Xmas 2k16 celebration game http://xmas2016.zero89.it https://github.com/sH4rk0/xmas2016
  • 20. © 2016 Healthware. All rights reserved. Confidential and proprietary Tools and Resources
  • 21. Tools and Resources • Tiled Your free, easy to use and flexible tile map editor. http://www.mapeditor.org • Texture packer The best sprite sheet generation tool on the market. https://www.codeandweb.com/texturepacker • Spriter Spriter enables the "modular" method of creating silky- smooth animations where key-frames are constructed from small, re-useable images http://www.brashmonkey.com/ © 2016 Healthware. All rights reserved. Confidential and proprietary Tools
  • 22. Tools and Resources • QICI Free and opensource JavaScript library, based on free and opensource game engine Phaser, with a web- based comprehensive suite of HTML5 game making editor. https://github.com/qiciengine/qiciengine/ • Phaser editor The tool to learn Phaser and code html5 games http://phasereditor.boniatillo.com/ © 2016 Healthware. All rights reserved. Confidential and proprietary Editor on top
  • 23. Tools and Resources • Cocoon Cocoon provides all the tools and services to build awesome native HTML5 apps and games with a simple workflow and all the power of Cordova https://cocoon.io/ • PhoneGap Reuse existing web development skills to quickly make hybrid applications built with HTML, CSS and JavaScript. Create experiences for multiple platforms with a single codebase. http://phonegap.com/ © 2016 Healthware. All rights reserved. Confidential and proprietary Deploy
  • 24. Tools and Resources • Enhance Enhance modifies your app to automatically implement third party services and start making money in few clicks. https://enhance.fgl.com/ • Smaato To give publishers full control over monetizing their inventory. It’s the only integrated mobile monetization solution bringing mobile, native, and programmatic together on a unified platform. https://www.smaato.com/ © 2016 Healthware. All rights reserved. Confidential and proprietary Monetize
  • 25. Tools and Resources • Telegram gaming platform Telegram Bots can offer their users HTML5 games to play solo or to compete against each other in groups and one-on-one chats. Games are a new type of content on Telegram that your bot can send to users. https://core.telegram.org/bots https://core.telegram.org/bots/games https://telegram.org/blog/games © 2016 Healthware. All rights reserved. Confidential and proprietary Integration
  • 26. Tools and Resources Github: https://github.com/photonstorm/phaser-ce Phaser homepage: http://www.phaser.io/ Phaser docs: http://docs.phaser.io/index.html Phaser examples: http://examples.phaser.io/ Phaser forum: http://www.html5gamedevs.com/forum/14-phaser/ Phaser books: http://phaser.io/shop/books Tutorial website: http://www.emanueleferonato.com/ Game Mechanic Explorer: http://gamemechanicexplorer.com/ Phaser Book: https://leanpub.com/html5shootemupinanafternoon Blogger website: https://www.truevalhalla.com Game publishers: https://www.truevalhalla.com/ © 2016 Healthware. All rights reserved. Confidential and proprietary WWW Resources Some input from: http://www.slideshare.net/IndieOutpost/making-html5-games-with-phaser
  • 27. © 2016 Healthware. All rights reserved. Confidential and proprietary