Skip to content

Repository files navigation

💖 Found BoredGames interesting?

⭐ Please consider giving us a star to support the project! ⭐

ClashOfHands game logo

BoredGames

Web platform for hosting custom web-based games and games' backends.

GitHub Release

Client Deploy

Server Deploy

Website 🌎Installation ⚙️

📚 Introduction

BoredGames is a web platform for creators to host their games and for players to enjoy playing web-based games. Games that run in browser can be played on any device without any installation. Platform API provides backend logic for scoring and multiplayer gaming.

BoredGames website with gallery of games (screenshot)
BoredGames website

🌟 Key Features

BoredGames offers tools for your game:

🔧 Hosting

  • WebGL/Wasm/JS: upload a game draft which is then reviewed and hosted for free

🏆 Scoring and multiplayer API

  • Scoring: tracks gameplay scores
  • Multiplayer: play with other people on the network

📧 Player Profiles

  • Anonymous: play without registration by using ephemeral session
  • Registered: create account to keep your scores and library of your favorite games

📱 Mobile-Friendly

  • Cross Platform: runs in any browser natively
  • Screen Size: supports different screen resolutions

🚀 Getting Started

🏠 Quick Start with Aspire

Important

Please ensure you have .NET SDK 10 installed on your system. If not, you can download them from the official Microsoft website: .NET.

Important

Please ensure you have Docker installed on your system. If not, you can download them from the official Docker website: Docker

Important

Please ensure you have Aspire installed on your system. If not, you can find instructions on the official Aspire web site: Aspire CLI.

  1. Clone the Repository:

    git clone git@github.com:vlado-github/BoredGames.git
  2. Navigate to the BoredGames.Server Directory (BoredGames.Server):

    cd BoredGames/BoredGames.Server
  3. Start Aspire: Using dotnet:

    dotnet run --project BoredGames.Server/BoredGames.Aspire.AppHost/

    or using Aspire CLI:

    aspire run --detach
  4. Access Aspire Dashboard:

    In terminal output you will find **Dashboard: <localhost_url>** that you can access via browser
    
  5. Stop Aspire

    aspire stop

🐳 Quick Start with Docker

Important

Please ensure you have Docker and Docker Compose installed on your system. If not, you can download them from the official Docker website: Docker.

  1. Clone the Repository:

    git clone git@github.com:vlado-github/BoredGames.git
  2. Navigate to the Root Directory (BoredGames):

    cd BoredGames
  3. (first time only) Add .env.local file to the folder with the content:

DB_SERVER=boredgames_localhost
KEYCLOAK_SERVER_NAME=boredgames.keycloak.local
BORED_GAMES_API_KEY=__some_key__
BORED_GAMES_APP_BASE_URL=http://localhost:5173
BORED_GAMES_CORS_ORIGIN_URL=http://localhost:5208,https://localhost:7075
BORED_GAMES_SERILOG_DSN=__BORED_GAMES_SERILOG_DSN__
NGINX_CONFIG_PATH=./.nginx/config/nginx.conf
ASPNETCORE_ENVIRONMENT=Development
  1. (first time only) Check availability for volume folders and add them:
ls -ld /home/boredgames /home/boredgames/letsencrypt /home/boredgames/release /home/boredgames/redis_data
sudo mkdir -p /home/boredgames/{letsencrypt,release}
sudo mkdir -p /home/boredgames/redis_data
sudo chown -R "$USER":"$USER" /home/boredgames
  1. Start the Docker Containers:

    docker compose --env-file .env.local up --scale gameserver-silo=3 -d --force-recreate
  2. Open API documentation:

    Open your browser and navigate to http://localhost:5008/index.html
    

💻 Local Setup

BoredGames.Server

Important

Please ensure you have .NET SDK 10 installed on your system. If not, you can download them from the official Microsoft website: .NET.

Server side contains two parts:

  • BoredGames.Server.GameServer: a backend server for handling queueing, players actions, game logic and game state.
  • BoredGames.API: a REST API for clients to interact with the game server.

Build

  1. Run shell or cmd
  2. Position to source folder of solution (BoredGames/BoredGames.Server)
  3. Execute command: dotnet build

Run

  1. Run shell or cmd
  2. Position to source folder of solution (BoredGames/BoredGames.Server)
  3. Execute command: dotnet run --project BoredGames.Server.GameServer --launch-profile local
  4. Execute command: dotnet run --project BoredGames.API --launch-profile local
  5. Open swagger documentation in browser via url https://localhost:7075/index.html

BoredGames.Client

Important

Please ensure you have NodeJS and NPM installed on your system. If not, you can download them from the official NodeJS website: NodeJS.

Build

  1. Run shell or cmd
  2. Position to source folder of project (BoredGames/BoredGames.Client/BoredGames.Portal)
  3. Execute command: npm install

Run

  1. Run shell or cmd
  2. Position to source folder of project (BoredGames/BoredGames.Client/BoredGames.Portal)
  3. Execute command: npm run dev

About

BoredGames platform for hosting custom web-based games and games' backends.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages