The game is a 2D platformer developed in Java, utilising a physics engine to stimulate the game world. It presents a dynamic and engaging experience, mixing typical platforming elements with a focus on creativity.
The main idea of the game is that the player should navigate through various levels, each presenting unique environments with its own challenges, by using portals that are found on the pre-defined locations.
The environments consists of entities such as
- various types of enemies that could be static/dynamic
- collectibles to be picked up by the player
- interactive and non-interactive blocks
Your objective is to collect as many coins as possible by playing this character , using the following controls in game. The character is equipped with a name, health and stamina, and it can be recharged throughout the game.
In order to make the game more modern and visually pleasing, I have decided to implement a system (i.e., with SpriteLoader and AnimationHandler) which applies appropriate animations to the bodies defined in the physics library using spritesheets.
Animation Examples:
- Idle character
- Moving character (including walk and run)
- Jump (and double jump)
- Spinning coin
- Portal enchantment
The game's controls are hard-coded, however you can use ESC
button to pause the game and access some of the available options.
The enemies inserted onto each level are the biggest threat to the player since their main objective is to prevent the player from progressing onto further levels by dealing damage.
As the enemy is destroyed, a coin is spawned and it can be collected by the player to increase game score.
- Collectibles are placed at pre-defined coordatinates - randomising this process can be a future objective.
- Collectibles have a chance to spawn when an enemy is destroyed. The choice of item is random, but the chance of an item spawning is the same for all collectibles.
Image | Name | Description |
---|---|---|
![]() |
COIN | Increases score by 5 points. |
![]() |
MELON | Regenerates 15 health points. |
Image | Type | Name | Description |
---|---|---|---|
![]() ![]() ![]() |
NON-INTERACTIVE / STATIC |
TILE | Static tile that is part of the terrain and its design. |
![]() |
INTERACTIVE | PLATFORM | A moving platform that transports the player by jumping onto it. It can be moving in the horizontal or vertical direction. |
![]() |
INTERACTIVE | PORTAL | Portal that takes the player onto the next level unless an enemy is still alive on the current level. |
![]() |
INTERACTIVE | CHEST | A chest holds a random collectible. The collectible can be discovered by hitting the chest 3 times. |
![]() |
INTERACTIVE | TRAMPOLINE | Allows the player to bounce e.g., onto a higher platform. The higher the person falls, the higher the bounce rate. |
In order to save the current state of the game, the player must use the S
control/keybind to overwrite the CityPlatformer/saves.txt
file.
This data can be later loaded in the game using either the main menu button or the L
control. This will appropriately read the file using streams and load the data into the respective world.
As soon as the player finishes the last level, the game will look into the CityPlatformer/scores.txt
file to find the appropriate position for the final score and name of the player.
This data can be later accessed using the high score screen within the game.
- Use MySQL to store scores and saves (partially done)
All code is written by me, unless it has been referenced.
Additionally, the project includes a physics engine library city.cs.engine
that was provided by CUoL (unknown license).
The font used in this project is PressStart2P, which was designed by CodeMan38. It is publicly available at Google Fonts, licensed under the SIL Open Font License.
The art in this game came from Pixel Adventure 1 and Pixel Adventure 2, created by Pixel Frog and released under a Creative Commons Zero (CC0) license.
Some of the graphics were slightly modified by me using the GIMP software, which is approved by the license even for commercial purposes.
The music track and sound effects were gathered from Nosoapradio and FreeSound sites, licensed under the Creative Commons License.
ยฉ 2024 H. Stoklosa - [email protected]