Code Monkey home page Code Monkey logo

angry-birds-python's Introduction

Angry Birds in Python

Youtube Video

Alt text

Requirements

pip install -r requirements.txt

To play

  1. Clone the project.
  2. Open the src folder.
  3. python main.py

Zero Gravity

Alt text

  • To activate the "zero gravity mode" press key s.
  • To back to normal mode press key n.

Activate & Deactivate the wall

Alt text

  • To activate or deactivate the wall press key w.

Join the project

The project is Open Source. Feel free to contribute. Please help me to keep this project updated! Thanks you very much :)

angry-birds-python's People

Contributors

estevaofon avatar liu-vv avatar robmcmullen avatar viblo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angry-birds-python's Issues

Updates based on latest Pymunk

With some help from a friend named Carson, I got this working using the latest pymunk 5.1.0 package from 'viblo.' Some function calls in main.py needed updating.

  1. had to convert music to .ogg file
    song1 = "resources/sounds/angry-birds.ogg"
  2. function call to post_solve_bird_wood needs 3rd argument
    def post_solve_bird_wood(arbiter, space, data):
    and similarly for
    def post_solve_pig_wood(arbiter, space, data):
    also note that the order of the input arguments changed between pymunk 4.0.0 and 5.1.0.
  3. to implement the collision handler, I was able to make it work with a separate line of code to add the 'post_solve' func.
birdPig = space.add_collision_handler(0, 1) #, post_solve=post_solve_bird_pig)
birdPig.post_solve = post_solve_bird_pig
  1. To avoid killing the kernel in Spyder everytime I exited a game, I added the following lines to the bottom.
pygame.display.quit()
pygame.mixer.music.stop()
#os._exit(0)

If you let me know how to upload the main.py, I can share my latest version.

Yours,

Raj

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.