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

Username:   Password: 
 RegisterRegister   
 Colourback problems...
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Nemi




PostPosted: Tue Jun 10, 2003 7:38 pm   Post subject: Colourback problems...

Er... I'm sort of stuck here... hope any of you could help... Shocked

Anyways, I'm doing that 'Snake' game thing as a final project, however, because it's my first year and all, it's pretty much a text version of the game (with a limited knowledge on graphic importation)...

So here's my problem:
I first started the code in Turing 3 and used
code:

var SNAKE :string := chr (157)
put SNAKE (1)

to isolate the colourback on just that character.

Next thing you know, my teacher gets Turing 4... and apparently this 'SNAKE (1)' snippet doesn't work anymore -- the colourback continues across the screen regardless of where the snake moves. (Click here for a screenshot)

Is there any way in which I can isolate the colourback on that single character without using a for loop? (I've tried that already and failed miserably.)

NOTE! I'm pretty new at all this, so I'm not that advanced at the coding and stuff... Rolling Eyes
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Tue Jun 10, 2003 8:00 pm   Post subject: (No subject)

I would recommend keeping background color the same, and just have a contrasting color of your text instead. I think using '@' character would work best since its round and takes up a lot of area.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Nemi




PostPosted: Tue Jun 10, 2003 8:14 pm   Post subject: (No subject)

Ehhh... more problems...

I've changed the colourback to match with background. Which is good, you can't see the green.

Problem #2:
The 'hidden' colourback erases any 'food' that appears on the right if you move the 'snake' to the left side of the 'food'. (Because the colourback extends to the right end of the screen and erases it) ._.;;
Tony




PostPosted: Tue Jun 10, 2003 8:26 pm   Post subject: (No subject)

if you dont use colorback at all, the problem shouldn't occur.

Use Draw.FillBox and Draw.FillOval... that would make things simpler too.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Nemi




PostPosted: Tue Jun 10, 2003 8:28 pm   Post subject: (No subject)

Alright... I'll try that out. Thanks! Very Happy
Andy




PostPosted: Wed Jun 11, 2003 3:39 pm   Post subject: (No subject)

or that when ur inputing something, put .. after everything that way the line won't show
when u wanna go to the next line just use
locate(whatrow+1,1)
and put .. after that one too
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  [ 6 Posts ]
Jump to:   


Style:  
Search: