Skip to content

benjaminniess/square-squad

Repository files navigation

Square Squad

Square Squad is a multiplayer in browser game based on socket.io communication between Vue.js and Node.js. You can play it on square-squad.com and tell us about your experience here on in our Discord channel

🏗️ Local Setup

# install server dependencies and build files for both back-end and front-end
npm run build

# start the server side at localhost:8080 with hot reload. Use npm start for clasic load

npm run dev

# serve the front end site at localhost:1080

npm run startvue

# run the typescript watch system

tsc -w

You can now access the front-end app on localhost:1080

🧪 Tests command

To test the back end

npm test

To test the front-end

cd vueapp && npm test

⚙️ .env file

You can copy the .env_example file at the root directory and name it .env. Then, you can adapt configuration as follow:

MATTER_DEBUG=true=false
ENABLE_NEW_RELIC_AGENT: (bool) Set to true if you need some New Relic performances feedbacks
NEW_RELIC_LICENSE_KEY: (string) A new relic licence key
NEW_RELIC_APP_NAME: (string) The New Relic app name
COUNTDOWN: (Int) A number of seconds for the game countdown. Set to 1 for a 1 second countdown
FORCE_HTTPS: (bool) Use SSL?
FORCE_DOMAIN: (String) If multiple domains linked to the app, you can define the main one (eg. my-env.com)
DISABLE_OBSTACLES: (bool) Your can disable all obstacles for test purpose
ADMIN_PASSWORD: The password to access the /admin view

Changelog

📦 1.2.9 - 2021-08-16

  • ♻️ First basic code conversion to TypeScript.
  • 🧪 Converted tests to TypeScript as well

📦 1.2.8 - 2021-08-13

  • ✨ Score changer bonus are now declined into +3, +5, +10 and -3, -5, -10
  • ♻️ Removed last global var using DI
  • 🧪 Added some more tests on bonus

📦 1.2.7 - 2021-08-11

  • 🔒 Security update of package depenencies
  • 🧪 Added some more tests on rooms and players actions
  • ♻️ Code refacto to remove most of the global var usage in index.js

📦 1.2.6 - 2021-08-02

  • ✨ Added tests to Vue components

📦 1.2.5 - 2021-07-21

  • ✨ Joystick in mobile version
  • ✨ Allowed room url sharing with auto join

📦 1.2.4 - 2021-07-18

  • ✨ Added touch control + media query to make the game work on mobile
  • 🧪 Added unit tests on main socket actions

📦 1.2.3 - 2021-07-15

  • 🐛 Fixed simultanous collisions
  • 🐛 Fixed bodies not removed after death
  • 🐛 Fixed crash after socket is lost

📦 1.2.2 - 2021-07-14

  • ✨ Google Analytics when env var is set
  • 🐛 Fixed multi domains + SSL redirection
  • 🐛 Fixed 404 page

📦 1.2.1 - 2021-07-11

  • 🐛 Fixed about us link
  • 🐛 Fixed version number in footer

📦 1.2.0 - 2021-07-11

  • ♻️ Refactored the whole application to use Vue.js