top of page

Legacy

Game | 2018

Tools
Java, Procreate

Skills
Programming, 2D Art, AI Design and Implementation, Game Design

A Java based top-down shooter with hand-drawn art, unique weapons and intelligent AI that seeks out the player. The game uses keyboard and mouse input to allow the player to move around an environment and shoot pursuing aliens. There are 9 weapons that are randomly dropped on the screen and can be picked up by the player; each weapon acts in a different way to the others. The game keeps track of variables, such as player health and ammo, and this information is communicated through the UI overlay.

 

In this project I taught myself Java, as well as game design and development, to produce a playable game. I learnt how to program a gameplay loop, AI for enemies and user input during gameplay. I also developed a basic understanding of the pipelines used in game development, such as how to create a sprite asset and put it into the game.

2023-01-12 (5).png
2023-01-13 (1).png
rocket.gif
2023-01-12 (9).png

When creating the sprites, I used Procreate to draw each one on a transparent square that was always the same pixel dimensions. This made importing them into the code easier as the program always knew what dimensions to expect. To animate the characters on screen I created multiple sprites in different positions, which the code would switch between as the character moved, to give the impression of them walking.

nodes.png

Artificial Intelligence

The game had enemies that, when in a certain proximity to the player, would follow them. However, whenever the player was not near the enemy then they would stand idle. This made the game feel static, less alive and too easy.

Therefore, whenever the player was not close to an enemy, I programmed them to travel around the house, as if they were looking for the player. To achieve this, I used nodes which the enemies would travel between. I placed the nodes all around the house and outside. Whenever the player was not in their sight, enemies would randomly choose a node to travel to as its final location (called a waypoint) and, using a breadth-first search algorithm, would calculate a route of nodes to travel across to reach that destination.

The diagrams on the right show the floor plan of the house with the nodes placed across it, along with the lines connecting them; the enemies would travel across these lines. The diagram below that is the nodes converted into a graph, so that it could easily be converted into an adjacency matrix in the code.

2023-01-12 (8)_auto_x2.jpg
bottom of page