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
npm start
- Currently when a ship gets destroyed, the window just refreshes with
location.reload()
. Updating this code withlocation.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. - "Listing 4-16. src/client/controls/keyboard.model.ts" should be "src/client/controls/keyboard.class.ts"
- "Listing 5-2 player.class.ts" should be "game.class.ts"
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.
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.
@csajedi who has helped identify the listing issues in the book. The PDF will be updated accordingly.