Wednesday, July 20, 2016

Pop the Balloon - ALICE program

Game: Pop the Balloon

This exercise builds on Project 5 from Chapter 6, the Random Sphere Catch Game. If you have already created the world for that project, you can add five additional spheres and then write the code for this exercise. If you did not previously create the world for the Random Sphere Catch Game, begin this exercise by first creating the game from Project 5 in Chapter 6. The moveAroundRandomly, disappear, and startGame methods should work as described in that project. In this new version of the game, you will use a list to make the code less complex and easier to understand. First, create a world-level list named spheres and add each of the 10 sphere objects to the list. Modify the startGame method to use a For all together to move around randomly all of the spheres in the list. When the mouse is clicked on anything call the disappear method. Modify the disappear method to use a For all in order to check if the item that was clicked was a sphere. If so, make it disappear. You may drop the smoke animation for this exercise, if you wish.

Chapter-9 Learning to program with alice

Solution:
In this game, the balloon pops when user clicks on it and this version of the game includes the smoke animation as well.
Below is the video for this Alice program, created using Alice 2.3



Contact me for the comprehensive step-by-step guide on how to create this game in ALICE as well as the final source code.


2 comments:

  1. Hi can you send me this code? kashmeire74@yahoo.com

    ReplyDelete
    Replies
    1. Hello,
      Surely, I can help. I am an online tutor. I will contact you via email.

      Delete