This is a 2D game inspired by the classic Donkey Kong, developed in Java. The project was originally created as part of the Object-Oriented Programming (POO) course. Currently, I am working on improving and expanding the project to enhance its features and gameplay.
The game follows the original mechanics where the main character (Manel) must climb platforms to rescue the princess while avoiding obstacles like traps, enemies and bananas thrown by Donkey Kong.
Note: The initial structure of the game was provided by my professors as part of the course. They set up a basic package structure with the following components:
- objects – A package with manel, floor and a wall.
- pt.iscte.poo.game – The basic game logic framework.
- pt.iscte.poo.gui – The starting point for the graphical user interface (GUI).
- pt.iscte.poo.observer – A package classes for implementing the observer pattern.
- pt.iscte.poo.utils – Some utility classes with initial code that supported future game functionality.
These files enabled the initialization of the game but did not contain any gameplay or interactive content. I then expanded on this initial setup by modifying some of the game initialization logic, implementing the core gameplay mechanics, adding levels, and creating a scoreboard to meet the project requirements, along with some extra features, such as animations and other components, to make the game more enjoyable.
Although efficiency was not a priority at the outset due to the project's smaller scale and the primary focus on its object-oriented programming (OOP) aspects, I now plan to shift my attention toward optimizing the game, enhancing its performance, and improving its overall quality.
Here are the commands you can use during gameplay:
- Arrow Keys: Move your character (Manel) left, right, up, and down.
- B: Drop a bomb at the current position
- 2D game with simple graphics.
- Main character (Manel) can move left, right, up, and down, and can temporarily become immune to gravity while moving fast between platforms.
- Avoid enemies, traps and obstacles thrown by Donkey Kong.
- Multiple levels with increasing difficulty.
- Scoring system based on time.
- Java (for game logic and graphical interface interaction).
- Java Swing (for graphical interface and window handling).
-
Clone the repository:
git clone https://github.com/MD2SA/DonkeyKong.git
-
Run the Game
-
Option 1: Using an IDE (e.g., Eclipse)
- If you're using an IDE like Eclipse, simply open the project and run the
Mainclass directly.
- If you're using an IDE like Eclipse, simply open the project and run the
-
Option 2: Using Command Line (Manual Compilation)
-
If you prefer running the game via the command line or have made changes to the code, you can compile and run it manually. To make this process easier for Windows users, a script
run.ps1has been created..\run.ps1
-
Note: You can load custom rooms by providing the path to your rooms folder as an argument when running the game.
- Improve game interaction logic
- All interactions are guaranteed to complete in O(n) time or better.
- Reduce duplicate memory
- Remove main List and leave only HashMap
- Fix found bugs in game mechanics
- Bomb not exploding alone
- Stacking bombs in the same place
- Trap with weird activation
- Refactor gravity logic for more realistic behavior ( do not allow to move while falling )
- Implement pathfinding system for entities to find Manel
- Consider enemies not attacking each other nor trigger traps
- Add new levels or maps
- Introduce new characters or enemies
- Implement power-ups or collectibles
- Improve scoring system
- Show the leaderboard in a specific room
- Add points to each run and kill (maybe)
- Implement new alternative movement controls in addition to the arrow keys, such as WASD for gamers and HJKL for Vim users.
- New movement
- Jump
- Sprint
- Include animations for entities' actions
- Write unit tests for core game logic
- Test edge cases for player interactions
- Improve visual feedback for player actions (e.g., sound effects, visual cues)
- Make the game window resizable
- Ensure the game scales correctly when resized
- Create better UI for entire window
- Add a pause menu with options (e.g., restart, exit)
- Create inventory and health tab
- Write a
README.mdwith:- Project description
- Instructions to set up and run the game
- Controls and gameplay guide
- Add in-code comments for key functions and modules
- Create a flowchart for game mechanics and interactions
- Update UML
- Optimize game performance
- Refactor code for better readability and modularity
- Add multiplayer support (local or online)
- Implement a level editor for users to create their own maps
- Add achievements or unlockable content

