Showing posts with label functions. Show all posts
Showing posts with label functions. Show all posts

Wednesday, November 7, 2018

Help the Snowman get Home - ALICE Program


 Help the Snowman get Home


Create a game where the goal is to move the snowman through a forest to get him
home to his igloo. The hazard in this game is that if the snowman gets too close to a
tree, he moves back 10 meters. Add the snowman (People), a snowboard (skateboard
from Skatepark - change the isShowing for the wheels to false), an igloo (Buildings),
and eight pineTrees (Nature). Set the vehicle for the snowman to be the skateboard.
Create an event so that the skateboard can be controlled by game player, by typing the
arrow keys.

      Create a method for the skateboard named checkForCollisionWithTrees . If the
skateboard’s distance to the pine tree is less than 3.75 meters, then move the skateboard
back 10 meters. In this method, you will need to check each tree in the scene. When you
have the If/Else working for one tree, then copy it for each of the other trees.

      To have Alice constantly check for collisions with the trees, create a When the
World Starts  event. Then change it to While the World is Running  (a right click on the
event pops up a menu so it can be changed). In the during  section of the While the World
is Running  event, call the checkForCollisionWithTrees .
      In order to check whether the player has won the game, create a method named
checkIfHome  for the skateboard. If the skateboard gets close to the igloo, display a 3D
text object that proclaims “I’m Home!” To make the 3D text flash, add a loop that
repeatedly sets the 3D text isShowing property  to false and then true.

Solution: 
The user moves the snowman with keyboard arrow keys and steers towards the igloo.
Once the snowman reaches to his igloo, a message is displayed "I am home" indicating the user has won the game.

See the attached video created using Alice 2.4 for this program using the actual source code


Contact me @ allassignmenthelp@gmail.com for the comprehensive step-by-step guide on how to create this game in ALICE as well as the final source code. I can modify the program if you would need any changes.

Wednesday, November 22, 2017

Ice Danger - ALICE Program

Ice Danger 

For this exercise, you can begin with a world completed in either Exercise 7 or 8—or create a new skater world from scratch. Add a hole in the ice (a blue circle).


Make the world interactive to allow the user to use the mouse to move the hole around on the icy surface. Now, as the skater is moving across the surface of the ice, the user can move the hole into the skater’s path. Modify your method that skates the skater forward to use an If statement that checks whether the skater is skating over the hole. If she is on top of the hole, she will drop through it. If you have sound on your computer, you may want to add a splash sound.

Solution: 
The user can move the blue hole with mouse (drag and drop motion) across the screen. If the ice dancer comes close to the hole, dancer falls into the hole.


See the attached video created using Alice 2.3 for this program

Contact me @ allassignmenthelp@gmail.com for the comprehensive step-by-step guide on how to create this game in ALICE as well as the final source code. I can modify the program if you would need any changes.