Coder Social home page Coder Social logo

huttnerd / dronehunter Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 141 KB

A Pygame Zero action shooter game. Fun to play and to learn about programming in Python / Pygame Zero.

License: MIT License

Python 100.00%
pygame-zero pygame-zero-game pygame-zero-games

dronehunter's Introduction

Drone Hunter

A fun game written in Pygame Zero. Ducks roam the skies enjoying the freedom of flight, unaware of the deadly threat nearby: ill-piloted drones. Your mission is to protect the lives of the ducks by shooting down the drones before they hit the ducks. But beware! Your laser blasts can also hit the ducks, so aim carefully.

Project Goals

  • First of all, to create my very first video game that is fun to play,
  • that looks graphically nice,
  • that uses code that can be easily understood and extended,
  • and that illustrates useful programming techniques.

A screenshot of the game

Game Features

  • Colourful 8-bit style graphics
  • Sprite animation
  • A score counter on screen
  • Indication of remaining duck lives on screen
  • Your score and the highest score are shown when the game is over
  • High Score storage in a file
  • Built-in Timer to limit playtime

Dependencies

  • Python 3
  • pgzero

Running from console:

  • Install Dependencies: pip install pgzero
  • The actual game is in the folder dronehunter inside this repository
  • Put the folder dronehunter somewhere on your computer and go to it
  • Play the game: python dronehunter.py

INSTRUCTIONS

Controls

  • Press Enter to start game.
  • Move left and right using Left and Right arrow keys.
  • Push an arrow key repeatedly to increase your speed.
  • Space Bar to fire laser.

Gameplay

  • Ducks fly across the screen. If they hit a drone a duck life is lost. You start with 6 duck lives.
  • You have a laser with which you can shoot down the drones.
  • If you hit a duck with your laser blast that costs a duck life.
  • When you have no duck lives left, the game ends.
  • To prevent you from playing too long the game includes a timer that ends the game after 5 minutes (300 sec).

Scoring

For shooting a drone 30 points are awarded when there are 3 ducks on screen, 20 with 2 ducks on screen and 10 with only one duck on screen.

Suggested Tweaks

As you have full access to the source code many options are available to tweak the gameplay as you prefer. You could:

  • Change the number of ducks, drones or duck lives,
  • Change the speed and directions of drones, ducks and laser blasts to make the game easier or harder,
  • Change the scoring system,
  • Replace the sprites with your own sprites,
  • Change the maximum playtime.

Suggested Enhancements

  • A Level Structure
  • Powerups
  • More animations
  • A game pause button
  • Add Sounds & Music

dronehunter's People

Contributors

huttnerd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.