Computer Science Canada

limits in games

Author:  metal_hed [ Sat Mar 13, 2004 10:40 pm ]
Post subject:  limits in games

i built an etch-a-sketch game and u want to know how to set a limit the line can goto...like a boarder.

Author:  Tony [ Sat Mar 13, 2004 10:44 pm ]
Post subject: 

you compare current position to 0,0 and maxx,maxy to see if you're still inside the boarder or not

Author:  AsianSensation [ Sat Mar 13, 2004 11:35 pm ]
Post subject: 

or you could use whatdotcolor. (I'm only filling in for dodge here Razz )

Author:  jonos [ Sun Mar 14, 2004 1:55 pm ]
Post subject: 

you can't keep the mouse in the run window in turing (at least im pretty sure), but you can make it so it doesn't draw outside of the border:

if mousex >= maxx or mousex <= 0 or mousey >= maxy or mousey <= 0 then
don't draw anything
else
let the person draw something
end if

Author:  the_short1 [ Mon Mar 15, 2004 7:50 pm ]
Post subject: 

for whatdotcolor (since nonoen release explained)


draw a border around to outside..
drawbox (0,0,maxx,maxy,color of your choice)
then
if whatdotcolor (the position of the line) = the color above
U hit wall...
else
u can keep going

try to make that color of border something realy unique like maybe 155 or something... see my color chart HERE for full color list
http://www.compsci.ca/v2/viewtopic.php?t=3782&highlight=


: