Blazor Game Lobby: Real-Time Rock-Paper-Scissors

A real-time, multiplayer Rock-Paper-Scissors game built with Blazor WebAssembly and SignalR. Players join rooms, select avatars, and play with live updates.

Full Description

BlazorGameLobby is a real-time, multiplayer Rock-Paper-Scissors game built with Blazor WebAssembly and ASP.NET Core SignalR. Players can join a game room, select an avatar, and play against each other with instant updates. The project demonstrates modern .NET 8 features, real-time communication, and a clean separation of client/server/shared code.

Key Features

  • Blazor WebAssembly frontend for fast, interactive UI
  • SignalR for real-time communication between players
  • Bootstrap 5 for responsive, modern styling
  • Player avatars and names for personalized gameplay
  • Room system: create or join rooms by ID
  • Game state management: handles moves, results, and player disconnects

Tech Stack

  • Blazor WebAssembly
  • 🌐.NET 8
  • 🖥️ASP.NET Core
  • 🔗SignalR
  • 🎨Bootstrap 5
  • 💻C#

Architecture

Client
Blazor WebAssembly frontend for UI and game interactions
Server
ASP.NET Core backend with SignalR hub for real-time messaging
Shared
Shared models and enums for consistent game logic
GameHub
SignalR hub managing game state and player moves
Lobby.razor
Lobby page for joining rooms and selecting avatars
GameRoom.razor
Main game room UI for playing rounds

Installation

  1. Install .NET 8 SDK
  2. Restore NuGet packages
  3. Build the project
  4. Run the server
  5. Open https://localhost:5001 in your browser

Screenshots

Blazor Game Lobby: Real-Time Rock-Paper-Scissors screenshot 1Blazor Game Lobby: Real-Time Rock-Paper-Scissors screenshot 2Blazor Game Lobby: Real-Time Rock-Paper-Scissors screenshot 3Blazor Game Lobby: Real-Time Rock-Paper-Scissors screenshot 4

DevOps & Deployment

  • CI/CD: Auto deplpoyment via Render.com with GitHub integration
  • Hosting: Hosted on Render.com and mapped to a subdomain via Cloudflare DNS.

Notes

  • Avatars can be customized by editing the Avatars array in Lobby.razor.
  • UI is styled with Bootstrap 5 for easy customization.
  • Game logic is extendable in GameHub.cs and shared models.
  • MIT licensed for open source contribution and modification.