Leanpub Header

Skip to main content

Making Memory Matching Browser Games

Creating "Concentration" Game Mechanics for Phaser.js Gaming Frameworks v3.x.x & v2.x.x

This is a mega-chapter from the Phaser Game Starter Kit Collection with 5 game examples - that's less than $2 per game! This chapter leads you through Memory Matching game development in both v3.16+ and v2.x.x APIs. It's perfect for novices, experienced web developers, and just anyone wanting to start their own Game Studio.

The author is letting you choose the price you pay for this book!

Pick Your Price...
PDF
EPUB
WEB
13
Readers
267
Pages
53,291Words
About

About

About the Book

5 General Game Licenses are included in this book - a savings of $300 if purchased separately!

Discover how to create online Memory Matching games using the methods in this single chapter from the Phaser Game Starter Kit Collection. When you finish these tutorials and bonus courses, you will have a production pipeline ready to create as many different "Memory Matching" games as your imagination can dream of!

This is a "mega-book" with 5 different types of Memory Matching and a MahJong game prototype. Two games were written in Phaser v3.16+ - an RPG Math Game for "pre-schoolers" and a New Age "Simple Shaman™". Two games were written in Phaser v2.x.x from the Mozart Music Match Suite - an audio "hidden pairs" memory game, and a "music motif" (sequence memory) game, and a "single-player" MahJong prototype game in both Phaser v2.x.x and v3.16+ APIs.

Included with your purchase, you'll also get EULAs, bonus content, download examples, and source code references on how to do every single thing in this game design workbook, so you can copy and paste any examples into your own productions and then modify those resources for your own purposes.

I would like to guide you in creating several styles of Memory Matching in Pairs - both hidden and open - and Sequence Memory game mechanics. We will use these game mechanics, mechanisms and the development methods discussed from the Phaser Game Prototypes. By the end of this workbook, you should have several fully functional Memory Matching game - not just a copy of my games, but your very own products using your own gaming assets. There is a supporting website where you can download the bonus content included with your workbook's purchase.  

This comprehensive guide will teach you how to: 

- Use the Phaser JS Gaming Framework as either v2.x.x or v3.16+.

- How to integrate "Memory Matching" game mechanics into other game genres such as educational, math, MahJong, and 2-Player or Artificial Intelligence bots!

- Deploy your game(s) as a "Progressive Web Application" or "Single Page Web Application" for any device.

- Analyze current business demand for this game's genre, how and where to deploy it and what others have done.

- Automatically generate various dynamic game boards.

If you have any feedback or suggestions please join our email listing or participate in the forum for this course!

Price

Pick Your Price...

Minimum price

$5.99

$39.99

You pay

$39.99

Author earns

$31.99
$

All prices are in US $. You can pay in US $ or in your local currency when you check out.

EU customers: prices exclude VAT, which is added during checkout.

...Or Buy With Credits!

Number of credits (Minimum 1)

1
The author will earn $12.00 from your purchase!
You can get credits monthly with a Reader Membership

Author

About the Author

Stephen Gose

Avatar is an adorable cartoon sketch of my wife. My 48th anniversary is this coming Sept 1, 2026!

Stephen Gose, Ph.D. Information Systems (honorary) (and second-generation German) is a retired Professor Emeritus with a 41-year career as a certified network engineer, and "Certified Cisco Academy Instructor" (CCAI) since 2002. He is listed in the Who's Who for Information Technology for his directly related work for the Internet backbones in the Caribbean, Netherlands, Israel, and Russia. He was awarded "Letters of Appreciation" from AT&T, and the German, Israeli, Dutch, and Russian Governments. Steve has nearly three decades of international "teaching and conference lecturing" in both Local-Area and Wide-Area Networks, network security, Internet backbones, software engineering, and program/project management. He is a retired US Army Signal Corps Officer. He earned, in 2014, the ITT Technical Institute's "Instructor of the Year" out of 8,000 instructors across 144 campuses throughout the USA. 

He graduated from Grand Canyon University with his first B.A. in Religions and Music Education, then a B.S. in Business Admin. from the University of Maryland, and an M.B.A. in International Management from Liberty University.

He is currently pursuing his Th.D. He has been a licensed minister since 1972 and a missionary to Okinawa, Japan. He earned the US Army Chaplain Outstanding Service Award in 1983. 

In his spare time(?), Steve enjoys creating online casual games, software engineering, and managing his online gaming businesses. 

My driving theme: "Always stay humble and kind"

His website is: https://www.Stephen-Gose.com/

His game showcase is: http://www.renown-games.com

His theology website: http://kingdomofgodprinciples.com/

Game Support Site: http://makingbrowsergames.com/

Review my profile on LinkedIn.com: https://www.linkedin.com/in/stephen-gose/

