Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Maze help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
shruti




PostPosted: Sat May 10, 2008 3:04 pm   Post subject: Maze help

i am making a maze for the final project. i did all other stuff but i dont know how to not let the user go through the lines. plzz help me or give me hints on how to do it ..plzzzzzzz
thanks
Sponsor
Sponsor
Sponsor
sponsor
TheGuardian001




PostPosted: Sat May 10, 2008 3:24 pm   Post subject: Re: Maze help

the easiest way to do it would be with View.WhatDotColour, although im sure theres a more efficient way.

if you use View.WhatDotColour, you would just add it into your move buttons if lines.
eg:

if keys(KEY_LEFT_ARROW) and View.WhatDotColour(x-1,y) = backgroundcolour then
do this
end if
isaiahk9




PostPosted: Sat May 10, 2008 3:24 pm   Post subject: RE:Maze help

You can either hardcode it ;
If the player's x,y position is in the x,y coordinates of the walls, then the player is re-drawn outside of the wall.

Or you can soft-code it. This works relatively well when not using gravity in your game :
If View.WhatDotColor (characterx, charactery) = colorofwall then
re-draw character outside of walls
rose1997




PostPosted: Tue May 26, 2009 4:17 pm   Post subject: RE:Maze help

That helped me a little. but i also want to have the formula for it. can you show me the formula so i can understand it better.
plzzzz
ok thanks
Siavash




PostPosted: Tue May 26, 2009 9:40 pm   Post subject: RE:Maze help

you can use the whatdotcolor comand for maze and check for cordinates when at the end of the maze. good luck
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: