Skip to content

maxk2807/WaterWizards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WaterWizards

A battleship game built using .NET 8, Raylib-cs for the client-side graphics, and LiteNetLib for networking.

Project Structure

The solution (WaterWizards.sln) contains the following projects:

Prerequisites

  • .NET 8 SDK

Setup and Running

  1. Clone the repository (if you haven't already):

    git clone SSH <repository-url>
    cd WaterWizards
  2. Build the solution:

    dotnet build WaterWizards.sln

    atm if u want to test local with 1 device, run the Client first and then start the Server and after that, you could try to join your Localhost

  3. Run the Client:

    dotnet run --project src/WaterWizard.Client/WaterWizard.Client.csproj
  4. Run the Server:

    dotnet run --project src/WaterWizard.Server/WaterWizard.Server.csproj

Dependencies

Game Launcher

Unix/MacOS/Linux

  • ./start-game - Universal Script
  • ./start-game.sh - Bash Skript for a quick start with 2 clients and with a server

Windows

  • start-game.bat - Batch-Script for CMD
  • start-game.ps1 - Powershell-Script

Usage

Easiest Method (all Platformen)

./start-game

Windows Powershell

.\start-game.ps1

Windows CMD

./start-game.bat

Unix/MacOS/Linux

./start-game.sh

Ending the Game

On all platforms

CTRL + C

Logging

Scripts are creating log files:

  • server.log - Server-Logs
  • client1.log - Client 1 Logs
  • client2.log - Client 2 Logs

Troubleshooting

Build-Error

❌ Build failed! Please fix the errors and try again.

Solution: Fix the build errors

Server-Start-Error

❌ Server failed to start. Check server.log for details.

Solution: Check the server.log for detailed logs.

Port-Conflicts

Symptom: Server or Client can't connect to each other Solution:

  • Check if port 7777 is available
  • End other dotnet-process
  • Use netstat -an | grep 7777 (Unix) or netstat -an | findstr 7777 (Windows)

Start single Services

Start only Server (dotnet)

dotnet run --project src/WaterWizard.Server/WaterWizard.Server.csproj

Start only Server (docker)

  • In the server directory run:
docker compose up --build

Start only a Client

dotnet run --project src/WaterWizard.Client/WaterWizard.Client.csproj

Plattform-Support

Plattform Recommended Script Alternative
macOS ./start-game ./start-game.sh
Linux ./start-game ./start-game.sh
Windows start-game.ps1 start-game.bat

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 6