Showing posts with label amusement park. Show all posts
Showing posts with label amusement park. Show all posts

Saturday, August 8, 2020

Start and Stop - ALICE Program

 Stop and Start

Choose a ride object other than the carousel from the Amusement Park gallery that moves in a circular pattern (a round-and-round manner, like the Ferris wheel). Create a method that performs an animation appropriate for the ride object selected. Then, create a way to start and stop the ride using the While something is true event.

Start and Stop


Solution:

Add a button to the world to start and stop the ferris wheel animation. The button toggles the state, one click starts the animation, the next click stops it. And the animation runs infinitely.

This question is to teach how to use repetition, loops and events.

See the attached video created using Alice 2.5 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, July 20, 2016

Bumper Cars - ALICE program


Bumper Cars

Create a simulation of the bumper car ride (Amusement Park), where the cars move continuously around within the bumper arena. Add two bumper cars inside the arena. In this animation, each car should be moving forward a small amount until it gets too close to another car or to the wall, then turn the car a quarter of a revolution clockwise (to get a different direction) and continue moving forward. Use a switch (Controls) to stop and start the ride. As long as the switch is on, the ride should continue.

Chapter 7 Learning to Program with ALICE

Hint: To create new bumperCar objects, select one of the bumperCar objects in the object tree and then click on the copy icon in the mouse control palette. Be sure to click on the white arrow mouse control icon when finished creating copies (to turn off copy). To avoid a car driving through a wall of the arena, a simple form of collision detection is needed. One way to check for a possible collision is to use the distance to function to compute the distance of the car to the arena. Remember that distance to is measured “center-to-center.” In this world, a measurement from the center of the car to the center of the arena is= exactly what you need. (When a car gets too far from the center of the arena, it will collide with a wall.) It is also possible to write a function that returns whether two cars are about to collide with one another. What should be done in this case?



Here is the video of this ALICE program created using ALICE 2.3


Contact me for comprehensive step-by-step guide to create this ALICE program as well as the complete source code.