
-----------------------------------
PRESHANA
Mon Dec 12, 2005 6:55 am

tURING-MAZE
-----------------------------------
HEY U GUYS . I JUS STARTED LEARNIN ABOU TTURING AND  NEED HELP WITH THIS MAZE GAME. i NEED HELP ON WRTIING THE CODE THAT DOESN'T ALLOW THE BALL  TO GO OFF SCREEN.

-----------------------------------
Hikaru79
Mon Dec 12, 2005 8:20 am


-----------------------------------
HEY U GUYS . I JUS STARTED LEARNIN ABOU TTURING AND  NEED HELP WITH THIS MAZE GAME. i NEED HELP ON WRTIING THE CODE THAT DOESN'T ALLOW THE BALL  TO GO OFF SCREEN.

Here's two tips.

1) Don't yell.

2) 'maxx' and 'maxy' are the constants that represent the maximum dimensions of the Turing window.
if ballx = 0 and bally =0 then
     #The ball is inside the screen.
end if

-----------------------------------
Tony
Mon Dec 12, 2005 9:50 am


-----------------------------------
The Caps-Lock is usually located on the left side of the keyboard, to the left of A.. try looking for it.

-----------------------------------
do_pete
Mon Dec 12, 2005 11:11 am


-----------------------------------
if ballx = 0 and bally =0 then
     #The ball is inside the screen.
end if

Or you can go like this

Ball_X := min (maxx - RADIUS, max (RADIUS, Ball_X))
Ball_Y := min (maxy - RADIUS, max (RADIUS, Ball_Y))


-----------------------------------
MysticVegeta
Mon Dec 12, 2005 1:19 pm


-----------------------------------
Off topic: hmm perhaps the caps was on, notice how to title is tURING. the "t" is small. Dont you look at the screen once when you type :S 

On topic: There is an example of a bouncing ball and going tangentially on the boundary in the Turing manual. I believe its in the Music.x command.

-----------------------------------
Dan
Mon Dec 12, 2005 1:27 pm


-----------------------------------
For more info on such a topic one could sreach the turing sections for collision detection. There should be many topics on the subject and many difrent methods or doing this.
