This is an example Axie artillery game with Cocos Creator and Colyseus
- Cocos Creator 3.7.1 (or higher)
- Colyseus 0.15.0
- Axies and other Assets:
cc-axie-gtk2d
(https://github.com/axieinfinity/cc-axie-gtk2d)
- Go to root folder. Then run
npm install
in the terminal:
npm install
- Change directory into folder server. Then run npm install in the terminal:
cd server
npm install
Navigate into server
folder, then run server. By default, Colyseus server is deployed at localhost:2567
.
cd server
npm start
- Open the root folder by Cocos Creator.
- Open scene
game
, located atassets/axie-colyseus-demo/scenes/game.scene
. - If you have made any settings for your Colyseus Server. Goto Node (Cocos GameObject)
Systems
and configureHostname
,Port
,UseSSL
,Game Room
to match your server. - Run the scene game.
After run properly, the game will look like this:
- 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.