Skip to content

Compare and contrast Phaser 3 and Kaboom.js to create similar game mechanics

License

Notifications You must be signed in to change notification settings

ourcade/phaser3-vs-kaboomjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phaser3-vs-kaboomjs

Phaser 3 vs Kaboom.js in 3 Examples

Compare and contrast 2 different ways to create the same mechanics

License

Overview

This repository contains 3 game mechanic examples using Phaser 3 and Kaboom.js.

  • space shooting
  • exploding block
  • A* pathfinding

Each example has a Phaser 3 version and a Kaboom.js version as a means to compare and contrast a class-based paradigm against a functional, component-based paradigm.

Check out a video going over the code on YouTube!

Getting Started

Clone this repository with git, install dependencies, and then each example has a separate run command.

First install dependencies:

npm install

Then for each example run one of the following at a time:

npm run start:space 	# for the space example
npm run start:blocks	# for the blocks example
npm run start:astar	# for the astar example

Go to http://localhost:3000 to see the example with a side-by-side comparison.

If the running example doesn't appear to change then try running the clean script and try again:

npm run clean

You can also try a hard reload by holding shift and then pressing the refresh button just in case things are cached by the browser.

Resources

Check out the Phaser 3 website and the Kaboom.js website for more on each library.

For more tutorials on making games with Phaser 3 or Kaboom.js, check out these Ourcade resources:

From YouTube

Check out the Ourcade channel page for even more including ECS in Phaser 3, custom components in Kaboom.js, and multiplayer games with Colyseus. Be sure to subscribe!

From the Blog

Check out the full blog for more including a pair of free ebooks!

Assets

The game art from this example was provided by Kenney.nl and ansimuz.

License

MIT License