See also my video instuctions in the screencasts section on MyCourses.
- Feel free to edit/replace this file.
- Do not delete or rename the reports, client, server or docs directories.
See Static Content - Don't clutter your repo, update your
.gitignore
file, depending on your client language / technology.- Don't commit binaries. (Images, jar files, class files, etc...)
- Don't commit buffer files. (Vim buffer files, IDE meta files etc...)
- Place your documentation in
docs
on master. - Commit frequently, commit fine grained.
- Use branches
- Don't push on master!
- Create a new branch for your feature.
- Work until stable / tested.
- Merge / rebase your temporary branch back to master.
- Delete your temporary branch.
.gitignore
: Preliminary git exclusion instructions. Visit Toptal's generator to update.reports
: Base directory for automatic report collection. Your weekly reports go here. Must be uploaded every monday noon to master and follow correct date stringYYYY-MM-DD.md
. Use template for your own reports. Do not resubmit same report / copy paste.docs
: source directory for your enabled GitHub Pages. ( Update number in link). Configure IDE to generate API docs into this directory or build your own webpage (optional).client
: Place your client sources into this directory. Do not use a separate repository for your work.server
: Place your Spring Boot Game Server sources in this directory. Do not use a separate repository for your work.
- Chrome MarkDown Plugin.
- Don't forget to enable
file://
inadvanced settings
.
- Don't forget to enable
- IntelliJ Checkstyle Plugin.
- Don't forget to enable Google's Checkstyle Configuration.
- Git CheatSheet.
- Advanced Rest Client (Rest Call Code Generator).
- Lobby Service
- Install Guide
Recommended: Startup indev
profile (default). - API Doc and ARC Configurations
- Game Developer Instructions
- Install Guide
- BGP sample deployment configuration (This one is meant for
testing / understanding the interaction between LS, UI and sample game)
Board Game Platform (BGP) = Lobby Service + Lobby Service Web UI + Sample Game, all as docker containers.- Sample Lobby Service Web UI
- Sample Lobby Service compatible Game (Tic Tac Toe, backend + frontend)
Be careful not to confuse Lobby Service and Board Game Platform.
Run the services in the following order:
- Run the LobbyService and its database, following its instructions.
- Run the server and its database, following its instructions.
- Run the client, following its instructions.
The service interplay configuration for this Splendor implementation uses Docker-Compose.
- Docker is a virtualization technology that allows a convenient deployment (installation) of services, independent of the host OS. Docker deploys individual services (the modules listed above) as containers.
- The Docker-Compose configuration of this repository orchestrates module containers (correct startup sequence, network wiring).
Note: You can use this docker-compose configuration on any system, no matter if a personal laptop or a headless server.
The following files are used for deployment:
docker-compose.yml
: Docker-Compose file to orchestrate the startup sequence and network wiring of containerised platform modules:Dockerfile-ls-db
: Container build instructions for the Lobby Service Database module.Dockerfile-ls-api
: Container build instructions for the Lobby-Service module.Dockerfile-sp-db
: Container build instructions for the Splendor server Database module.Dockerfile-sp-api
: Container build instructions for the Splendor server module.
Depending on your host-os, install docker-compose with one of the links below:
- Mac OS / Windows: Docker Desktop (docker-compose and GUI-tools)
- Windows: Additionally follow the official instructions to install the linux kernel.
- Prod Systems / Linux: Docker Compose (just docker-compose)
-
Clone this repository:
git clone https://github.com/COMP361/f2022-hexanome-14
-
Recursively pull, and re-attach all sub repositories:
- Mac / Linux:
./updatesubmodules.sh
- Windows:
.\updatesubmodules.ps1
- Mac / Linux:
Install java version 19
and maven to run the client.
Here are some good instructions by Baeldung on how to install
maven: https://www.baeldung.com/install-maven-on-windows-linux-mac
This is also necessary if the server is being deployed natively.
- If you're on a Mac with M1 chip, set these environment variables:
export DOCKER_BUILDKIT=0
export COMPOSE_DOCKER_CLI_BUILD=0
-
Power up the platform:
docker-compose up
(usedocker-compose up --build
to force rebuild) -
Test the platform:
- Run the client with the these instructions
- In the running client login with a user, such as
maex
,linus
,khabiir
ormarianick
, with the password:abc123_ABC123
- Create a session
- Launch another instance of the client
- Login as a different user to client 1
- On client 2, join the session created by client 1
- Launch the game on client 1
- Join the game on client 2
- Play! on both clients.