Coder Social home page Coder Social logo

tetrix's Introduction

Tetrix

Tetrix is a novel multiplayer take on the classic Tetris game in which block stacking is done by 4 players working in 4 different directions. Like traditional Tetris, the goal is to complete and clear lines to avoid filling the board as the game speeds up. Points are awarded on line clears and the game ends when a players stack reaches the end of their game board. The twist is that you must now think multi-directionally, all while attacking or helping your peers, coordinating trades and enduring spectator voted effects. The game is designed to be played both cooperatively and competetively. You can try for the highest team score by strategizing, trading and clearing together, or your can sabotage your enemies by blocking them off, stealing their lines and colliding with them directly.

Running Instructions

Ensure you have NodeJS and npm installed before continuing.

  • in the root directory, run npm i
  • in /server run npm run build to build the server

Starting the server

  • Run export PORT=3001 to let the server run on port 3001. Change this to another port (other than port 3000) if it is already taken.
  • From the root directory, run cd server && npm run dev

Starting the client

This will need to be done in a separate terminal.

  • From the root directory, run cd client && npm run dev
  • Navigate to localhost:3000 to view the game on your browser. Use multiple browser tabs to simulate multiple clients.

Environment Variables

Component Name Type Default Function
Client VITE_BACKEND_URL String http://localhost:3001/ URL of the Tetrix backend server (not to be confused with the client Vite server)
Client & Server VITE_DISABLE_WAITING_ROOM Boolean false Skips the game's initial player waiting room
Server PORT Integer 80 The port used by the server

Build

  • npm run build in the monorepo root

    npm run build is ran on heroku deployment which should work locally, too.

tetrix's People

Contributors

adityaharvi avatar animeshkc avatar c25vdw avatar swebra avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.