Skip to content

Networked multiplayer basketball game with three playable modes.

Notifications You must be signed in to change notification settings

AryanRogye/HoopsRepo

Repository files navigation

Hoops

Hoops is a real-time, networked multiplayer basketball game built with a custom client–server architecture. The game supports multiple concurrent players, authoritative server-side state, and real-time synchronization of player movement and ball physics across clients.

This project was developed over an entire semester as a large-scale implementation based on an original design document.

Current Server: http://localhost:4041

Dev Setup

From the repo root you have two projects:

  • Hoops → LibGDX desktop client
  • HOOPS_Server → Netty/JavaFX backend

Frameworks Used

  • Backend:

    • Server
      • Netty
        • transport
        • handler
        • codec
        • codec-http
        • buffer
    • Database
      • PostgreSQL JDBC Driver
    • Security
      • JBCrypt
    • Environment Config
      • java-dotenv
    • Json
      • GSON (Java)
    • UI
      • JavaFX 21
    • Testing
      • JUnit 5
  • Frontend:

    • Game
      • LibGDX
        • com.badlogicgames.gdx:gdx
        • gdx-backend-lwjgl3
        • gdx-platform:natives-desktop
        • gdx-freetype
        • gdx-freetype-platform:natives-desktop
      • VisUI
    • Client
      • Netty
        • transport
        • handler
        • codec
        • codec-http
        • buffer
    • Json
      • GSON (Java)
    • Testing
      • JUnit 5

Build Instructions

  • Make sure in the root of both Client + Server code
Client Root (Hoops/) Server Root (HOOPS_Server/)
aryanrogye@[master]: Hoops/
⮕ ls
 bin
 build
 gradle
 src
 build.gradle.kts
 gradlew
 gradlew.bat
 Makefile          // what we want
 README.md
 settings.gradle.kts
aryanrogye@[master]: HOOPS_Server/
⮕ ls
 ${workspaceFolder}
 bin
 build
 gradle
 src
 target
 build.gradle.kts
 gradlew
 gradlew.bat
 GUI_README.md
 Makefile          // what we want
 settings.gradle.kts

⚠️ Warning Make sure a valid .env is present:

⚠️ Example .env (values shown are placeholders)

HOST=aws-......
PORT=someport
DATABASE=postgres
DB_USER=postgres.some_numbers
POOL_MODE=session
DATABASE_PASSWORDA=db_password

# FOR TESTS THIS WOULD BE CONFIGURED WITH USERS DB VALUES
# SEE "./HOOPS_Server/src/test/java/com/hoops/db/DatabaseManagerTest.java"
TEST_EXISTING_EMAIL=aryan.rogye@gmail.com
TEST_EXISTING_USERNAME=aryan_rogye
TEST_EXISTING_PASSWORD=hoops_password
TEST_EXISTING_TOKEN=4a870bdb-e1c8-4676-bdf4-33bd8387920a
TEST_EXISTING_ID=194fdbf0-e5d8-4230-95bb-282891e9cebe

Note for Graders / Reviewers:
The project requires a valid .env file with real database credentials to fully run the backend tests.
For security reasons these values are not included in the repository.
If you need a working .env to run or verify the project, email me at arogy2@uic.edu and I will provide it.

  • make run To run each project

    Each project has a makefile which is only running ./gradlew run in both roots

  • To run multiple clients, go to the repo root (the folder that has both Hoops/ and HOOPS_Server/):

aryanrogye@[master]: Hoops/
⮕ ls
...
..
 Hoops
 HOOPS_Server
 run4Clients.py
...
..
  • ./run4Clients.py Runs 4 clients at a time

  • Release Jars:

    Temporarily not working, Built Jar keeps crashing

    • From the repo root run ./build_release.sh release to build the client (overlay disabled) and server jars in one shot. Artifacts land in build/client/HoopsClient-release.jar and build/server/HoopsServer.jar.
    • Use ./build_release.sh debug when you want a client jar with the DebugOverlay enabled for internal testing (build/client/HoopsClient-debug.jar).
    • You can still run each project directly: cd Hoops && GRADLE_USER_HOME=.gradle ./gradlew shadowJar -PdebugOverlayEnabled=false for the client and cd HOOPS_Server && GRADLE_USER_HOME=.gradle ./gradlew shadowJar for the server.

Execution Instructions

  • For Lan IP Sharing + Testing, some basic permission setup:
       chmod +x ip_logger.py
       chmod +x ip_dispatcher.py
  • Testing LocalHost is fine, the client knows about this
  • While Testing Server on LAN with multiple users, we came up with a fast way, if and only if, the user is in the git repo
       ./ip_logger.py
  • This fills in the ip_config.json in the root, and it asks if the user wants to push the changes to git
  • Any other user can run:
       ./ip_dispatcher.py
  • This will look for a Client.java file and updated the ip line with correct information

About

Networked multiplayer basketball game with three playable modes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors