Alice Community  

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

Reply
 
Thread Tools Display Modes
Please help with maze! Pretty Please.
Old
Cindy
Guest
 
Status:
Posts: n/a
Default Please help with maze! Pretty Please. - 04-22-2010, 10:18 AM

Me and my partner are doing a final project in a class and it involves a maze and a boy.
The problem is that the boy can run right thru the maze and we don't want it to.
The maze has no sub parts so we can't even add a boolean function or anything.
How do we prevent this from happening?
please help us..
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 04-22-2010, 10:24 AM

Well theoretically you could put a whole bunch of 2-d squares all around every edge of the maze and put them all into a list and then make a simple collision detection method from there.

The hardest part would just be to organize all of those squares to every side of the maze, and you may have hundreds of squares depending on how big and complex the maze is. Also, if you do this, make sure all of the squares are facing the same way; don't have one square facing towards the wall, and another square facing outwards, have them either all facing either towards the wall or all facing outward.
Attached Files
File Type: a2w fatBot (2).a2w (1.55 MB, 51 views)


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301

Last edited by Dameria; 04-22-2010 at 06:32 PM.
   
Reply With Quote
Old
Cindy
Guest
 
Status:
Posts: n/a
Default 04-22-2010, 10:29 AM

Well we were going to do that but like it had too many blocks and it was hard to organize them.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 04-22-2010, 10:31 AM

Quote:
Originally Posted by Cindy View Post
Well we were going to do that but like it had too many blocks and it was hard to organize them.
If you want you can post your world and I'll see if I can organize them for you. I might even create the collision detection method if I am inspired to.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
Cindy
Guest
 
Status:
Posts: n/a
Default 04-22-2010, 10:34 AM

Thanks alot we really appriciate you helping us on this.
Attached Files
File Type: a2w fatBot.a2w (2.19 MB, 9 views)
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 04-22-2010, 10:53 AM

This shouldn't be too hard. I actually expected there to be a lot more than this. You're program is not very... in depth. If you want, I can add some things to your world to make it a lot more creative, like a scoring system, timer, different point of views, etc. By doing this, however, it would be almost like cheating, do you still want me to do it? I have already fixed some things like putting all of the lollipops in a group and creating a very simpler "click" method to make them disappear (I made it so that they only disappear when you are 8 meters away from them, so that you cannot just go through and click all of them at once, you actually have to find them first.)

I will work on the collision detection now, but if you want me to add other things like a scoring system just ask and I will.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Reply


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.