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
PDF
EPUB
MOBI
WEB
English
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)
PDF
EPUB
MOBI
WEB
English
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 Appendices
- Other resources:
- Selling your Game Assets
- Appendix: Online Game Development
- Appendix: Making WebXR Games!
- 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
-
The Leanpub 60-day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
Do Well. Do Good.
Authors have earned$11,577,045writing, 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
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
Recipes for Decoupling
Matthias NobackSignalR on .NET 6 - the Complete Guide
Fiodar SazanavetsLearn everything there is to learn about SignalR and how to integrate it with the latest .NET 6 and C# 10 features. Learn how to connect any type of client to SignalR, including plain WebSocket client. Learn how to build interactive applications that can communicate with each other in real time without making excessive calls.
The BDD Books - Discovery (Japanese Edition)
Gáspár Nagy, Seb Rose, and Yuya Kazamaウクライナ難民を支援 - 2022年5月末まで延長!
この本の売り上げの50%は、 https://unicef.hu/veszhelyzet-ukrajnaban と https://int.depaulcharity.org/fundraising-for-depaul-ukraine/ に寄付されます。
本書籍は、振る舞い駆動開発(Behavior Driven Development, BDD)や受け入れテスト駆動開発(Acceptance Test-Driven Development, ATDD)の発見フェーズを最大限に活用する方法を提供します。
The easiest way to learn design patterns
Fiodar SazanavetsLearn design patterns in the easiest way possible. You will no longer have to brute-force your way through each one of them while trying to figure out how it works. The book provides a unique methodology that will make your understanding of design patterns stick. It can also be used as a reference book where you can find design patterns in seconds.
Agile Testing Condensed Japanese Edition
Yuya Kazama, Janet Gregory, and Lisa CrispinJanet GregoryとLisa Crispinによる2019年9月発行の書籍『Agile Testing Condensed』の日本語翻訳版です。アジャイルにおいてどのような考えでテストを行うべきなのか簡潔に書かれています!
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.
Tech Giants in Healthcare
Dr. Bertalan MeskoThis comprehensive guide, Tech Giants in Healthcare, clarifies how and why big tech companies step into healthcare, and breaks it down from one market player to the other in what direction they are going, what tools they are using and what horizons they have in front of them.
Functional event-driven architecture: Powered by Scala 3
Gabriel VolpeExplore the event-driven architecture (EDA) in a purely functional way, mainly powered by Fs2 streams in Scala 3!
Leverage your functional programming skills by designing and writing stateless microservices that scale, powered by stateful message brokers.
CCIE Service Provider Version 4 Written and Lab Exam Comprehensive Guide
Nicholas RussoThe service provider landscape has changed rapidly over the past several years. Networking vendors are continuing to propose new standards, techniques, and procedures for overcoming new challenges while concurrently reducing costs and delivering new services. Cisco has recently updated the CCIE Service Provider track to reflect these changes; this book represents the author's personal journey in achieving that certification.
Ansible for DevOps
Jeff GeerlingAnsible is a simple, but powerful, server and configuration management tool. Learn to use Ansible effectively, whether you manage one server—or thousands.
Top Bundles
- #1
All the Books of The Medical Futurist
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, digital health investments and how technology giants such as Amazon... - #2
Practical FP in Scala + Functional event-driven architecture
2 Books
Practical FP in Scala (A hands-on approach) & Functional event-driven architecture, aka FEDA, (Powered by Scala 3), together as a bundle! The content of PFP in Scala is a requirement to understand FEDA so why not take advantage of this bundle!? - #3
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... - #4
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... - #6
Pattern-Oriented Memory Forensics and Malware Detection
2 Books
This training bundle for security engineers and researchers, malware and memory forensics analysts includes two accelerated training courses for Windows memory dump analysis using WinDbg. It is also useful for technical support and escalation engineers who analyze memory dumps from complex software environments and need to check for possible... - #8
Modern C++ Collection
3 Books
Get All about Modern C++C++ Standard Library, including C++20Concurrency with Modern C++, including C++20C++20Each book has about 200 complete code examples. Updates are included. When I update one of the books, you immediately get the updated bundle. You can expect significant updates to each new C++ standard (C++23, C++26, .. ) and also...