Contents

Table of Contents

Distribution Permission

  1. Supporting website

Disclosures

Disclaimer

About this Workbook

  1. Links and References
  2. Workbook Content
  3. How to Read & Use this workbook:
  4. Viewing this eBook:
  5. Who should use this workbook?

Your newly obtained skills…

Game Design System™

  1. Game Studio - Book Series
  2. Game Studio - Online Courses
  3. “Making Browser Games” - Books Series
  4. “Making Browser Games” Series - online Courses
  5. Programming Courses
  6. “Walk-Thru Tutorial” Series - Online Courses
  7. IMaking HTML5 Games

1Introduction to Game Design

  1. Approaching Game Development
  2. Focusing Your Game
  3. 1.1Game Genre Defined
  4. GG Interactive — Game Design Course
  5. 1.2Game Tools & Generators
  6. 1.3References From

2Standard Project Setup

  1. 2.1Standardized File Structure
  2. 2.2Barebones Set-up
  3. 2.3Web Server Required - Batteries not included!

3Starting a Game Project

  1. 3.1Step 0: Review your competition and their games
  2. Game Examples
  3. 3.2Step 1: Create your “front-door”
  4. 3.3Step 2. Create your “Game Shell” & Phases
  5. Network Impact
  6. Critical Rendering Path
  7. Gamer’s Local Activity
  8. D.R.Y. Speed Limit - 5 GPH (Games Per Hour)!
  9. 3.4Select a JS Format
  10. ES5 Format
  11. ES6+ Format as “FAT Arrow” Function
  12. ES6+ Format as “Phaser.Class”
  13. ES6+ Format as “Phaser.Scene”
  14. IIPart II: Making “Memory” Browser Games

4General Design Considerations

  1. 4.1Game Mechanics (GM) - Data Structure
  2. 4.2Game Mechanics (GM) - Logic, & Rules
  3. General Game Procedures
  4. 4.3MahJong - “Matching Open Pairs”
  5. MahJong Rule Variations
  6. “52 Card Pick-up”
  7. 4.4Memory Matching “Hidden Pairs”
  8. “Hidden Pairs” Rule Variations
  9. 4.5Memory Matching “in Sequence”
  10. Clones & Competitors
  11. Sequence Logic

5Memory Matching — Core Game Construction

  1. 5.1Game Project Overview
  2. 5.2Our Goal
  3. 5.3“Mega-Chapter” - 5 Available Games
  4. 5.4Memory Matching Genre Description
  5. Deeper Dive: “Due Diligence in Gaming Research”
  6. Deeper Dive: Audio Games
  7. Adding Sound to Your Phaser3 Game
  8. 5.5Game Recipe™ Featured Ingredients
  9. 5.6Step 3a: Create “Play.js”
  10. 5.7Step 3b: Create Supporting functions.
  11. 5.8Conclusion
  12. IIIPart III: Code Review

6MahJong — “Matching Open Pairs”

  1. 6.1Simple MahJong Prototypes — Phaser v2 & III!
  2. Play Phaser III Demonstrations
  3. Play Phaser v2.x.x Demonstrations
  4. Download v2.x.x Project files
  5. Download Phaser III Project files
  6. 6.2Booting & Loading (Phaser III stage 1)
  7. 6.3Main.js (Phaser III stage 1)
  8. Defining Tile Metadata
  9. 6.4Play.js (Phaser III stage 1)
  10. Shuffling & Randomized Deployment
  11. Creating Tiles
  12. Selecting Tiles (Phaser III stage 1)
  13. Tile Selection & Validation (Phaser III stage 1)
  14. 6.53D Layout Prototype (Phaser v2.x.x stage 1)
  15. IVPhaser v3.16+ Code Review

7Game #1 - “Hidden Pairs”

  1. 7.1Game Description
  2. 7.2Main.js Overview
  3. 7.3Play.js — Overview
  4. 7.4Phaser Essential Functions
  5. “Play Phase” Variables — Lines 46 to 61
  6. Play.js — preload — Lines 72 to 95
  7. Play.js — create — Lines 95 to 315
  8. Play.js — update — Lines 318 to 345
  9. 7.5Game Mechanisms & Supporting Functions
  10. Deeper Dive: Phaser vs JavaScript Timers
  11. Play.js — checkTiles Lines 356 to 465
  12. Play.js — decreaseTimer Lines 469 to 490
  13. Play.js — getRandom Lines 491 to 501
  14. Play.js — resetGT Lines 502 to 535
  15. Play.js — showTiles Lines 536 to 605
  16. Play.js — stopWatchTimer (optional) Lines 606 to 628
  17. Play.js — Tiles (alternate) Lines 629 to 686

