iamnotaturtle / Multiplayer-Phaser-game

:rocket: Multiplayer space shooter game accompanying repo

Home Page:https://www.apress.com/gp/book/9781484242483

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiplayer Phaser Game

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

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.

About

:rocket: Multiplayer space shooter game accompanying repo

https://www.apress.com/gp/book/9781484242483

License:MIT License


Languages

Language:TypeScript 89.1%Language:CSS 5.8%Language:JavaScript 3.7%Language:HTML 1.4%