Skip to content
kennethjsmithPublic

About

Team project

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

GLORP: Revenge of the Sphinx

A maze-and-riddle game in Java Swing, built in spring 2021 as a three-person team project for a software development and quality assurance course.

You play Glorp, a small alien looking for a new dilithium crystal somewhere in a maze of rooms. Doors between rooms are guarded by the Sphinx: walk into a door and answer its riddle to open it. A wrong answer blocks that door for good, so if every route to the crystal gets blocked you're entombed and lose.

Playing

  • Move: arrow keys or WASD
  • Doors: green = unlocked, yellow = locked (answer a riddle), red = blocked
  • Riddles come in three kinds, each from its own SQLite database: multiple choice (mcriddles.db, 77), true/false (tfriddles.db, 68) and fill in the blank (fbriddles.db, 84). Each answer comes with a short explanation.
  • Menus: File (Restart, Save Game, Load Game, Exit), Settings (music and sound effect volume), Help (About, Game Play Instructions), Cheats (Unlock All Doors) and Skins (Glorp or Ignignokt).
  • Saving writes the maze, the player and the game state into SavedGame/ with Java serialization; Load Game reads them back.

Run it

Needs a JDK (13 or newer; the Eclipse project targets Java SE 13). Run from the repo root, because sounds, icons, riddle databases and saves are all found by relative path.

javac -d bin -cp sqlite-jdbc-3.34.0.jar $(find src -name '*.java')
java -cp bin:sqlite-jdbc-3.34.0.jar controller.GlorpMain

On Windows use ; instead of : in the classpath. It also imports straight into Eclipse as an existing project (.project and .classpath are included).

Code

Model-view-controller:

Package What's in it
controller GlorpMain (entry point), GlorpController (input, game flow, menu actions), SerializeGame (save/load)
model Maze (a singleton grid of Rooms), Room, Door and DoorFactory, Riddle and RiddleFactory, Player, items and fixtures, Direction
view GlorpGUI (window and menus), the map, room, riddle and item panels, one input view per riddle type, Music and SoundEffect
sql One small class per riddle database, reading rows through the SQLite JDBC driver

Tech

Java, Swing, javax.sound.sampled for music and effects, SQLite through sqlite-jdbc 3.34.0 (the jar is in the repo), Java object serialization for saves, Eclipse.

About

Team project

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages