A console-based Java exploration game built around a time-loop concept. The project demonstrates custom linked data structures, circular turn management, random event processing, inventory management, action logging, and branching timelines.
Players take turns exploring rooms, encountering random events, collecting special stones, and attempting to break the time loop by using Echo Stones in the correct sequence.
- Multiplayer turn-based exploration
- Circular turn management between explorers
- Reversible turn direction
- Random events affecting health, treasure, inventory, and turn order
- Echo Stone collection and usage
- Paradox Stones for viewing or creating timelines
- Branching timeline system
- Player health and treasure tracking
- Custom linked-list inventory
- Action history logging
- Win and elimination conditions
- Console-based interactive interface
java-time-loop-explorer/
├── src/
│ ├── ActionLog.java
│ ├── Event.java
│ ├── Explorer.java
│ ├── Game.java
│ ├── Inventory.java
│ ├── TestGame.java
│ ├── TimeLine.java
│ └── Turn.java
├── .gitignore
└── README.md
Controls the main game state and gameplay logic, including:
- Moving explorers between rooms
- Triggering random events
- Using Echo Stones
- Using Paradox Stones
- Creating timeline branches
- Checking win and loss conditions
- Managing turns
Represents each player in the game.
Each explorer has:
- A name
- Health points (HP)
- Treasure count
- An inventory
- References to the next and previous explorer
Explorers begin with 3 HP and no treasure.
Manages the explorer turn order using a circular doubly linked structure.
It supports:
- Adding explorers
- Moving to the next explorer
- Reversing turn direction
- Removing eliminated explorers
- Maintaining circular traversal
Generates random events during exploration.
Possible effects include:
- Losing HP
- Gaining HP
- Finding treasure
- Finding an Echo Stone
- Finding a Paradox Stone
- Reversing the turn order
Stores the stones collected by each explorer using a linked structure.
Two special stone types are available:
- Echo Stone — numbered stones used to break the time loop
- Paradox Stone — allows interaction with the timeline system
Manages alternative timeline branches.
The game begins with a main timeline. Players with a Paradox Stone can create additional branches and view existing timelines.
Maintains a linked history of player actions within a timeline.
Logged actions include:
- Movement
- Echo Stone usage
- Paradox Stone usage
Contains the main method and provides the console-based interface for playing the game.
This project demonstrates several programming and data structure concepts:
- Object-Oriented Programming
- Singly Linked Lists
- Doubly Linked Structures
- Circular Linked Structures
- Dynamic turn management
- Random event generation
- Branching structures
- Action logging
- Inventory management
- State-based game logic
Each explorer begins with:
HP: 3
Treasure: 0
Inventory: Empty
During a turn, the player can:
1) Move
2) Use Echo
3) View Timelines
4) Forge New Path
Moving triggers a random event.
Events may damage or heal the explorer, award treasure, provide special stones, or reverse the direction of the turn order.
Echo Stones are numbered:
1
2
3
To break the time loop, an explorer must successfully use the Echo Stones in the required sequence:
1 → 2 → 3
Completing the sequence satisfies the game's win condition.
Paradox Stones interact with the timeline system.
A Paradox Stone can be used to:
- View existing timelines
- Forge a new timeline branch
Each branch maintains its own action log.
- Java Development Kit (JDK)
From the repository root:
javac src/*.javajava -cp src TestGame#### ==== The Time Loop Explorers ==== ####
Explorer name: Alice
Explorer name: Bob
Game start! Use Echo Stones 1 -> 2 -> 3.
Turn: Alice | HP=3 | T=0
1) Move
2) Use Echo
3) View Timelines
4) Forge New Path
Choice:
This project was developed as an academic Java project to practice data structures and object-oriented programming through an interactive game simulation.
The implementation focuses on linked structures, circular traversal, dynamic turn management, event processing, inventory operations, and timeline branching.
Zeynep Oktay