Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Paying for Help (http://www.alice.org/community/showthread.php?t=11829)

bye 12-01-2017 05:13 PM

Paying for Help
 
Need some help with these 2 problems. Been stumping me all day, willing to pay if somebody can show me how these are done! :)

Pollutants in the water. Create a sea world game with a fish that avoids other objects that are floating in the water. Part of the fish’s body should be above the water’s surface, so you can see it swimming.) The game is to have the fish avoid the objects floating in the water by pressing the spacebar.

Eliminate the bugs, zombies, cowboys, or whatever you like use (You’re pick). Create a world with a list or an array that contains the objects that are to be eliminated. When the world is played, the objects should all move quickly in different random directions. When the user successfully clicks an object, it should vanish.

sometimes618 12-10-2017 07:40 AM

[QUOTE=bye;57740]Need some help with these 2 problems. Been stumping me all day, willing to pay if somebody can show me how these are done! :)

Pollutants in the water. Create a sea world game with a fish that avoids other objects that are floating in the water. Part of the fishÂ’s body should be above the waterÂ’s surface, so you can see it swimming.) The game is to have the fish avoid the objects floating in the water by pressing the spacebar.

Eliminate the bugs, zombies, cowboys, or whatever you like use (YouÂ’re pick). Create a world with a list or an array that contains the objects that are to be eliminated. When the world is played, the objects should all move quickly in different random directions. When the user successfully clicks an object, it should vanish.[/QUOTE]

Save the money - neither of these should be too complicated, though I would like a couple things to be clarified.

So for the "pollutants" world, would you make it so that you can move with the arrow buttons, or that you're constantly moving? In any case, you could probably make a world-level list for all the pollutants, and make a method where it would forever check if you're within a certain distance "for all pollutants together." I haven't really tried this, but the alternative is to make it so that the world detects them individually, though at the same time.

You seem to already have a thing or two pinned for the "eliminate" world, particularly when you say the world would have a list. My advice is that there should be an event saying that when the mouse is clicked on anything, a world-level method will play. The method would have an object parameter and would check if the world's list has the object in the parameter. Make it so that in the event, the parameter is "object under mouse cursor." For the object movement, make a "while the world is running" event with a "movement" method, and preferably make each object move individually.

If you're still confused, reply if you want.


All times are GMT -5. The time now is 08:28 AM.

Copyright ©2018, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.