Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Grid Adventure - Java RPG Game ๐ŸŽฎ

A simple text-based 2D Role-Playing Game (RPG) implemented in Java, based on object-oriented principles.

๐Ÿ“Œ Introduction

Grid Adventure is a Java-based, console role-playing game (RPG) where players navigate a 2D grid, battle monsters, and strategize their way to victory. Designed using Object-Oriented Programming principles, the game demonstrates class inheritance, encapsulation, polymorphism, and game state management in a modular fashion. image

โœจ Features

  • ๐Ÿงญ Explore a 2D grid-based map
  • ๐Ÿ‘พ Battle AI-controlled monsters with randomized movement
  • โš”๏ธ Turn-based combat system with attack/defense strategies
  • ๐Ÿง  Object-Oriented design using Java abstract classes and inheritance
  • ๐Ÿ”„ Replayable gameplay with customizable map size, difficulty, and player name
  • ๐ŸŽจ Color-coded console output for enhanced visualization

๐Ÿ•น๏ธ Game Mechanics

  • The player is placed on a 2D grid map.
  • Monsters move randomly each round.
  • The player can move in four directions and engage in combat.
  • The game ends when all monsters are defeated or the player dies.

๐Ÿ’ป Development Environment

  • Language: Java 17+
  • IDE: IntelliJ IDEA / Eclipse / VSCode
  • No external libraries required (pure Java)

๐Ÿ—‚๏ธ Project Structure

main/java/uoa/assignment/
โ”œโ”€โ”€ character/
โ”‚   โ”œโ”€โ”€ GameCharacter.java       # Abstract base class for characters
โ”‚   โ”œโ”€โ”€ Monster.java             # Monster subclass with random movement
โ”‚   โ””โ”€โ”€ Player.java              # Player subclass with attack/defense logic
โ””โ”€โ”€ game/
    โ”œโ”€โ”€ Game.java                # Manages game lifecycle and round logic
    โ”œโ”€โ”€ GameLogic.java           # Controls character movement and combat
    โ”œโ”€โ”€ Map.java                 # Manages map grid and character layout
    โ””โ”€โ”€ RunGame.java             # Main entry point and user interaction loop

About

Grid Adventure - Java RPG Game ๐ŸŽฎ Grid Adventure is a Java-based, console role-playing game (RPG) where players navigate a 2D grid, battle monsters, and strategize their way to victory.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages