Flappy Bird


Help your exotic bird fly through a trecherous jungle and avoid pipe obstacles..
You are getting more practice with arrays and manging multiple sprites - the pipes - as well as "play-balancing" your game. Have fun!

Here is an example of a completed game


Directions
  1. If you are coding outside of WoofJS.com (like in Sublime), insert the Woof_JS source tag into the <head>section of your project page:

    <script src="https://rawgit.com/stevekrouse/WoofJS/master/dist/woof.js"></script>

    Your code now speaks Woof!

  2. Find an appropriate backdrop (jungle, dessert) and add the url to the setBackdropURL call.

  3. Create an image sprite for your bird and start it in the middle of the screen.

  4. Add a forever function to your code. Inside the forever function, have your bird drop down continuously.

  5. Then, if you are pressing a key, have the bird fly up. Play-balance this so the bird looks like its flying.

  6. Add an array called obstacles.

  7. Find transparent images for your top and bottom obstaces -nets, pipes, dragons etc...

  8. Outside the forever loop, add an Every loop that creates a new pair of obstacles every X seconds, and pushes them into the obstacles array. Make the nets come out at different heights by making the y value a random number.

  9. Inside the forever loop, add a forEach loop that cycles through all the obstacles.

    obstacles.forEach ( net => { //move each net to the left //if the net has reached the left side of the screen, delete it })

  10. Declare a text label for the score using a Text sprite.

  11. If the bird passes thru the nets without touching, earn some points.

  12. Check if a net has hit the bird. If so, lose points. Show an "och" sprite or similar. If you have less than 0 points, end the game.

  13. Play a "squak" sound every couple of seconds. Or play a fun Brazilian soundtrack.

  14. Keep working on the project and customizing until you are satisfied.
    Ask your teacher/TA to upload it to your public folder.







(c) 2018 by Code Craft Academy