Portal Game is a Java-based 2D platformer game in which players navigate through a world with portals, enemies, and obstacles. The goal is to collect apples, avoid enemies, and navigate through the level using portals.
In Portal Game, players control a character that can move left, right, jump, and use portals to navigate the level. The objective is to collect apples while avoiding enemies and obstacles. Portals allow the player to teleport to different areas of the level. The game ends when the player is defeated by an enemy.
- Java Development Kit (JDK) 8 or later
-
Clone the repository to your local machine:
git clone https://github.com/Bilal-Ahmad102/Portal-game.git
-
Navigate to the cloned repository directory:
cd Portal-game
-
Compile the Java files:
javac Portal.java Board.java
-
Run the game:
java Portal
- Control your character using the arrow keys.
- Avoid enemies and obstacles.
- Jump on the heads of enemies to defeat them.
- Use portals to teleport to different areas of the level.
- Move Left: Press the
Left Arrow
key. - Move Right: Press the
Right Arrow
key. - Jump: Press the
Up Arrow
key or theSpace
bar.
Watch the full gameplay video on YouTube: https://youtu.be/jZCNiVX3_Us
Here are some screenshots of the Portal Game in action:
Character navigating through the level using portals.