Skip to content

dpandev/adventure-time

Repository files navigation

Adventure Time

A co-op adventure game that features map exploration, puzzles/quests, and a rich story plot. The game utilizes an MVC architecture - separating the data from the game logic - allowing 'hot-swappable' game content.

Stack: Java 21 (Temurin), Gradle 8.x, Spring Boot 3.5.x (server), JUnit 5.

Planned: H2 (dev db), Postgres (prod db), Flyway, Testcontainers.


Architecture Overview

:domain
  com.dpandev.domain
  model/           // Pure state: Player, Room, Item, Puzzle, Monster, etc.
  world/           // World definitions + loader
  command/         // Command objects, parser, handlers
  service/         // Movement, inventory, inspect/look, save API, etc.
  spi/             // Interfaces for client/server implementations
  util/            // ID types, small helpers

:client
    com.dpandev.client
    controller/      // Command controllers
    persistence/     // File-based implementation of SaveRepository
    runtime/         // Game loop, session
      ClientApp.java  // Main entry point
    view/            // Console view rendering
  resource/
    worldpacks/     // World content packs (JSON)

:server           # builds, but not yet implemented
  com.dpandev.server
  config/         // Spring configuration
  controller/     // REST & WebSocket controllers
  service/        // Save management, auth, user management
  repository/     // Postgres repositories

Quick Demo

See all game features in action with the automated demo:

macOS/Linux:

./demo.sh

Windows:

demo.bat

The demo showcases: movement, combat, puzzles, inventory, equipment, healing, and save system. See DEMO.md for detailed documentation.

Gameplay Scenario Screenshots

View Gameplay Scenario Screenshots View Example Worldpack Map View Gameplay Demo Video


UML Diagram

UML Diagram Link (needs update for latest version)


Modules

  • :domain — Shared domain models and utilities.
  • :client — Console client for single-player MVP.
  • :server — Spring Boot app.

Prereqs

  • JDK 21 Temurin
  • Gradle 8.14.3

Quick Start

Choose Your Adventure

# Build and run with default (Frozen World) worldpack (example)
./run-client.sh

# Run with jurassic worldpack
./run-client.sh jurassic

# Run with any custom worldpack name
./run-client.sh my-custom-world

All worldpacks are located in client/src/main/resources/worldpacks/ All worldpack maps are located in docs/assets/worldpack-maps/

For Players

Want to play the game? Start here:

1. Run the game:

./gradlew :client:run

2. Learn the basics:

3. Type help in-game for a quick command reference.


For Development

1. Setup your environment:

  • Generate the wrapper: gradle wrapper --gradle-version 8.14.3
  • Build everything: ./gradlew clean build

2. Run the game:

  • Console client: ./gradlew :client:run
  • Server: ./gradlew :server:bootRun (works, but not yet fully implemented)

3. Read the docs:

4. Create custom content:


Documentation

Player Documentation

Developer Documentation

Admin Documentation


Additional info


AI Disclaimer:

AI was utilized in the development of this application. AI was primarily used as a tool for determining the initial repo structure/setup plan (given the desired stack to use - java 21, gradle, spring, etc.), debugging, optimization, and aiding with documentation. The purpose of using AI in this project is to aid learning and development efforts - reducing the amount of time normally spent googling and searching/filtering for information on Google, StackOverflow, etc. A more detailed list of prompts used for this project (non-conclusive) can be provided upon request.

The following is a list of the tasks completed by (or completed with the help of) AI tools:

  • Determining the optimal project repo structure for maximum versions compatability between frameworks, tools, and other requirements — as well as following conventional Java development standards. Requirements included: Java 21 (Temurin LTS), Gradle, Spring Boot, H2 (dev), Postgres (prod), and JUnit 5.
  • Configuring Gradle project structure and debugging build errors related to setup.
  • Generated a "less strict" checkstyle (in comparison to the Google Java Style). Found in config/checkstyle/...
  • Generating documentation (docs are manually reviewed for accuracy)
  • Auto-completing (tab) code snippets, methods, and javadoc comments (manually reviewed for accuracy; formatted automatically with spotless)
  • Debugging code errors and exceptions
  • Asking for "correct" or "best practice" alternatives to code snippets or approaches (class immutability, encapsulation, handling exceptions, etc.)

About

A text-based multi-player exploration game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •