Skip to content

samarthamahesh/Jetpack-Joyride

Repository files navigation

Jetpack Joyride Terminal Game

Contents

Introduction

Jetpack Joyride Terminal Game is a basic terminal version of the game Jetpack Joyride. This game is tested only on Linux based OSs.

Din is a mandalorian living in the post-empire era. He is one of the last remaining members of his clan in the galaxy and is currently on a mission for the Guild. He needs to rescue The Child, who strikingly resembles Master Yoda, a legendary Jedi grandmaster. But there are lots of enemies and obstacles in his way, trying to prevent Din from saving Baby Yoda. Din is wearing classic mandalorian armour and has a jetpack as well as a blaster with unlimited bullets. You’ve got to help him fight his way through and rescue Baby Yoda.

How to run the program

  • pip3 install -r requirements.txt
  • python3 run.py

Controls

Key Action
d Move right
a Move left
w Activate jetpack and move up
s Move down (if Dragon is activated)
b Shoot bullets
q Quit game
<spacebar> Activate shield (if available)

Directory Structure

.
├── ascii
│   ├── background
│   │   ├── clouds.txt
│   │   ├── mountain.txt
│   │   └── tree.txt
│   ├── characters
│   │   ├── boss_enemy
│   │   │   ├── boss_enemy1.txt
│   │   │   └── boss_enemy2.txt
│   │   ├── dragon.txt
│   │   ├── mandalorian.txt
│   │   └── slave_enemy.txt
│   ├── extras
│   │   ├── congrats.txt
│   │   ├── game_over.txt
│   │   └── time_up.txt
│   └── ostacles
│       ├── fire_beam
│       │   ├── fire_beam-1.txt
│       │   ├── fire_beam-2.txt
│       │   ├── fire_beam-3.txt
│       │   └── fire_beam-4.txt
│       └── magnet.txt
├── background.py
├── base.py
├── board.py
├── characters.py
├── coin.py
├── firing.py
├── functions.py
├── getch.py
├── obstacles.py
├── person.py
├── powerup.py
├── run.py
├── topbar.py
├── README.md
└── requirements.txt

OOPS Concepts

  • Inheritance

    • The characters (Mandalorian, Slave Enemy, Boss Enemy) are inherited from main class Person
    • The obstacles (Fire Beam, Magnet) are inherited from main class Obstacle
    • Bullets, Ice Balls are inherited from main class Firing
  • Polymorphism

    • The method reappear of class Boss_Enemy is overrided
    • Many other functions are overrided
  • Abstraction

    • Background class abstracts the background of the screen which has clouds, trees and mountains
    • Board class abstracts the board on which all other objects are placed
    • Person class abstracts characters of the game
    • Coin class abstracts the coins which are placed on board
    • Firing class abstracts the bullets and ice balls shooted by Mandalorian and Boss Enemy respectively
    • Obstacle class abstracts the obstacles (Fire Beam and Magnet)
    • Topbar class abstracts the topbar which shows score, lives, time remaining etc,.
  • Encapsulation

    • Background class
    • Board class
    • Person class
    • Coin class
    • Firing class
    • Obstacle class
    • Topbar class

Gameplay

Movement

  • Press a to move left

  • Press d to move right

  • Press w to activate jetpack and move up

  • Press s to move down when Dragon is activated

  • Press b to fire bullets

  • Press spacebar to activate shield (if available)

  • When w key is released, gravitation acts on Mandalorian, but not on Dragon

Background and Scenery

  • Background class is made to abstract the background with clouds, mountains, and trees
  • Mandalorian can't go out of frame or above sky or below ground
  • Background moves at constant rate. If Speed booster is taken, it moves at faster rate
  • Lots of coins are suspended in air. Collecting them will increase your score

Enemies

  • Slave enemies come randomly who move only on ground. One life will be lost if your Mandalorian comes in contact with Slave Enemies. You can kill Slave Enemies by either shooting bullets at them or jumping on them.
  • Boss Enemy comes at last. He will throw ice balls at you. He adjusts his position along y-direction according your movement. One life will lost if your Mandalorian comes in contact with ice ball thrown by Boss Enemy. You can decrease the lives of Boss Enemy by shooting bullets at him.

Obstacles

  • Fire Beams appear randomly on screen at different heights. One life will be lost if your Mandalorian comes in contact with Fire Beam. You can destroy the Fire Beam by shooting three bullets at them
  • Magnet appear randomly on top of the screen. You'll be attracted in both direction to Magnet if you come in the range of Magnet. You can destroy Magnet by shooting three bullets at it

Score

  • You get Five(5) points for collecting Coins
  • You get Fifty(50) points for killing Slave Enemy
  • You get Hundred(100) points for shooting Boss Enemy
  • You get Five Hundred(500) points for killing Boss Enemy

Lives and Time

  • Lives of Mandalorian is limited
  • Time is also limited. You need to complete the game by killing the Boss Enemy before the time exhausts.

PowerUps

  • Speed Boost appears on screen randomly at different heights. Collecting them will increase the game speed
  • Shield gets activated after 60 seconds from start of game or after deactivating it. Collecting it will protect you from Slave Enemies, Fire Beams, Boss Enemy and his Ice balls

Dragon

  • Dragon gets activated when you collect dragon powerup
  • It lasts as long as you don't collide with enemy or obstacles

Libraries

  • Colorama library is used to add colors to objects of the game

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages