Giter VIP home page Giter VIP logo

greenfoot-avoider-game's Introduction

Avoider Game

A simple avoider game created with Greenfoot IDE. The idea and base code were taken from the book "Creative Greenfoot" by Dr. Michael Haungs. This is a game complete with an introduction screen, game over screen, a score, mouse input, and sound. I've updated the code to the new Greenfoot API (version 3.6.1) and add some functionality. To run the game I recommend to download Greenfoot IDE.

Story

This is a story about good vs evil. However, good looks evil and evil looks good. The sheer evil of the smiley-faced villians is enought to crack the bones of our skull-faced hero so you must avoid their touch at all cost. Other objects will appear on the screen. Avoid them if they look good.

You score more points the longer you survive the cheery horde.

Structure of application

The game was developed in Greenfoot IDE.

Java Classes

Credits

Programming

  • Michael J.Williams, Original ActionScript version
  • Michael Haungs, Original Greenfoot version
  • Jegors Čemisovs, Code update to support new Greenfoot API

Music

Sound effects

  • Michael Haungs

Graphics

  • Default Greenfoot images
  • Michael Haungs

Main Game screen

Screenshot

Game Over screen

Game Over

greenfoot-avoider-game's People

Contributors

rabestro avatar

Watchers

 avatar  avatar  avatar

greenfoot-avoider-game's Issues

Add music for Game-Over screen

Once the game-over screen is displayed, play music. Are you going to make it peppy
music to lift the spirits of your player or sad and morose to really rub it in? Make sure you turn it off before switching to AvoiderWorld .

Making enemies less happy

The enemies in Avoider Game are just too happy. Let’s animate them to get sad and
disappointed, as they realize that our hero is going to avoid them.

Add final score

Display the player’s final score on the game-over screen.

Creating a star field

Our starfield is going to provide various sized stars moving in the background at various
speeds, to produce the effect of moving through space at high speed.

Adding eyes

We are going to give our hero's eyes. Obviously, our hero is very concerned
with nearby enemies and definitely wants to keep an eye on them. Adding animated eyes to an actor is a fantastic way to give that actor personality. Eyes are very expressive and can easily portray excitement, sadness, or fear. Never hesitate to add animated eyes.

Randomize appearing and moving of the enemies

Our enemy’s movements are pretty vanilla. Can you spice it up? Some ideas are to
have the enemy characters have variable speed, drift left or right, or enter from the
top or bottom. What will you come up with?

Hurting the avatar

Our game is a little unforgiving. If you touch an enemy once, you die. Let’s change the
game, so that you take damage for every hit and it takes four hits to kill our hero.

Blinking

The stars already look great and provide a real sense of movement in the game. We are
going to enhance them by making them twinkle like real stars.

Add new enemies after the player reach score above 600

Once the player’s score is above 600, add a new enemy that spawns in addition to the
enemies we have now. The new enemy should visually be very distinct from our
existing enemies. If you are feeling up to it, have the new enemy move differently
from the existing enemies too.

Make the hero blink while it cannot be hit.

When an Avatar object is hit, it is invulnerable to being hit again for a short time.
Unfortunately, we have provided no visual feedback to the player that indicates this is
happening or when it expires. Your assignment is to make the hero blink while it cannot
be hit. Look at the Star class for a hint on how to make an object blink.

Add power-ups

Periodically, spawn a power-up that gives our hero a special ability. For example, the
power-up could make our hero temporarily invincible, allow our hero to kill three
enemies, or shrink the size of the avatar making it easier to avoid enemies.

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.