News:

Building a 3D Ray Tracer  By stevmjon

Main Menu

Challenge #19 - Shoot The Alien (Mini Game)

Started by kevin, October 24, 2009, 10:40:28 PM

Previous topic - Next topic

kevin





Challenge #19 - Shoot The Alien (Mini Game)


    In this challenge were going to tackle building a simplified space invader styled game. Except our version will only feature 4 characters. Those being, the user controlled players ship, a single player bullet, the attacking Alien and it's bullet.

    The game is to be set out as per the original space invaders,  so the player will move Left/Right manually and be located on or near the  the bottom of the screen. 

     When the player shoots, the bullet will travel from where ever the player is currently located straight up until it either leaves the top of the screen or collides with the Alien.   The player can not shoot again until the bullet finished (left the screen or hit something).     If the players bullet hits the Alien, then both the bullet and Alien will be destroyed    So a kill shot only requires a single hit. 

     The Alien is to be located some place to the top of the screen.  The alien is to be computer controlled, so you'll  need to write code to control it's flight path.    The alien should move in a bouncing (left/right) fashion,  so it'll start out moving  either the left or right hand side of the screen.   From there it'll move across the until it reaches the edge,   move down a bit, then change directions...  So if started on the left side of the screen,  it'd move right to until reaching the right edge of the screen,  stop,  move down a bit ,  then it'll starting moving left.   Upon reaching the left edge, it'll stop, move down and repeat the entire process.  So the Alien will progressively get close to the player.     

     The Alien can choose to fire at any time during it's flight.  When it fires, it can not fire again until it's bullet has either hit the player, or left the bottom of the screen.   The Alien bullet should be launched from the aliens current position, then travel down the display until is leave the bottom of the display or hits the player.   

     If the Alien bullet collides with the player,  then  both the Alien bullet and Player are dead.   

     If the player dies, the game is over.   

      Knowledge Requirements In this challenge

         * Understanding of Variables & Arrays
         * Understand of basic graphics commands
         * User input
         * Movement / Animation
          & Collision

      The objective of this and programming challenge is not about creating a pretty result,  it's about the journey.  Here, we're not trying to remake the original  Space Invader game, but a greatly simplified version to help us understand how we program game mechanics.   As such,  don't concern yourself with visuals, if you don't have any graphics, then use circles to represent the Alien and Player  and lines for bullets.  Making it work is much more important than what it looks like.     Once you've got a basic version running,  then sure go nuts and add all the polish you want (pretty graphics / sounds/ better ai etc etc).     Have fun !


Reference Materials

     None.


Submission

* Submissions can be written in any version of PlayBasic

* Submission can only be accepted in Source Code form only.

* Authors can use external Media (images/music) provided you created the media/and or have permission to distribute the includes media or the Media is in the public domain.

* Zip up your Submissions and please try to keep it smaller than 500K !

* Authors automatically give consent for their submission(s) to distributed and used for promotional purposes via UnderwareDesign.com, PlayBasic code tank.

* Authors can submit as many times as they like.

* To make a submission, zip up your projects source code + media and either post it in this thread, or create your own thread in either the Source Codes or Show Case forums and post a link bellow.



Dead Line

     Anytime before the next ice age



Prizes

     * The best submissions will be periodically highlighted through the PlayBasic IDE news service/News Letters or on Twitter




kevin