Phaser III Game Prototyping (6th Edition Book)
Phaser III Game Prototyping
Building 100s of games using HTML and Phaser3 JavaScript Gaming Framework
About the Book
This workbook is the new edition 6th -- a hands-on tutorial guide for Game Prototype creations using component object programming with an emphasis on Phaser v3.5+, WebXR, and "Headless Game Design". The reason we delayed this book's publication was due to the massive rewrites since v3.16+ OCT 2018 and 100% features final made availability since v3.24.1 release scheduled for mid-July, 2020.
As of February 2017, this book was the first and only available tutorial for Phaser III and will continue to supplement version 3 as more framework features become available. Therefore, if you've purchased this book from LeanPub.com, you will have a continually updated version on the latest Phaser III features.
Phaser v3.24+ examples will use our unique component object programming. This book delves into many of the great classic game mechanisms and design mechanics techniques. All written in a fun and friendly style with completed projects and open-ended exercises that encourage you to build your own projects. You'll also download supporting tools to classify the book’s snippets and add your own modification.
You’ll find detailed working examples links from the book's website with dozens of illustrations with many concepts you can freely apply to your own gaming projects. All the source code annotations enhance the book’s explanation. You will learn to convert your former Phaser v2.x.x games and upgrade them into Phaser 3 now. I'll show you how I've upgraded my entire product line from Adobe Flash & Phaser v2.x.x.
What you’ll learn:
By the end of this workbook, you’ll have integrated into your own game designs:
- Adopted processes for business project management and software development.
- Organized a standardized file structure for rapidly developing games;
- Used a blank game prototype templates to scaffold further game projects with automation tools;
- Converted Phaser v2.x.x and adopted the new features and upcoming changes into Phaser v3.5+.
- Imported resources and game assets;
- Displayed, animated, and moved game avatars on various screen and scene renderings;
- Managed groups of game objects;
- Deployed heads-up display (HUD) on parallel game scenes both inside and outside the canvas;
- Used customized web fonts;
- Incorporated multiple game-inputs (touch, multi-touch, "accelerometer", mouse, and keyboard);
- Rendered several physics systems on gaming components;
- Included graphics effects (gfx) (particle systems, rotations, fades, shaders and more);
- Created and managed game phases with multiple Scenes;
- Managed permanent game assets across various game phases;
- Optimized your game for various mobile devices;
- Integrated 3rd-party plugins and blueprints.
- Deployed single- and multi-player games from the workbooks tutorials.
- Web Sockets demystified for scalable massive online game deployments.
Who This Book Is For:
Students -- and software professionals in -- game development with little experience in HTML5, CSS or JavaScript who want to enhance -- or begin learning the essential techniques from Phaser v3.5, and WebXR to build game prototypes. If you are interested in making browser games, especially for the mobile, Augmented or Virtual Reality markets, then Phaser III Game Prototyping is your choice.
Packages
6th Edition Book
Book contents and access to supporting website.
Includes:
Free Affiliate Guide
Learn how to use this document and leverage revenues in our Gaming Community.
Example Game Rules
Following the Game Recipes, these are 3 game rules examples
English
PDF
EPUB
MOBI
WEB
5th Edition Book Resources and Game Developer Certification Course
Earn your respect in the industry with Phaser v3.x.x Game Developer Certification course includes free access to the Phaser v3.x.x Game Development Workshop Course.
Includes:
Free Affiliate Guide
Learn how to use this document and leverage revenues in our Gaming Community.
Book 2D Rooms Creation (66 files; 17.2 MB)
Following the book examples of generating Room Movement table with 2D arrays. (66 files; 17.2 MB
Book Artificial Intelligence (73 files; 3.91 MB)
A*Star path finding for Phaser.
Book Back-end server-side middleware for ARRA (91 files; 1.94 MB)
Two website back-ends to support ARRA games in ASP and PHP (91 files; 1.94 MB)
Book Bonus Games Source Code (416 files; 58 MB on disk)
The book describes several games beyond ARRA rv_8 and rv_15. Here is the collection of software code for those bonus games. (416 files; 58 MB on disk). Life-Time licenses included a value of $180.
FREE Amazon Rule Books (2 files; 3.35 MB)
Legends of Renown Deeds rulebook (Amazon edition - $2.99) - an active online RPG since 1993!
Book Labyrinth Generators Source Code (32 files; 4.02 MB)
various methods to generate dynamic mazes in JavaScript, C/C++, and Java. Content includes a rare and hard to find document of Jamis Buck.
Phaser v3.x.x game project template (91 files; 37.9 MB)
game project template using OLOO style game construction.
Blood Pit Walk-through Tutorial
Step-by-step Game Recipe Series creating the Blood Pit In-Game-Module for Legends of Renown Deeds Gaming System.
Example Game Rules
Following the Game Recipes, these are 3 game rules examples
Book and Game Developer Certification Course
This book and the Phaser III Game Design Workshop Course and Certification. Available after 95% book complete. Bonus Content: x,xxx files xxx MB (2018xxxx unzipped)
English
PDF
EPUB
MOBI
WEB
Reader Testimonials

Melody Romero
International Children Games
I bought your book Phaser Game Prototyping. I loved it, I even managed to understand how javascript worked thanks to his explanation. With some university colleagues, we want to develop games to include children with specific learning difficulties starting in Chile. Thank you very much for your work Melody Romero Desarrollador de software en Imagoos Chile
Table of Contents
-
-
Distribution Permission
- Supporting website
- Forwards
- Disclosures
- Disclaimer
-
About this Workbook:
- Viewing the Source Code
- Links and References
- Who should use this workbook?
- Your newly obtained skills…
-
Game Design System™
- Game Studio - Book Series
- Game Studio - Online Courses
- “Making Browser Games” - Books Series
- “Making Browser Games” Series - online Courses
- Programming Courses
- “Walk-Thru Tutorial” Series - Online Courses
-
Distribution Permission
-
Part I - Concept & Design
-
1 Game Studio & Project Setups
-
1.1 Workstation Setup
- Batteries not included … Web Server Required
- Development Tools
-
1.2 Project Setup
- Project Structure
- And its name shall be called …
- Project Directories & Files
-
1.3 Game Project Preparations
- What makes a “Good” Game?
- Game Copyrights
-
1.4 Game Design System™
- How it works
-
1.5 Game Genres
- Deeper Dive: Game Genres
- Deeper Dive: Game Modes
-
1.6 Game Recipe™ Summarized:
- Development:
- Design:
- Encoding:
- 1.7 Summary
- 1.8 Chapter References:
-
1.1 Workstation Setup
-
2 Building a Game Prototype
- 2.1 Example: Using Box Graphics
- 2.2 3D Prototypes
- 2.3 “ToTo, … we’re not in Kansas anymore” — Dorothy
-
2.4 Creating Prototype Mechanisms — 4-Step method
- Step 0) Preparation and Research
- Step 1) Generate Game Phases (as needed).
- Step 2) Generate code for triggering events.
- Step 3) Generate transition
- Step 4) Create your Game’s Core & auxiliary functions
- Deeper Dive: Writing D.R.Y. JS code
-
3 Making a “Game Recipe”™
-
3.1 Step #1) the Front-Door
- Task #1-1 Instructions:
- Compare your code
- Mobile “Single Web Page Applications” (SWPA)
- Cocoon.js Cloud Alternatives
-
3.2 Task #2: Launching a Game
- Launching the Game.
-
Game
Config
- 3.3 Deeper Dive: To Infinity and Beyond!
- 3.4 Summary
- 3.5 Chapter References:
-
3.1 Step #1) the Front-Door
-
4 Game Phases, Scenes & Roses.
- 4.1 Bare-Bones Prototypes
- 4.2 Using a Phaser Scene as a “Game Phase”
- 4.3 9 Essential Functions of a Phaser “Scene”
-
4.4 Game Phases as Modules
- “Phaser.Game” — One File to Rule them all …
- Main.js (aka “launch” or index.js)
- Boot.js
- Preload.js
- Deeper Dive: Artwork & Resources Security
-
Deeper Dive: Phaser
Cache
- Deeper Dive: Loader Examples
- Splash.js or Language.js?
- Main Menu.js
- Play.js
- Deeper Dive: JS Modules
-
4.5 Step #1 of 4: Generate Game Phases
- Dynamically Including Game Phases
- Deeper Dive: D.R.Y. Stand-alone
- Step #2 of 4: Game Phase Transitions
- Deeper Dive: The CMS “Game Shell”
- Deeper Dive: When to use a game shell
-
4.6 Encoding Phaser Scenes as a “Game Phase”
- Vanilla, Chocolate, or Strawberry Creme-filled?
- Overriding Essential Functions inside Phaser.Scene
- Creating Scenes using ES5 Prototypes
- Creating Scenes using Phaser.Class
- Creating Scenes by extending Phaser.Class
- ES6 Considerations: “Strawberry”
- Creating Scene Configuration files
- Deeper Dive: Defining Other Scene Properties
- Deeper Dive: ES9 Modules
- 4.7 Summary
- 4.8 Chapter References:
-
5 Game Recipe™ Automation Tool
- 5.1 Deeper Dive: Database Protection Considerations
-
5.2 Database Schema Construction (Copyright-able!!)
- Database Record Construction
- Database structure
- 5.3 Remote Codebase Using AppML
- 5.4 Building an AppML application
- 5.5 Sample AppML codebase (Public Access)
-
5.6 Remote codebase Using JSON
- Per-user storage
- 5.7 Chapter Source Code & Demo
- 5.8 Summary
- 5.9 Chapter References
-
1 Game Studio & Project Setups
-
Part II - Mechanisms & Mechanics Production
-
6 Building Game Prototypes, Mechanisms & Tools
-
6.1 Task #3: Mini-Me
- Creating an Avatar - “visual display”
- Deeper Dive: Display selected frames from a sprite-sheet.
- Deeper Dive: Using Base64 Images
- Creating an Avatar’s metadata
- Deeper Dive 3.19+ Tweens
-
6.2 Task #4: Moving Game Elements
- Deeper Dive: Phaser III Input Manager
- Deeper Dive: Future Proofing your source code.
- Deeper Dive: Configuring the Keyboard (Phaser v3.16+ updated)
-
6.4 Task #5: Things that go bump …
- Walls and Camera boundaries
- Interior Decoration
- Deeper Dive on Game Objects hit areas.
- Doors, Knobs, and Buttons
- Deeper Dive: Writing Optimized Code
- Deeper Dive: Buttons as a “Class” or “Scenes”?!!?
- Deeper Dive: Button size considerations
- Deeper Dive: Adding Buttons & Mobile Touch
- 6.5 Task #6: When Worlds Collide …
- 6.6 Task #7: It’s curtains for you …
- 6.7 Other Game Mechanics Categories
- 6.8 The Finish Line: You’re AWESOME … Gloat, Gloat …
- 6.9 Chapter Source Code & Demo
- 6.10 Summary
- 6.11 Chapter References
-
6.1 Task #3: Mini-Me
-
7 Game Mechanics Systems
- 7.1 Game-Play vs Game Mechanics vs Game Mechanism
-
7.2 Game Mechanics (GM) Overview
- Game Mechanics Suggested by Schell
- Game Mechanics: “Actions”
- Game Mechanics as: Attributes, Objects, & States
- Deeper Dive: Game Phases Revisited
-
Deeper Dive:
StateManager
- Deeper Dive: Object Manipulation in ES5/6/7/8/9/10+
- Game Mechanics: “Chance”
- Game Mechanics: Rules
- Deeper Dive: Rules
- Deeper Dive: Rule Categories
- Game Mechanics: “Skills”
- Game Mechanics: “Space”
-
7.3 Phaser III API Relation to Game Mechanics
- Deeper Dive: Input Manager Event Horizon
- 7.4 Summary
-
8 Dem’s fightin’ words
- 8.1 Launching Web Sockets
- 8.2 Dynamic Combat Menus
-
8.3 So, Give Me Some Space …
- Melee Weapons
- Ranged Weapons
-
8.4 OO!, OW! AH!, OW! Stayin’ alive! Stayin’ alive!
- Grid-less Combat
- Grid-ed Combat
- 8.5 Tactical Tiled-Maps
-
8.6 Squares and Checkered Grids
- Deeper Dive: Phaser III Grids
- Hexagonal Grids
- Deeper Dive: Real hexagonal grids
- Squishes
-
8.7 Rules of Engagement: Take 5 paces, turn, and …
- Been there … done that …
-
8.8 “Where’s the beef?”
- Click-fest
- Guitar hero - Time to get it Right!
- Days of our Lives - Drama Theater
- SCA Virtual “Fighter Practice” by Steve Echos
- En Guard method
- Yeap! Ya betcha’ ‘ur life!
- 8.9 Story narrative
- 8.10 Frisking, Fondling, or Groping
- 8.11 Chapter Source Code
- 8.12 Complete Combat Prototypes
- 8.13 Summary
- 8.14 Footnotes
-
9 Phaser III Game Mechanism Components
-
9.1 “ToTo, we’re not in Kansas …” — Dorothy
- Index page inline script - Reviewed
- Adding Display objects
- Adding Control Mechanisms
- Adding Buttons & Mobile Touch
- Phaser III “Actions”
- Components
- DOM
- Game Objects
- System Components
-
9.2 Tile Map
- Tilemap Rendering - new Dynamic method
- Tilemap Rendering - new Static method
-
9.3 Phaser III Systems
- v3 Boot
- v3 Cache
- v3 Device Manager
- v3 Events
- v3 Input Manager
- Deeper Dive: v3.16+ New Keyboard rewrite!
- v3 Loader
- v3 Sound
- v3 Scene Manager
- v3 Texture Manager
- v3 Tween Manager
- Deeper Dive 3.19+ Tweens
-
9.4 Phaser3 Finish Line: You’re AWESOME … Gloat!, Gloat!
- Phaser v3 Source Code & Demos
-
9.5 v3 Animations
- Deeper Dive: History of Animation
- Animation Today
- Animation Recommendations
- Frame Rates Recommendations
- Tweens
- 9.6 Camera & Viewports
- 9.7 Summary
- 9.8 Chapter Footnotes:
-
9.1 “ToTo, we’re not in Kansas …” — Dorothy
-
10 Whazzz-sUP! …. HUD Development
- 10.1 HUD Housing Development
- 10.2 HUD as Panels
- 10.3 HUD Panels outside the Canvas?!?
- 10.4 HUD Demos
- 10.5 Summary
- 10.6 Footnotes
-
11 Don’t make me think or “Artificial Intelligence for Dummies”
- 11.1 The “6 of 9”
- 11.2 Chasing
- 11.3 Evading
- 11.4 Patterns
- 11.5 Fuzzy logic
-
11.6 Finite State Machines (FSM)
- FSM Resolving Combat Outcomes
- FSM Resolving AI behaviors
-
11.7 Recursive World Feedback
- Probability Data Tables
- 11.8 Complete AI Prototypes
- 11.9 Chapter Source Code
- 11.10 Summary
- 11.11 Footnotes
-
6 Building Game Prototypes, Mechanisms & Tools
-
Part III: Distribution!
-
12 Game Distribution
- 12.1 Introduction: 8-Step Deployment Method.
-
12.2 Distribution Preparation
- Development vs. Production
- 12.3 Create A Game Pipeline
- 12.4 Preparing for WebXR Deployment
-
13 Marketing Channels
- 13.1 Channel Selection
-
13.2 What do I need?
- Advertising
- Deeper Dive: “Playable” Ads
- Partnerships & Sponsors
- Retail
- Billing
- Data
- Player Interactions
- Paraphernalia Merchandising
- 13.3 Chapter Reference
-
12 Game Distribution
-
Part IV - Resources & “Walk-thru” Tutorials
-
14 Phaser III Game Prototype Library
-
14.1 Walk-through Tutorial Series
- Difficulty Rating #1: Introductory
- Difficulty Rating #2 to #3: Intermediate
- Difficulty Rating #4: Advanced - “The Full Monty!”
-
14.1 Walk-through Tutorial Series
-
15 What’s next?
-
15.1 Game Distribution & Marketing
- Introduction: 8-Step Deployment Method.
- 15.2 Book Review Protocol
- 15.3 Tell the world about your game!
-
15.1 Game Distribution & Marketing
-
14 Phaser III Game Prototype Library
-
Appendix
-
More Resources
- JavaScript Garden
- Additional Content Appendices
- Other resources:
- Selling your Game Assets
- Appendix: Making WebXR games!
- Appendix: Online Game Development
- Appendix: Phaser III Plugins
-
Appendix: “How to Start a WebSocket”
- Testing Your Browser
-
WebSocket Protocol Handshake
- Deeper Dive: WebSocket API
-
Sample Source Code: Client-side WebSocket
-
Step #1: Game
index
page - Step #2: Generate Event handlers
-
Step #1: Game
-
Common Pitfalls
-
Lacking Debugging Tools?
- Deeper Dive: Console Commands
- Same “Name-spaces”
- Callbacks
-
Missing Documentation
- Deeper Dive: What is Dragon Speak
-
Lacking Debugging Tools?
- Phaser III Book Examples & Samples
-
Appendix: OLOO - Safe JavaScript
- Deeper Dive: JS Delegation (aka “Inheritance”?)
- The old way
- Objects Linking to Other Objects (OLOO)
- Compare your code
- Object.create
- Exercise Lesson 9:
- Game Singletons
- Deeper Dive: Object Manipulation objects in ES5/6
- Lesson Summary
- Resource References:
-
More Resources
-
Answers to Exercises
-
-
Appendix
- Appendix: OLOO - Safe JavaScript
-
Appendix
-
Authors have earned$9,883,643writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.
Learn more about writing on Leanpub
The Leanpub 45-day 100% Happiness Guarantee
Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Top Books
C++ Best Practices
Jason TurnerLevel up your C++, get the tools working for you, eliminate common problems, and move on to more exciting things!
OpenIntro Statistics
David Diez, Christopher Barr, Mine Cetinkaya-Rundel, and OpenIntroA complete foundation for Statistics, also serving as a foundation for Data Science.
Leanpub revenue supports OpenIntro (US-based nonprofit) so we can provide free desk copies to teachers interested in using OpenIntro Statistics in the classroom and expand the project to support free textbooks in other subjects.
More resources: openintro.org.
Functional Design and Architecture
Alexander GraninSoftware Design in Functional Programming, Design Patterns and Practices, Methodologies and Application Architectures. How to build real software in Haskell with less efforts and low risks. The first complete source of knowledge.
R Programming for Data Science
Roger D. PengThis book brings the fundamentals of R programming to you, using the same material developed as part of the industry-leading Johns Hopkins Data Science Specialization. The skills taught in this book will lay the foundation for you to begin your journey learning data science. Printed copies of this book are available through Lulu.
C++20
Rainer GrimmC++20 is the next big C++ standard after C++11. As C++11 did it, C++20 changes the way we program modern C++. This change is, in particular, due to the big four of C++20: ranges, coroutines, concepts, and modules.
I am a Software Engineer and I am in Charge
Alexis Monville and Michael DoyleI am a Software Engineer and I am in Charge is a real-world, practical book that helps you increase your impact and satisfaction at work no matter who you work with.
In the book, we will follow Sandrine, a fictional character who learns to think in a new way enabling her to take a different course of action.
Atomic Kotlin
Bruce Eckel and Svetlana IsakovaFor both beginning and experienced programmers! From the author of the multi-award-winning Thinking in C++ and Thinking in Java together with a member of the Kotlin language team comes a book that breaks the concepts into small, easy-to-digest "atoms," along with exercises supported by hints and solutions directly inside IntelliJ IDEA!
Invest In Digital Health - The Medical Futurist's Guide
Dr. Bertalan MeskoArtificial Intelligence and Digital Health are booming. In this book, we explain why now it's a good time to invest in Digital Health and give recommendations on where to invest by looking at the top 24 technological trends we find the most promising.
The Hundred-Page Machine Learning Book
Andriy BurkovEverything you really need to know in Machine Learning in a hundred pages.
Mastering STM32
Carmine NovielloWith more than 600 microcontrollers, STM32 is probably the most complete ARM Cortex-M platform on the market. This book aims to be the first guide around that introduces the reader to this exciting MCU portfolio from ST Microelectronics and its official CubeHAL.
Top Bundles
- #1
Software Architecture for Developers: Volumes 1 & 2 - Technical leadership and communication
2 Books
"Software Architecture for Developers" is a practical and pragmatic guide to modern, lightweight software architecture, specifically aimed at developers. You'll learn:The essence of software architecture.Why the software architecture role should include coding, coaching and collaboration.The things that you really need to think about before... - #2
CCIE Service Provider Ultimate Study Bundle
2 Books
Piotr Jablonski, Lukasz Bromirski, and Nick Russo have joined forces to deliver the only CCIE Service Provider training resource you'll ever need. This bundle contains a detailed and challenging collection of workbook labs, plus an extensively detailed technical reference guide. All of us have earned the CCIE Service Provider certification... - #3
The Future of Digital Health
6 Books
We put together the most popular books from The Medical Futurist to provide a clear picture about the major trends shaping the future of medicine and healthcare. Digital health technologies, artificial intelligence, the future of 20 medical specialties, big pharma, data privacy and how technology giants such as Amazon or Google want to conquer... - #4
Cisco CCNA 200-301 Complet
4 Books
Ce lot comprend les quatre volumes du guide préparation à l'examen de certification Cisco CCNA 200-301. - #5
CCDE Practical Studies (All labs)
3 Books
CCDE lab - #6
"The C++ Standard Library" and "Concurrency with Modern C++"
2 Books
Get my books "The C++ Standard Library" and "Concurrency with Modern C++" in a bundle. The first book gives you the details you should know about the C++ standard library; the second one dives deeper into concurrency with modern C++. In sum, you get more than 600 pages full of modern C++ and about 250 source files presenting the standard library... - #7
Modern Management Made Easy
3 Books
Read all three Modern Management Made Easy books. Learn to manage yourself, lead and serve others, and lead the organization. - #8
Linux Administration Complet
4 Books
Ce lot comprend les quatre volumes du Guide Linux Administration :Linux Administration, Volume 1, Administration fondamentale : Guide pratique de préparation aux examens de certification LPIC 1, Linux Essentials, RHCSA et LFCS. Administration fondamentale. Introduction à Linux. Le Shell. Traitement du texte. Arborescence de fichiers. Sécurité... - #9
Programming with Ease
3 Books
Alle drei Bände der Serie Programming with Ease in einem Paket. Darin findest du alles, was ich dir zu den wichtigsten Phasen der Softwareentwicklung im Hinblick auf Clean Code Development für langfristig hohe Produktivität sagen kann.Im Band Slicing findest du die Anforderungsanalyse im Rahmen eines iterativ-inkrementellen Vorgehensmodells aus... - #10
Vagrant Ansible
2 Books
Unveil the power of Ansible and Vagrant with this bundle at a special price. You'll have everything you need to get started with Vagrant - learn the basics and how to create your virtual development environments, using Ansible as provisioner! About Vagrant Cookbook Vagrant Cookbook is a complete guide to get started with Vagrant and create your...