8Game #2 - “Matching Sequence”

  1. 8.1Game Description
  2. Simple Shaman™
  3. 8.2Design Consideration: “Separation of Concerns”
  4. Managing Player Input & Validation
  5. Managing Panel Displays
  6. Project Development Tools
  7. Deeper Dive: Experiments with Polygons
  8. Deeper Dive: Callbacks & Events
  9. “Callbacks and Events”
  10. Deeper Dive: Making Phaser v3.16+ Graphics “clickable”
  11. Deeper Dive: WebGL Foundations
  12. Summary: Design Option #1 graphics
  13. 8.3Menu.js Overview - animated “.GIF
  14. “How to reuse game.anims animations?”
  15. 8.4Main.js Overview
  16. Game Security
  17. Revealing too much, too soon!
  18. 8.5Play.js Overview
  19. 8.6Phaser Essential Functions
  20. Play.js — preload — Lines 105 to 137
  21. Play.js — create — 138 to 368
  22. Innovation Experiment — Panel Animations
  23. Play.js — update — Lines 371 to 414
  24. 8.7Game Mechanisms & Supporting Functions
  25. Play.js — getRandom Lines 423 to 431
  26. Play.js — gIntro Lines 432 to 453
  27. Play.js — moveOff Lines 454 to 460
  28. Play.js — Optional playerSequence Lines 461 to 503
  29. Play.js — released Lines 504 to 546
  30. Play.js — restart Lines 547 to 561
  31. Play.js — selected Lines 562 to 572
  32. Play.js — setUp Lines 573 to 592
  33. Play.js — simonSequence Lines 593 to 618
  34. 8.8Game #2 Conclusion
  35. VPhaser v2.x.x Code Review

9Game #3 - “Hidden Pairs”

  1. 9.1Play.js

10Game #4 - Matching Sequence

  1. 10.1Play.js — Overview
  2. Deeper Dive: Making Phaser v2.x.x Graphics “clickable”
  3. 10.2Play.js – Lines 36 to 203 Create Function:
  4. 10.3Play.js – Lines 205 to 224 Update function
  5. 10.4Play.js – Lines 230 to 400
  6. 10.5Play.js – Lines 384 to 396 box function
  7. 10.6Play.js – Lines 240 to 243 deselectBox function
  8. 10.7Play.js – Lines 244 to 306 playBoxes function
  9. 10.8Play.js – Lines 307 to 324 restart function
  10. 10.9Play.js – Lines 325 to 360 selectBoxes function
  11. 10.10Play.js – Lines 361 to 382 startCountDown function
  12. VIAuxiliary Business Functions

11Game Shell - The CMS!

  1. 11.1Generic Main.js
  2. 11.2Generic Boot.js
  3. 11.3Generic Preload.js
  4. 11.4Generic Splash.js or Language.js
  5. 11.5Generic Menu.js
  6. Sample CMS page — Credits.js
  7. Deeper Dive: Using JAMStack as an SSG …
  8. Visit JAMStack http://jamstack.org
  9. Deeper Dive: Static Site Generators (SSG)
  10. 11.6Inside each Game Phase

12Plug-in Enhancements

13Conclusion

14Bonus Development Content

  1. VIIWhat’s next?
  2. 14.1Game Distribution & Marketing
  3. “How to publish a game on the web??”
  4. Introduction: 8-Step Deployment Method.
  5. Shareably (SBLY) looking to rent your Phaser games
  6. 14.2Book Review Protocol
  7. 14.3Tell the world about your game!
  8. Appendix

More Resources

  1. JavaScript Garden
  2. Additional Content Appendices
  3. Other resources:
  4. Selling your Game Assets

Appendix: Making WebXR games!

Appendix: Online Game Development

Appendix: Phaser III Plugins

Appendix: “How to Start a WebSocket”

  1. Testing Your Browser
  2. Test sites:
  3. WebSocket Protocol Handshake
  4. Deeper Dive: WebSocket API
  5. Sample Source Code: Client-side WebSocket
  6. Step #1: Game index page
  7. Step #2: Generate Event handlers

Appendix: OLOO - Safe JavaScript

  1. JS Objects: “TL;DR”
  2. 15.2.2 Inside the body of a class definition
  3. Deeper Dive: JS Delegation (aka “Inheritance”?)
  4. The old way
  5. “Object Oriented JavaScript Pattern Comparison”
  6. ECMA-262 7th Edition / June 2016
  7. Objects Linking to Other Objects (OLOO)
  8. Compare your code
  9. Object.create
  10. Exercise Lesson 9:
  11. Exercise 1
  12. Game Singletons
  13. Deeper Dive: Object Manipulation objects in ES5/6
  14. Lesson Summary
  15. Resource References:

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.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

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) and EPUB (for phones, tablets and 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

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub