Case Study

Zelda Like

Development of a 2D game with movement, combat, and boss mechanics.

JavaJavaFX

01 — The Graphic Challenge

This university project (2024) aimed to cross a significant milestone: moving from purely textual console applications to developing a windowed application with dynamic graphical rendering.

The goal was to create a top-down Action-RPG, inspired by the classic “Zelda” games, using the JavaFX library to draw the interface and animate 2D “Sprites”.

[IMAGE_PLACEHOLDER: zelda-game]

Implementing a “Game Loop” (at 60 frames per second) was necessary to handle the smoothness of movements and the animation refresh rate, which is the core of any real-time graphics engine.

02 — Navigation System and the World

Exploration being essential to this type of game, we had to design a Map system composed of “Tiles”.

The main character dynamically responds to keyboard inputs (W,A,S,D keys). The major technical difficulty was implementing collision hitboxes to prevent the player from walking through solid environments.

[IMAGE_PLACEHOLDER: zelda-map]

Map loading handles spatial transitions, calculating the relative position of the player at any moment.

03 — Combat and State Management

The game’s dynamic relies on interaction with hostile entities. We programmed basic AI for targeting and hit detection.

The combat system handles health point calculations and temporary invincibility, culminating in the integration of Bosses possessing their own attack patterns.

[IMAGE_PLACEHOLDER: zelda-combat] [IMAGE_PLACEHOLDER: zelda-boss]

04 — Inventory and Persistence

For the RPG aspect, the player can collect items and possess varied equipment.

The overlay graphic interface (HUD) allows viewing possessed items. The selection mechanic allows equipping different weapons that directly modify combat statistics or attack range.

[IMAGE_PLACEHOLDER: zelda-inventory]

Finally, the game wouldn’t be complete without a save system. The complete state of the game (position, health points, inventory) is serialized to allow reloading a session.