Alice Community  

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

Reply
 
Thread Tools Display Modes
Help with a project!
Old
KaylaEtCetera
Guest
 
Status:
Posts: n/a
Red face Help with a project! - 05-05-2011, 04:57 PM

For my Animations Programming (class taught about Alice) final, I'd really like to make a game. We haven't gone over the parts of Alice that would be used to make a game, so I'm a bit on my own. I've got a few problems that I just can't seem to figure out, and I would love for any and all suggestions!

So the premise of my game is that there will be 6 bugs on either side of the camera, off screen. They will run onto the scene at varying speeds, at varying times. The object of the game is to click on as many bugs as possible within the alotted time period. When a bug is clicked, it goes back to where it started and waits to run back on screen again.

Right now I've got one bug on either side, just for figuring out the mechanics. I've dropped a dummy object where they are set off screen.

The main problem I'm having at the moment is getting a score keeper working for each time a bug is clicked and sent back to the dummy, as well as getting the bugs to loop walking to the otherside. You see, if the user does not click on a bug and it walks off camera to the other side, I'd like it to still go back to the dummy object and wait to walk again.

As you can see, this is a really complicated project. I'd love to be able to use this idea as my final. Any and all help is greatly appreciated! Thanks so much!
   
Reply With Quote
Old
TauTrumpsPi
Senior Member
 
TauTrumpsPi's Avatar
 
Status: Offline
Posts: 399
Join Date: Mar 2011
Location: The diamond layer
Default 05-05-2011, 07:01 PM

For the counter, I would have a variable go up by one when the mouse is clicked on one of the bugs. Just include that within your go back to dummy when clicked method.

For the return even if they are not clicked on, in your method I would have them move forward until they are off the screen then in the same method have them return to the dummy.

Hope this helps


--------------------------------------------------------------------------------------------------------------------------
I have plenty of common sense. I just choose to ignore it.
-Calvin and Hobbes

Wondering about my Avatar?
http://en.wikipedia.org/wiki/Tardigrade

Wondering about my username?
http://www.youtube.com/watch?v=jG7vhMMXagQ
   
Reply With Quote
Loops
Old
MrMoke
Senior Member
 
MrMoke's Avatar
 
Status: Offline
Posts: 501
Join Date: Sep 2007
Location: Austin, Texas
Default Loops - 05-05-2011, 07:03 PM

sounds like good time for nested loops to kick in.

For Each Bug:

Outside while loop checks a boolean to see if it is time to walk.

Inside Loop movesToward another dummy, and turns the outside boolean off after bug arrives or if the bug is tapped. Move the bug back.

All of this would have to be inside of an infinate loop method that starts the same time as World.

Last edited by MrMoke; 05-05-2011 at 07:23 PM.
   
Reply With Quote
Old
kompsci
Guest
 
Status:
Posts: n/a
Default 05-05-2011, 07:14 PM

infinite*
   
Reply With Quote
Oops
Old
MrMoke
Senior Member
 
MrMoke's Avatar
 
Status: Offline
Posts: 501
Join Date: Sep 2007
Location: Austin, Texas
Default Oops - 05-05-2011, 07:33 PM

OMG! I mizspelt agin
   
Reply With Quote
Reply

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 ©2021, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.