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

Username:   Password: 
 RegisterRegister   
 Help recognizing borders using View.WhatDotColour
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
canmovie




PostPosted: Sat Oct 16, 2010 12:54 pm   Post subject: Help recognizing borders using View.WhatDotColour

What is it you are trying to achieve?
I'm making a game where you try to find cheese as a mouse in a maze.


What is the problem you are having?
I used View.WhatDotColour to make the mouse recognize borders, and when I substitute a bmp image of the maze in the background,
View.WhatDotColour does not recognize the borders, and I don't want to draw the whole maze using draw commands.

Describe what you have tried to solve this problem
I tried to substitute an image that has the same exact tone of green that turing uses, and it still won't recognize that it's a border.


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>

Turing:


<Add your code here>



Please specify what version of Turing you are using
4.1.1
Sponsor
Sponsor
Sponsor
sponsor
copthesaint




PostPosted: Sat Oct 16, 2010 1:47 pm   Post subject: Re: Help recognizing borders using View.WhatDotColour

lol Call it a rat... I thought you were talking about actually the mouse...

Try making alpha pathing if you wanna use whatdotcolor, That mean drawing black and while underneath your pictures for collision, so for example:

Turing:

View.Set ("Graphics,Offscreenonly,nobuttonbar")
var mX,mY,mB : int
loop
mousewhere (mX,mY,mB)
    drawfillbox (0,0,200,100,black)
    drawfillbox (400,300,600,400,black)
    if View.WhatDotColor (mX,mY) = black then
        put "Collision!"
        View.Update
        delay (100)
    end if
    cls
    drawfillbox (0,0,200,100,blue)
    drawfillbox (400,300,600,400,purple)
    View.Update
    cls
end loop
andrew.




PostPosted: Sat Oct 16, 2010 3:18 pm   Post subject: Re: Help recognizing borders using View.WhatDotColour

copthesaint @ Sat Oct 16, 2010 1:47 pm wrote:
lol Call it a rat... I thought you were talking about actually the mouse...

Try making alpha pathing if you wanna use whatdotcolor, That mean drawing black and while underneath your pictures for collision, so for example:

Turing:

View.Set ("Graphics,Offscreenonly,nobuttonbar")
var mX,mY,mB : int
loop
mousewhere (mX,mY,mB)
    drawfillbox (0,0,200,100,black)
    drawfillbox (400,300,600,400,black)
    if View.WhatDotColor (mX,mY) = black then
        put "Collision!"
        View.Update
        delay (100)
    end if
    cls
    drawfillbox (0,0,200,100,blue)
    drawfillbox (400,300,600,400,purple)
    View.Update
    cls
end loop
That's exactly what thee don't want to do. They said in their post that they don't want to use draw commands to draw each level. They want to be able to make the image (in Paint or something) and just load it in.
copthesaint




PostPosted: Sat Oct 16, 2010 11:14 pm   Post subject: RE:Help recognizing borders using View.WhatDotColour

So its very hard you know to create a black and white picture? geez... lol
More then likly His problem though might be that he isnt updating his image correctly.
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  [ 4 Posts ]
Jump to:   


Style:  
Search: