Giter Club home page Giter Club logo

catch-the-monster-pyglet's Introduction

Setup

First, you'll need to install the pyglet library so that python3 can use it.

In a shell, please run the following command. It does not matter what directory you are in.

pip3 install pyglet

pip3 is a program that comes with python3 and it can download and install free python libraries from the Internet.

On your computer, the program might be called pip instead of pip3. If pip3 install pyglet gives you an error, try pip install pyglet.

The game

To run the game, use the following command:

python3 app.py

Explore

  • Move the score text so it's not in the way ;)
  • Change how fast our player can move
  • Reduce the chance the monster will change direction to 20%
  • Replace the monster's image with the goblin.png
  • Play a different sound when you catch a monster

Improve

Small

  • When the hero catches a monster, increase the score by 10
  • When the score reaches 100, call the game_over() function
    • When the game is over, display a "You won" message and play the "win" sound effect
  • Change the score label either using a different font or by using HTML: https://pyglet.readthedocs.io/en/latest/modules/text/index.html
  • Download some (free!) graphics from kenney.nl and replace the hero and monster. (Cats, maybe??)

Medium

  • add a goblin to the game

    • use the goblin.png image in the resources folder
    • The goblin should try to catch the hero
      • If the goblin touches the hero, it takes one life
      • If the hero loses 3 lives, the game is over
        • Stop playing the music and play the 'lose' sound
    • Add a "lives" text display next to the score.
  • Add a magical item at random to the screen:

    • Each magical item enhances our hero's abilities (or bestows new ones)
    • The 'bullet' increases the hero's speed temporarily
    • The 'flame' allows the hero to shoot goblins (thus taking them off screen)

Large

  • As the player's score increases, add more goblins

  • Add an 'stone' the screen for saving the state of the game, including the score, number of lives, magical abilities, and position of each character on the screen.

    • It should only appear temporarily.
    • If the player loses all their lives, ask if they want to load their saved game.
      • Optionally, delete the saved game info so the player can only use a saved game once.

catch-the-monster-pyglet's People

Contributors

radishmouse avatar

Watchers

James Cloos 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.