Simple 2D platformer about escaping different level tunnels and dragon enemy
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.
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 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)
Java Core (latest version) + Derby SQL + Swing UI