Skip to content
šŸ¤– Build and battle robots āš”
C# ShaderLab JavaScript Other
Branch: master
Clone or download

Latest commit

thomasnakagawa Unity game phases (#48)
* Add game phase controller scripts and prefabs

* Change gamestatemanager to use phase controllers

* Update scripts and tests for new game state stuff

* Make things work

* Add join game ui

* Comment out some tests
Latest commit 21b3bca Apr 3, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows Fix paths in Node.js tests workflow file Mar 27, 2020
BotRoyaleUnity Unity game phases (#48) Apr 3, 2020
node-webservice
.gitignore Initial commit with basic React, Node and Unity projects Feb 5, 2020
readme.md Update Node.js tests status badge in readme Mar 27, 2020

readme.md

Build-A-Bot Royale

Publish Unity game to Itch.io šŸŽ® Node.js tests šŸ§Ŗ Unity tests šŸ„½ React tests šŸ’„

Game about building robots and battling them. Players build their robot on their device, then everyone watches the battle on a larger screen.

Overview

The project consists of three parts:

  • Node.js + express web service: handles connection between clients and websocket connection
  • React client: The website that players use to build their robot
  • Unity game: Where the robot battle happen.

Dev setup

Each of the three parts of the project require their own development setup. There are readme.md files in three top level folders with more instructions on how to get set up.

Node.js setup

  • Clone the repo
  • Download Node.js
  • Navigate to /node-webservice
  • Run npm install to install dependencies
  • Run npm run start to start the webservice (alternatively, run npm run dev to start the webservice and auto-restart when code changes)
  • The Node webservice is now being served from localhost:9000, open this url in your browser

React setup

  • Clone the repo
  • Download Node.js
  • Navigate to /node-webservice/react-client
  • Run npm install to install dependencies
  • Run npm run start
  • The react app is now being served from localhost:3000, open this url in your browser.
  • For the React app to access the Node.js API, you will need to have it running at the same time.

For doing web dev work, it's best to have both the Node.js and React services running, you'll need to run two terminals for this.

Unity setup

  • Clone the repo
  • Download Unity Hub
  • Download Unity 2019
  • Open the folder /BotRoyaleUnity in Unity
  • Open the scene /Assets/Scenes/BattleScene.unity
  • Press play in the editor

Running the tests

Node.js

To run the Node.js app unit tests:

  • Navigate to /node-webservice
  • Run npm run test

React

To run the React tests:

  • Navigate to /node-webservice/react-client
  • Run npm run test

Unity

To run the Unity tests:

  • Open /BotRoyaleUnity in Unity
  • In the Unity editor, click Window -> General -> Test Runner
  • In the Test Runner window, select the EditMode tab
  • Click Run All
You canā€™t perform that action at this time.