Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Final Project
Old
MunnyMike
Guest
 
Status:
Posts: n/a
Post Final Project - 05-02-2010, 09:46 PM

Hello alice community.

I'm not sure how to go about doing this so i'll start by first describing my final project.

I want to make a fishtank scene with several fish, rocks, plants, misc. objects in it. Clicking on each of these will cause an action to happen.

That's all simple enough right?

The hard part is that I want the fish to be in constant motion. An infinite loop would be best right?

Also how would I cause bubbles to rise from the fishs' mouths as they are all moving around?

So yeah that's about it. Fish will spin, wink, change to another path when clicked on. Rocks will rise to reveal hidden objects.
I just really want to make this feel like a tank with animals rather than little robots.

Edit*
What would be the best way to mimic the look of a fishtank?

Last edited by MunnyMike; 05-02-2010 at 09:48 PM.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 05-02-2010, 10:52 PM

There's an ocean floor object which you could shrink and put inside a semi-transparent cyan cube or box to simulate a fish tank.

You could use the random function coupled with the sine mathematical function to create wavy, but slightly erratic motions of the fishes, along with semi-transparent spheres which would be invisible at first and vehicled to the fishes, then would become visible, rise, then orient themselves back to the fishes and become invisible again in zero seconds at random intervals to simulate bubbles.

Do you know how to do all this?


(')>
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 05-03-2010, 07:25 AM

I would keep it simple and do what he said to do X


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
MunnyMike
Guest
 
Status:
Posts: n/a
Thumbs up 05-03-2010, 10:24 AM

Quote:
Originally Posted by x2495iiii View Post
There's an ocean floor object which you could shrink and put inside a semi-transparent cyan cube or box to simulate a fish tank.

You could use the random function coupled with the sine mathematical function to create wavy, but slightly erratic motions of the fishes, along with semi-transparent spheres which would be invisible at first and vehicled to the fishes, then would become visible, rise, then orient themselves back to the fishes and become invisible again in zero seconds at random intervals to simulate bubbles.

Do you know how to do all this?

I know how to add the bubbles and vehicle them to the fish. I've done something similar before. Thanks for that idea.
I had no idea there was anything like the "ocean floor" as a model (thats what I get for only ever using "search"). I had just been using a combination of squares (with their opacity lowered and color changed to dark blue) as the walls of the tank.

Can you give me a little more information on the sine random function and sine mathematic?
Thanks in advance
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 05-03-2010, 11:22 PM

If you click the sky on your world, the world itself will be selected. While the world is selected, click the functions tab to see the nice selection of functions included with Alice. Two of those are random number and sin [a]. My idea was to have the fish move back and forth, while at the same time moving up and down in a sin curve to simulate a wavy pattern (this is actually one of the assignments in the textbook, see if you can find it for more info), then adding a random number in there somewhere to make it look less mechanical (where you add it depends on your taste, you could add it in the duration to make him move faster or slower randomly, you could add it in the back and forth motion to make it look less like he's just swimming the same bounding path over and over, etc.)


(')>
   
Reply With Quote
Old
MunnyMike
Guest
 
Status:
Posts: n/a
Default 05-04-2010, 07:21 PM

Quote:
Originally Posted by x2495iiii View Post
If you click the sky on your world, the world itself will be selected. While the world is selected, click the functions tab to see the nice selection of functions included with Alice. Two of those are random number and sin [a]. My idea was to have the fish move back and forth, while at the same time moving up and down in a sin curve to simulate a wavy pattern (this is actually one of the assignments in the textbook, see if you can find it for more info), then adding a random number in there somewhere to make it look less mechanical (where you add it depends on your taste, you could add it in the duration to make him move faster or slower randomly, you could add it in the back and forth motion to make it look less like he's just swimming the same bounding path over and over, etc.)
thanks again.

I've hit a speed bump in all this.
I put several invisible squares around the "seafloor" and used the squares as collision models (so if the fish get within X distance of them they will turn around)
They aren't really doing that, several of them end up going through both the seafloor wall and the invisible squares.
Attached Images
File Type: jpg alice_project.jpg (21.9 KB, 84 views)

Last edited by MunnyMike; 05-04-2010 at 07:25 PM.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 05-04-2010, 10:51 PM

You need to put the "If fish is within..." statements in a big do together, then put that in an infinity loop. Where they are now, they're only called once, so if the fish isn't that close when they're called that one time, the scene continues thinking everything's alright.

Very common mistake, everyone makes it at some point (I still do occasionally).


(')>
   
Reply With Quote
Old
MunnyMike
Guest
 
Status:
Posts: n/a
Unhappy 05-04-2010, 11:10 PM

Quote:
Originally Posted by x2495iiii View Post
You need to put the "If fish is within..." statements in a big do together, then put that in an infinity loop. Where they are now, they're only called once, so if the fish isn't that close when they're called that one time, the scene continues thinking everything's alright.

Very common mistake, everyone makes it at some point (I still do occasionally).
It must have not come out in the picture well but they are in a big "do together" and that is in an infinite loop.
I know you've helped a lot as it is but would you mind seeing what went wrong?
I've unhid the boxes.
Two methods are under "goldfish"

Edit
I ended up turning in this simple project for my final. A few animals that had buttons near them. They performed different actions depending on what you clicked (buttons/animals/nearby objects)
The teacher is very easily impressed so I think I got an A
I still want to finish this though, so any help is appreciated.
Attached Files
File Type: a2w ProjectA1.a2w (4.53 MB, 49 views)

Last edited by MunnyMike; 05-06-2010 at 12:00 AM. Reason: deadline
   
Reply With Quote
Reply

Tags
final, fish, project, tank

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



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