GithubHelp home page GithubHelp logo

py-bomberman-two's Introduction

Bomberman pygame application day 2

You already have a player that can move and plant a bomb. Now you have to implement such features:

  1. Bomb should explode in a few seconds after the planting. Remove the bomb after an explosion by method kill().
  2. During the explosion bomb generate fire in four directions: left, right, up, down. Fire is usual Sprite with the same size as the bomb. Fire cannot spread over the wall. In this task, bombs are planted at the center of the line. You can calculate coordinates of the center of a next fire and check if it collides the wall, if it does - the fire stops spreading, if it doesn't fire continues to spread. To check if sprite collides point use sprite.rect.collidepoint((x, y)). Fire exists for a small amount of time.
  3. Create enemies. Enemies should be generated out of bounds within one second. Add an event for this. Enemies should chase the player. The enemy should not walk over the walls or bombs. Events
  4. If the player or any enemy touches the fire - he dies immediately.
  5. Initially player should have 100 health points. If any enemy touches the player - it dies and the player's health is reduced by 10.
  6. Store the score. If the enemy dies, the score is incremented by 10 by default.
  7. If the player's health is less than or equal to zero - the player dies. If the player dies, the game is over.
  8. Add different project properties constants to the config.py, such as: FRAMES_PER_SECOND, DEFAULT_PLAYER_HP, DEFAULT_PLAYER_SPEED, BOMB_TIMER, EXPLOSION_RANGE, BACKGROUND_COLOR, DEFAULT_EVENT_TIMEOUT etc.
  9. Add an interface to the application that shows the current score, player's health, and speed. Score

Example:

Example

py-bomberman-two's People

Contributors

masterpieceelbow avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.