Dalek’s Game is a Java project for Object-Oriented Technologies classes

Overview

Dalek’s Game

Table of Contents

Description

Dalek’s Game is a Java project for Object-Oriented Technologies classes. The goal of the game is to survive and eliminate Daleks (who are the enemies) from the board. Each time the main character (Doctor) moves, every Dalek follows him. When a Dalek bumps into another Dalek or junk, it becomes junk. When there is no Dalek left on the map, Doctor wins.

game

Technologies

  • Java 17
  • RXJava
  • JavaFX
  • Spring
  • SQLite
  • JUnit

Implemented design patterns

  • Visitor
  • Command

Technologies and design patterns usage examples

BehaviorSubject (RXJava)

In our project we use BehaviorSubjects to automate some of the game processes.

In Engine class subscribe to the method onTeleportDeath.

this.subjectService.getDeadTeleportSubject().subscribe(this::onTeleportDeath);

Every time power-up is picked up, we call our Subject’s onNext and onTeleportDeath method is automatically called.

@Override
public void onPowerUpPickUp(){
   deadTeleportSubject.onNext(this);
}
private void onTeleportDeath(Teleport teleport){
   onPowerUpDeath(teleport);
   this.board.getDoctor().addTeleport(teleport);
}

Visitor

Visitor pattern is used to solve entities collision problem.

visitor

Command

PowerUp interface and PowerUpHistory implements Command pattern, which allows us to track the history of used power-ups.

command

IoC (Spring)

@Autowired
public GameInitializer(AppController appController,
                      Engine engine,
                      DoctorMoveController doctorMoveController) {
   this.appController = appController;
   this.engine = engine;
   this.doctorMoveController = doctorMoveController;
}

How to run

Clone the repository from github.

$ git clone https://github.com/ajablonsk1/daleks-game.git

Open project with IDE and run GameApplication class.

How to play

Game mode

At the beginning of the game you can choose game mode:

  • Quick game
  • Campaign

Doctor movement

Doctor can move in every direction by one step. You can control him by yourself using keyboards controls:

  • Basic move directions (W,A,S,D)
  • Diagonal movement (Q,E,Z,C) Alternatively Numpad can be used for player control.

Power-ups

When you collect a power-up, you can use it any time, by clicking:

  • T - to use Teleport
  • R - to use Time Reverse
You might also like...

Golden Axe (1989) game implemented in java using only standard libraries (Java 2D, Swing, AWT & Java Sound API)

Golden Axe (1989) game implemented in java using only standard libraries (Java 2D, Swing, AWT & Java Sound API)

Golden Axe (1989) game implemented in java using only standard libraries (Java 2D, Swing, AWT & Java Sound API), so no external libraries required. Video: https://youtu.be/uevIVLNhQqs

Jul 21, 2022

It is a simple java terminal game. I built it in order to practice my code skills that I obtained while I was learning Java.

Java-terminal-game It is a simple java terminal game. I built it in order to practice my code skills that I obtained while I was learning Java. The ga

Jan 20, 2022

A Java Game Engine created in Java with LWJGL!

💬 Suffler Engine Suffler Game Engine is an engine created in java using OpenGL to Graphics. Currently being developed at Eclipse, and Visual Studio C

Jul 23, 2022

Desktop/Android/HTML5/iOS Java game development framework

Desktop/Android/HTML5/iOS Java game development framework

Cross-platform Game Development Framework libGDX is a cross-platform Java game development framework based on OpenGL (ES) that works on Windows, Linux

Jan 1, 2023

A complete 3D game development suite written purely in Java.

A complete 3D game development suite written purely in Java.

jMonkeyEngine jMonkeyEngine is a 3-D game engine for adventurous Java developers. It’s open-source, cross-platform, and cutting-edge. 3.2.4 is the lat

Dec 31, 2022

Java / JavaFX / Kotlin Game Library (Engine)

Java / JavaFX / Kotlin Game Library (Engine)

About JavaFX Game Development Framework Why FXGL? No installation or setup required "Out of the box": Java 8-15, Win/Mac/Linux/Android 8+/iOS 11.0+/We

Jan 2, 2023

Jetserver is a high speed nio socket based multiplayer java game server written using Netty and Mike Rettig's Jetlang.It is specifically tuned for network based multiplayer games and supports TCP and UDP network protocols.

Note New version of Jetserver is called Nadron and is in a new netty 4 branch of this same repo. JetServer is a java nio based server specifically des

Dec 14, 2022

[LEGACY] LWJGL 2.X - The Lightweight Java Game Library.

[LEGACY] LWJGL - Lightweight Java Game Library WARNING This is the repository of the original LWJGL, which is no longer actively maintained. Unless yo

Dec 26, 2022

A Java game development framework that deploys to JVM, HTML5, Android and iOS.

PlayN PlayN is a cross-platform Java game development library written in Java that targets HTML5 browsers (via GWT), desktop JVMs, Android and iOS dev

Dec 9, 2022
Owner
Adrian Jabłoński
Adrian Jabłoński
Snake-Game - A simple snake game written in java.

What's this? A simple snake game written in java. How to play Download the latest release. Ensure that a compatible java runtime is installed (optimal

Patrick260 4 Oct 31, 2022
Othello PvP (2-Player) Game Application created in Java using Swing and AWT, for playing the Othello game

Othello PvP (2-Player) Game Application created in Java using Swing and AWT, for playing the Othello game, a simple game that played on an 8 by 8 checkered board with 64 double-sided black and white discs. The game is easy to learn, but it takes time to master and develop winning strategies.

Soumyadeep Pal 1 Feb 28, 2022
Quick and dirty framework for on-the-fly patching of classes via the java attach api and transformers.

Nuclear Quick and easy framework for on the fly patching of running java applications. Inspiration from an idea of an injectable minecraft cheat. What

0x150 8 Dec 28, 2021
My Game Engine tested via my Cubecraft Game

My Game Engine tested via my Cubecraft Game Install: mvn -P {your OS name} clean install mvn -P mac clean install mvn -P linux clean install mvn -P wi

null 30 Oct 3, 2022
The game is a 2D side scrolling system, where a player moves left, right, vertically or diagonally to traverse the game.

The game is a 2D side scrolling system, where a player moves left, right, vertically or diagonally to traverse the game.

Ravi Mandal 7 Sep 11, 2022
A simple puzzle game made with Unity to practice the game engine

A simple puzzle game made with Unity to practice the game engine.

Eyüb Salih Özdemir 1 Mar 30, 2022
A basic representation of the 0-player game, "Game-of-Life", a simple example of basic cellular automata

Game-Of-Life-Basic A basic representation of the 0-player game, "Game-of-Life", a simple example of basic cellular automata. A cellular automaton is a

Nikhil Narayanan 5 Oct 27, 2022
A data dumper and typing generator for the KubeJS functions, constants and classes.

ProbeJS A data dumper and typing generator for the KubeJS functions, constants and classes. Great thanks to @DAmNRelentless, @LatvianModder and @yeste

Li Junyu 13 May 25, 2022
An arcade game project which made using java and swing for graphics

Arcade_Game_Development This is an arcade game project which made using java and swing for graphics. Meteor Dodge Here you have to dodge the meteor an

Md. Shakib Shahariar Junayed 1 May 25, 2022
The Ludii general game system, developed as part of the ERC-funded Digital Ludeme Project.

The Ludii General Game System Ludii is a general game system being developed as part of the ERC-funded Digital Ludeme Project (DLP). This repository h

Digital Ludeme Project 49 Dec 25, 2022