Computer Science Canada

I was wondering how to make my background black for a game

Author:  theshiznat [ 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

Author:  Homer_simpson [ Mon Nov 03, 2003 5:44 pm ]
Post subject: 

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

Author:  Blade [ Mon Nov 03, 2003 5:46 pm ]
Post subject: 

uhm..

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

Author:  Andy [ Tue Nov 04, 2003 8:59 pm ]
Post subject: 

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

Author:  Tony [ Tue Nov 04, 2003 9:12 pm ]
Post 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

Author:  Homer_simpson [ Tue Nov 04, 2003 9:21 pm ]
Post 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...

Author:  AsianSensation [ Wed Nov 05, 2003 12:57 am ]
Post subject: 

code:

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


Laughing

Author:  Tony [ Wed Nov 05, 2003 1:07 am ]
Post subject: 

oh yeah?
code:

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


Laughing

Author:  AsianSensation [ Wed Nov 05, 2003 8:58 am ]
Post 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

Author:  Tony [ Wed Nov 05, 2003 9:56 am ]
Post 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

Author:  Mazer [ Wed Nov 05, 2003 4:50 pm ]
Post 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.

Author:  AsianSensation [ Thu Nov 06, 2003 2:13 pm ]
Post 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

Author:  Tony [ Thu Nov 06, 2003 7:32 pm ]
Post 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

Author:  drumersrule123 [ Fri Dec 12, 2003 8:02 pm ]
Post subject: 

why dont u just use

setscreen("graphics:vga")

Author:  Andy [ Fri Dec 12, 2003 8:34 pm ]
Post subject: 

cuz no body uses turing 3

Author:  roer [ Fri Dec 12, 2003 9:27 pm ]
Post subject: 

May I please ask why everyone gave him long useless pieces of code Razz Intresting how many ways you can do a simple operation Smile So dodge, how can you use whatdotcolor now? Rolling Eyes

Author:  Andy [ Fri Dec 12, 2003 9:28 pm ]
Post subject: 

tony already did it...

Author:  roer [ Fri Dec 12, 2003 9:57 pm ]
Post subject: 

dodge_tomahawk wrote:
tony already did it...


Embarassed Remind me to carefully read all the posts Rolling Eyes What game is that BTW?

Author:  Andy [ Fri Dec 12, 2003 9:58 pm ]
Post subject: 

starcraft ghost


: