Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 1.64 KB

README.md

File metadata and controls

55 lines (39 loc) · 1.64 KB

Game scene

Bring Axie into Colyseus multiplayer game

This is an example Axie artillery game with Cocos Creator and Colyseus

Game scene

Requirements

Setup before the first run

  1. Go to root folder. Then run npm install in the terminal:
npm install
  1. Change directory into folder server. Then run npm install in the terminal:
cd server
npm install

Run the project

1. Run server

Navigate into server folder, then run server. By default, Colyseus server is deployed at localhost:2567.

cd server
npm start

2. Run client

  • Open the root folder by Cocos Creator.
  • Open scene game, located at assets/axie-colyseus-demo/scenes/game.scene.
  • If you have made any settings for your Colyseus Server. Goto Node (Cocos GameObject) Systems and configure Hostname, Port, UseSSL, Game Room to match your server.
  • Run the scene game.

Game

After run properly, the game will look like this: Game scene

How to play

  • 2 players will join the game. The first one plays as Puffy (cyan Axie) and the other plays as Pomodoro (red Axie).
  • Players will try to hit each other, turn by turn. The first one throws a tomato right into the opponent is the winner.
  • Use your navigation keys (WASD or Arrows) to move your Axie. Hold Space to scale power and relase to fire.

Game scene