Skip to content

Client & Server Setup

AMMayberry1 edited this page Dec 31, 2024 · 4 revisions

You will need to clone the repo here as well as the client repo which can be found here

Preparing the server

The following instructions will install the required dependencies, download card data, and build the compiled javascript to run the server. The current run command includes creating local environment variables and creating all of the necessary test files. If done successfully the console should inform you that the server is running on port 9500.

npm install
npm run get-cards
npm run dev

Preparing the client

All that is needed to start the client is to run the following 2 commands

npm install
npm run dev

Playing the game

The current flow for creating a game largely follows the normal game flow you would expect. We have created 2 default users that have dedicated logins, Order66 (player1) and ThisIsTheWay (player2). After starting up both servers log in as Order66. From here you can create a game from the create game form on the home screen. The form can be left blank to create a game with the default Set 1 starter decks or a deck link from swudb.com[https://swudb.com/] can be used to load up a custom deck. The creates a custom game lobby.

Open a privacy mode tab and log in as ThisIsTheWay. On the homescreen you should see the custom lobby as a joinable game. Click join game to join the lobby. Currently the second player deck cannot be set from the default. Click Start Game as Order66 and then click Start Game as ThisIsTheWay. This should start your game.

Testing cards with custom game setups

The current system also has the ability to setup custom game scenarios that can be started with a definied setup. In test/gameSetups there is a defaultTemplate that shows the options available for setting up a game. New setups can be created in this directly and will be loaded into the build folder when starting the server with npm run dev

To start one of these games:

  1. Log in as Order66 and the Test section will become available in the middle column of the home page
  2. Clicking the button with the name of the desired setup will immediately start the game
  3. The game can be joined as ThisIsTheWay by logging in as that user in a private browsing tab, then open the Test section and click "Join test game"