ICT221 Java Game Project: Implementing a 2D Puzzle Game with GUI

Verified

Added on  2023/03/30

|5
|801
|468
Project
AI Summary
This Java project outlines the development of a two-dimensional, single-user puzzle game using JavaFX within the IntelliJ IDE environment. The game challenges the player to navigate from a starting point to an end point, avoiding obstacles along the way, with increasing levels of difficulty. A path locator feature assists new players in identifying safe routes. The project includes a UML diagram and GUI sketches, reflecting the development process and challenges encountered, such as implementing the multi-level functionality using a slider to control obstacle density. The use of CSS in JavaFX enabled clear differentiation between empty cells and those containing obstacles. The project acknowledges time constraints and suggests future enhancements, such as automated level switching, to enhance the player experience. Desklib provides access to this and other solved assignments.
tabler-icon-diamond-filled.svg

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
GAME PROGRAMMING IN JAVA
Student Name
College
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Introduction
This is a two-dimensional, single user game puzzle that has been developed. The javafx, an
extension of an object-oriented java programming language has been used for the development of
this game. A popular Java IDE, IntelliJ IDE was used as the development environment for this
game. It is required of the player that he moves from the starting point, moving along empty cells
as a means of avoiding obstacles on the way to the finishing point (Anon, n.d.).
A win can only be achieved if the player can switch from the starting point all the way through
the available empty points and completely avoid collision with any of the obstacles to the end
point of the game. It is up to the player to figure out the shortest and safest route possible to be
followed to get to the end point of a puzzle with absolutely no probability bumping into an
obstacle. The game offers a variety of levels to the player. Upon completion of a level, a user can
advance to another level that offers more complexity compared to the previous one(Anon, n.d.).
The game becomes harder and tougher each and every time a player shifts a level up. The player
is able to play and shift levels until he reaches the very last level. The player wins the puzzle
wholly if he/she is able to beat the very last level.
Just like any other game, a player is provided with both a point to start the game and end the
game. These two points provide a clear description of at what exact point a player is to begin
playing and where to stop. The player begins the game at the topmost right corner and reaches the
end of the game at bottom corner at right hand side. The number of obstacles in a puzzle can be
altered by the user to create ease or difficulty in getting a solution to a puzzle. Simply put, the
user is in control of how easy it is to win or how complex and interesting the game is to be(Anon,
n.d.).
Newbies are advantaged has an additional functionality(path locater) has been included to help
trace a path to the end. Path locater is an important function in the game that aids newbies in
checking and identifying possible routes that will ease the process of accessing the
endpoint(Anon, n.d.). The functionality is toggled using the Path locater button. An additional
guide on how to go about playing the game and individual cell axis and diagonals and identifying
cells with obstacles is provided with the guide button.
Document Page
UML Diagram
GUI Sketches
Document Page
Reflection
During development, my main focus was to develop a game that corresponds to the UML
diagram as sketched in the previous page. the development was not easy given that it had to
include all the mentioned functionality and follow the latter sketch provided in the page above.
Despite the difficulties encountered I was bale to include all functionalities and achieve the set
target and requirements as they were crucial for the general operation of the game.
One of the most important function was the multilevel option that allows users to switch between
levels. I managed to implement this functionality using a simple option where the player controls
the level of a game by reducing or increasing the obstacles present in the cells of the game. An
increase in the number of obstacles means a harder or higher level. I easily added this option to
the game using a simple slide bar that was made it easy for the user to switch levels too.
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
It was also crucial to give a visual aid to the user as a way of differentiating empty cells and those
with obstacles. This was important as the user should be able to identify an obstacle avoid it and
use the empty cells to move in order to win. The CSS option in JavaFX proved to be quite useful
as I was able to user a pair of different colors to differentiate the two cells.
Time was a major constraint that was limited during development. Therefore, if given the go
ahead to advance further with the development I’d create an advanced and excellent way of
automatically switching levels. The more automated and efficient the game is the more
interesting it becomes and thus a happy player.
References
Anon, (n.d.). Fundamental 2D Game Programming with Java 1st Edition. [online] Available at:
https://www.amazon.com/Fundamental-2D-Game-Programming-Java/dp/1305076532 [Accessed
2019].
Anon, (n.d.). Java Tutorial: Learn Java Basics For Free | Codecademy. [online] Available at:
https://www.codecademy.com/learn/learn-java/ [Accessed 2019].
Anon, (n.d.). Learn Java (Introduction and Tutorials to Java Programming). [online] Available
at: https://www.programiz.com/java-programming [Accessed 2019].
Anon, (n.d.). The 6 Best Programming Languages for Game Design. [online] Available at:
https://www.gamedesigning.org/career/programming-languages/ [Accessed 2019].
chevron_up_icon
1 out of 5
circle_padding
hide_on_mobile
zoom_out_icon
logo.png

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]