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

Username:   Password: 
 RegisterRegister   
 I was wondering how to make my background black for a game
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
theshiznat




PostPosted: Mon Nov 03, 2003 4:29 pm   Post subject: I was wondering how to make my background black for a game

I was wondering how to make my background black instead of white for a skewl project but i dont noe how to change the color of the background
Sponsor
Sponsor
Sponsor
sponsor
Homer_simpson




PostPosted: Mon Nov 03, 2003 5:44 pm   Post subject: (No subject)

I would suggest that u use a bmp picture for yer background cuz drawing stuff in turing is very slow...
Blade




PostPosted: Mon Nov 03, 2003 5:46 pm   Post subject: (No subject)

uhm..

colourback(colour) then clear the screen to update it wiht cls
Andy




PostPosted: Tue Nov 04, 2003 8:59 pm   Post subject: (No subject)

or just
code:
drawfill(1,1,black)
Tony




PostPosted: Tue Nov 04, 2003 9:12 pm   Post subject: (No subject)

you can always rely on dodge to come up with the most useless solution to any problem... and it *will* involve whatdotcolor Rolling Eyes

code:

for x:1..maxx
for y:1..maxy
if whatdotcolor(x,y) not= black then
Draw.Dot(x,y,black)
end if
end for
end for

Laughing
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Homer_simpson




PostPosted: Tue Nov 04, 2003 9:21 pm   Post subject: (No subject)

Homer_simpson wrote:
I would suggest that u use a bmp picture for yer background cuz drawing stuff in turing is very slow...

oops Embarassed i thought u wanted to use background images...
AsianSensation




PostPosted: Wed Nov 05, 2003 12:57 am   Post subject: (No subject)

code:

for y : 0 .. maxy
    drawline (0, y, maxx, y, 7)
end for


Laughing
Tony




PostPosted: Wed Nov 05, 2003 1:07 am   Post subject: (No subject)

oh yeah?
code:

loop
Draw.Dot(Rand.Int(0,maxx),Rand.Int(0,maxy),black)
end loop


Laughing
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Sponsor
Sponsor
Sponsor
sponsor
AsianSensation




PostPosted: Wed Nov 05, 2003 8:58 am   Post subject: (No subject)

that's it, take this

code:
var x, y : int
Draw.FillMapleLeaf (0, 0, maxx, maxy, black)

loop
    x := Rand.Int (0, maxx)
    y := Rand.Int (0, maxy)
    if whatdotcolor (x, y) not= 7 then
        drawfill (x, y, 7, 7)
    end if
end loop


Twisted Evil
Tony




PostPosted: Wed Nov 05, 2003 9:56 am   Post subject: (No subject)

ohh Surprised you're good. But not good enough Twisted Evil

code:

var x,y:int
loop
x:=Rand.Int(0,maxx)
y:=Rand.Int(0,maxy)
    if whatdotcolor (x,y) not= black then
        Draw.FillMapleLeaf (x, y, x+1, y+1, black)
    end if
end loop
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Mazer




PostPosted: Wed Nov 05, 2003 4:50 pm   Post subject: (No subject)

this looks like a challenge to me... Twisted Evil

code:

process makemyscreengoblack (x, y : int)
    var xcoordinate, ycoordinate : int
    xcoordinate := 0
    ycoordinate := 0

    loop
        xcoordinate := xcoordinate + 1
        if xcoordinate = x then
            exit
        end if
    end loop
    loop
        ycoordinate := ycoordinate + 1
        if ycoordinate = y then
            exit
        end if
    end loop

    drawdot (x, y, black)
end makemyscreengoblack

var x, y : int
x := 0
y := 0

loop
    x := x + 1

    if x = maxx then
        x := 0
        y := y + 1
    end if
    if y = maxy then
        exit
    end if

    fork makemyscreengoblack (x, y)
end loop


uh... we were going for efficiency, right?

PS: sorry, Catalyst.
AsianSensation




PostPosted: Thu Nov 06, 2003 2:13 pm   Post subject: (No subject)

Eventually.....

code:
var chars : array char of boolean
var x, y := 0

loop
    Input.KeyDown (chars)
    if chars (KEY_RIGHT_ARROW) then
        x += 1
    end if
    if chars (KEY_LEFT_ARROW) then
        x -= 1
    end if
    if chars (KEY_UP_ARROW) then
        y += 1
    end if
    if chars (KEY_DOWN_ARROW) then
        y -= 1
    end if

    drawfillbox (x, y, x + 5, y + 5, black)
    delay (20)
end loop
Tony




PostPosted: Thu Nov 06, 2003 7:32 pm   Post subject: (No subject)

although back in the day...
code:

var c:string(1)

for x:1..maxx by 5
for y:1..maxy by 5
locate(1,1)
put "would you like to color (",x,",",y,")"
getch(c)
if c="y" or c="Y" then
Draw.FillBox(x,y,x+5,y+5,black)
end if
end for
end for

Laughing
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
drumersrule123




PostPosted: Fri Dec 12, 2003 8:02 pm   Post subject: (No subject)

why dont u just use

setscreen("graphics:vga")
Andy




PostPosted: Fri Dec 12, 2003 8:34 pm   Post subject: (No subject)

cuz no body uses turing 3
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 2  [ 19 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: