----------------------------------- theshiznat Mon Nov 03, 2003 4:29 pm 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 ----------------------------------- Homer_simpson Mon Nov 03, 2003 5:44 pm ----------------------------------- I would suggest that u use a bmp picture for yer background cuz drawing stuff in turing is very slow... ----------------------------------- Blade Mon Nov 03, 2003 5:46 pm ----------------------------------- uhm.. colourback(colour) then clear the screen to update it wiht cls ----------------------------------- Andy Tue Nov 04, 2003 8:59 pm ----------------------------------- or just drawfill(1,1,black) ----------------------------------- Tony Tue Nov 04, 2003 9:12 pm ----------------------------------- you can always rely on dodge to come up with the most useless solution to any problem... and it *will* involve whatdotcolor :roll: 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 :lol: ----------------------------------- Homer_simpson Tue Nov 04, 2003 9:21 pm ----------------------------------- I would suggest that u use a bmp picture for yer background cuz drawing stuff in turing is very slow... oops :oops: i thought u wanted to use background images... ----------------------------------- AsianSensation Wed Nov 05, 2003 12:57 am ----------------------------------- for y : 0 .. maxy drawline (0, y, maxx, y, 7) end for :lol: ----------------------------------- Tony Wed Nov 05, 2003 1:07 am ----------------------------------- oh yeah? loop Draw.Dot(Rand.Int(0,maxx),Rand.Int(0,maxy),black) end loop :lol: ----------------------------------- AsianSensation Wed Nov 05, 2003 8:58 am ----------------------------------- that's it, take this 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: ----------------------------------- Tony Wed Nov 05, 2003 9:56 am ----------------------------------- ohh :o you're good. But not good enough :twisted: 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 ----------------------------------- Mazer Wed Nov 05, 2003 4:50 pm ----------------------------------- this looks like a challenge to me... :twisted: 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 Thu Nov 06, 2003 2:13 pm ----------------------------------- Eventually..... 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 Thu Nov 06, 2003 7:32 pm ----------------------------------- although back in the day... 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 :lol: ----------------------------------- drumersrule123 Fri Dec 12, 2003 8:02 pm ----------------------------------- why dont u just use setscreen("graphics:vga") ----------------------------------- Andy Fri Dec 12, 2003 8:34 pm ----------------------------------- cuz no body uses turing 3 ----------------------------------- roer Fri Dec 12, 2003 9:27 pm ----------------------------------- May I please ask why everyone gave him long useless pieces of code :P Intresting how many ways you can do a simple operation :) So dodge, how can you use whatdotcolor now? :roll: ----------------------------------- Andy Fri Dec 12, 2003 9:28 pm ----------------------------------- tony already did it... ----------------------------------- roer Fri Dec 12, 2003 9:57 pm ----------------------------------- tony already did it... :oops: Remind me to carefully read all the posts :roll: What game is that BTW? ----------------------------------- Andy Fri Dec 12, 2003 9:58 pm ----------------------------------- starcraft ghost