Git Product home page Git Product logo

multiplayer-phaser-game's Introduction

Multiplayer Phaser Game

Phaser 3 is out and Phaser 4 is in the works. This project is based on Phaser CE. Due to the ever changing nature of the Phaser projects, keeping up with the changes might mean a complete rewrite every 4-5 months. The structure and patterns would stay in place, but the major changes come from the Phaser api changes.

I will be writing a book on Phaser 4 in the near future as soon as it's stable, and thus initially skipping Phaser 3 altogether.

Codacy Badge Build Status

Apress book

Use great technologies

Such as TypeScript, Phaser and socket.io to create a fun little multi-player game that can entertain you and your friends for a minute or two.

You will learn to animate sprites, work with physics, and develop logic to create a modern multi-player spaceship shooter!

The book is found here on Apress

A Live preview of the game is available

Once you have forked or downloaded this repository you can start it with the following command

How to run a preview

npm start

Known issues

  1. Currently when a ship gets destroyed, the window just refreshes with location.reload(). Updating this code with location.reload(true) will fix the issue where the reload causes just a black screen to appear. This forces the browser to reload all assets instead of partially reloading them, which in turn fixes the bug. This branch includes the fix, but in the book the issue is still there.
  2. "Listing 4-16. src/client/controls/keyboard.model.ts" should be "src/client/controls/keyboard.class.ts"
  3. "Listing 5-2 player.class.ts" should be "game.class.ts"

Multiplayer functionality

If you are running on a local server on your computer, opening a second browser window and visiting the same localhost port (3000) will simulate the multi-player functionality.

Issues

For any issues regarding NPM. Most of the fixes require you to remove the package-lock.json file and reinstalling the dependencies with npm i. The NPM/Node community is extremely fragile.

No project is without issues. Since this is associated with a printed book. The book sadly cannot fix any encountered issues. If encountered. Please mention the issues associated with this github repo. I will then drop anything I am doing to assist as best I can! Thank you for your support and for giving me the opportunity to write something for you.

Special Thanks

@csajedi who has helped identify the listing issues in the book. The PDF will be updated accordingly.

multiplayer-phaser-game's People

Contributors

code0wl avatar dependabot[bot] avatar codacy-badger avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.