Alice Community  

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

Reply
 
Thread Tools Display Modes
Maze Hassles
Old
andrew.b
Guest
 
Status:
Posts: n/a
Default Maze Hassles - 05-01-2010, 09:55 AM

Coming up on Tuesday, I have an assignment (likely the last one involving Alice) due. My class has been entirely online, so getting help isn't that easy. The assignment is to simply make a puzzle for the user to solve. I chose a maze and decided to use tombstones to build the maze structure. At this point, I'm mentally exhausted with the process, and I have done almost nothing but arrange objects (61 tombstones and my brain is fried).

The Project Vision:
An evil mage has trapped a shrunken princess in a maze and no one can get in to pull her free, but there is hope. There are a team of helpful wizards who can pull the princess towards them, until she encounters an obstacle. Using their powers, they might be able to get her to a portal that will free her and return her to her normal size. The program would simply begin with the princess in a starting position within a boxed maze with 4 wizards along the outside, 1 at each outer wall. Clicking on one of the wizards will cause him to "pull" the princess towards his side of the maze, having her turn to face him in the process. Once she reaches the end portal, she will "teleport" to a place outside the maze and return to normal size.

These are the issues I'm trying to figure out:
- How can I arrange my gravestones to their positions WITHOUT excessive coding?
- How can I get the princess to move in straight lines until being stopped by an object in her path?
- How can I get the princess to appropriately face the correct wall when a wizard tries to move her?
   
Reply With Quote
Old
andrew.b
Guest
 
Status:
Posts: n/a
Default 05-01-2010, 05:49 PM

I know that generally, double-posting on a forum is a crime most heinous. However, as no one has replied for awhile and I have changed a few things, I thought it would be appropriate to make an update on what I've changed, as well as include an attachment of the new world.

Changes (Not overly relevant as I never posted the first world):
- Maze is fully built out of squares, with no code having been used to position or rotate them.
- Placed an object to act as a portal or goal to reach in the maze
- Have ALL of the essential objects placed
- Added "help buttons" in the form of a knight and crispy knight

What's Left:
- Writing a check to determine in which direction and how much the princess should turn.
- A movement loop with a collision check that will move the princess forward until she encounters a wall.
- Perhaps adding a more clearly visible wall structure, 2D objects from a bird's eye view have a tendency to be "invisible".
Attached Files
File Type: a2w Maze v2.a2w (7.27 MB, 14 views)
   
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-01-2010, 08:21 PM

Quote:
Originally Posted by andrew.b View Post
These are the issues I'm trying to figure out:
- How can I arrange my gravestones to their positions WITHOUT excessive coding?
- How can I get the princess to move in straight lines until being stopped by an object in her path?
- How can I get the princess to appropriately face the correct wall when a wizard tries to move her?
Sorry about the lack of replies and double-posting is acceptable in some rare cases, such as an unanswered call for help.

Gravestones: You could place a few dummy objects in spots the walls could be (if you're still interested in using gravestone, that is)

Straight Lines: That's the third maze collision detection question this week (or so). You all must be from the same class. Dameria made a nice example of a maze with collision detection here:

http://www.alice.org/community/showt...0168#post20168

Princess face the wall: Have you already tried the "turn to face" method? You could just have the princess turn to face the wizard who was clicked on.

Invisible objects: I'd try making the squares invisible (on purpose), then having some wall like objects (like boxes or gravestones or whatever you like) set their points of view to the squares.


(')>
   
Reply With Quote
Old
andrew.b
Guest
 
Status:
Posts: n/a
Default 05-02-2010, 12:18 AM

The collision detection in my system will be a bit differently. I have already setup a system to determine the direction the princess is to face when acted upon by a spell. As the princess will be moved via "spell" rather than by a user control, the need for constant worldwide collision checks is unnecessary. What I will end up doing, most likely, is see if I can start a loop that checks to see if a wall is 0.6 meters in front of the princess or less. If not, she moves forward 1 meter and the process will repeat.

Took a lot of pondering to work out some techniques, but overall I'm fairly confident I can work it out to the way I had planned. Code-wise it may be far from perfect, but as a student, I think I can get away with that.
   
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, 03:09 AM

Ah, I see what you mean. So is there anything else you needed help with or are you all good?


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