Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Simple 2d up-down view with several levels and availability for extension java game

Notifications You must be signed in to change notification settings

havenousername/labyrinth-game-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

Labyrinth Game

Setup

Simple 2D platformer about escaping different level tunnels and dragon enemy

Rules for playing

Player starts at the bottom left of the labyrinth. The goal is to find a way to exit which is always on the right top of the maze. For manipulating user use UP, DOWN, LEFT, and RIGHT keys of the keyboard. Currently there are 3 levels. After completing those player wins.

Player can loose if dragon will attack him. Dragon attacks when he is in the neighbourhood fields of player. If player meets dragon in this condition he instantly dies and looses. If all levels are completed player is considered a winner. Either way player will be written into highscores if his last level is closer to the end than last try.

Some Tech details

Enemies

Dragon is moving independently from user using random algorithms. There are two types of dragons differ both in their look and functionality. Dragons can be extended though ActiveEnemyDecorator. Dragons moves are concurrent to the main thread of the game, thus making them active objects (though java Threads).

Levels

Levels are loaded from the database which is connected to the game. Project is using Derby SQL solution. Levels are defined though pattern which is checked though pattern matching Current pattern of the valid game level is "^(?=.*\\.)(?=.*\\#)(?=.*P)(?=.*(E|D))(?=.*\\ )[.#P(E|D) ]{" + patternStr.length() + "}$". Patterns are limited in size though 2000chars. Be aware that in order to run it locally you will need to configure your db derby version yourself!(Future todo)

Technologies

Java Core (latest version) + Derby SQL + Swing UI

About

Simple 2d up-down view with several levels and availability for extension java game

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages