
-----------------------------------
mike200015
Mon Mar 14, 2005 7:20 pm

drawing rectangle help!
-----------------------------------
in my game, i need to draw about 10 rows of small rectangles, and about 10 in each row, with space in between each rectangle, but im not quite sure how to do that easily, without having to actually draw each 1 seperately. 

This is sort of what i want to make, but i need space in between each rectangle from the top and bottom. But also i want each rectangle like a different colour: 
for y : 0 .. 200 by 20
    drawline (150, y, 500, y, 255)
    drawline (150, 220, 500, 220, 255)
    for x : 150 .. 500 by 50
        drawline (x, y, x, y + 20, 255)
    end for
end for
If anyone knows how i could go about doin that id appreciate it.  :)

-----------------------------------
Naveg
Mon Mar 14, 2005 7:31 pm


-----------------------------------
hey mikes, msn me for the answer

-----------------------------------
mike200015
Mon Mar 14, 2005 7:35 pm


-----------------------------------
:D  thnx Vlads

-----------------------------------
Naveg
Mon Mar 14, 2005 7:45 pm


-----------------------------------
for anyone else who may have been interested...

var col : int
var colours : array 4 .. 14 of int := init (40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140)

for y : 0 .. 200 by 20
    for x : 150 .. 500 by 50
        randint (col, 4, 14)
        drawfillbox (x + 2, y + 2, x + 48, y + 18, colours (col))
    end for
end for


-----------------------------------
ssr
Mon Mar 14, 2005 10:05 pm


-----------------------------------
just learnt this
eh
save lines

var colours : array 4 .. 14 of int := init (40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140) 

for y : 0 .. 200 by 20 
    for x : 150 .. 500 by 50 
        drawfillbox (x + 2, y + 2, x + 48, y + 18, colours (Rand.Int (4, 14))) 
    end for 
end for 
 :D  :D

-----------------------------------
Flikerator
Tue Mar 15, 2005 2:01 pm


-----------------------------------
just learnt this
eh
save lines

var colours : array 4 .. 14 of int := init (40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140) 

for y : 0 .. 200 by 20 
    for x : 150 .. 500 by 50 
        drawfillbox (x + 2, y + 2, x + 48, y + 18, colours (Rand.Int (4, 14))) 
    end for 
end for 
 :D  :D

Why even have the colours var?

for x : 20 .. 600 by 50
    for y : 140 .. maxy - 20 by 20
        Draw.FillBox (x + 2, y + 2, x + 48, y + 18, Rand.Int (1, 250))
    end for
end for

-----------------------------------
mike200015
Tue Mar 15, 2005 8:40 pm


-----------------------------------
jus cuz i only wanted it certain colours

-----------------------------------
atrain
Tue Mar 15, 2005 10:09 pm


-----------------------------------
poke...

now im stealing ur code...
and u cant prove it!!!
if u try, ill edit this post...

:P mine sucka!!! although its usless for my program anywayz....
ill leave it commented...

-----------------------------------
Bacchus
Wed Mar 16, 2005 12:09 am


-----------------------------------
hm.. not a good thing to say considering the fact that ppl can save screens and such... *hint hint* i hate cheating and will do my part to punish those who do cheat, if u edit ur post, it will be to late. if needed pm me and i will send the shot

-----------------------------------
[Gandalf]
Wed Mar 16, 2005 2:42 pm


-----------------------------------
but then he could say you edited the screenshot...

This would be useful for a game like arknoid?  I forget what the general name for it is...  not pong, not pinball, hmmm...

-----------------------------------
Bacchus
Wed Mar 16, 2005 4:27 pm


-----------------------------------
nah i dont think editing the screenshot would be that good of an excuse, it would be waaay to hard to do that and make it look real. and i think the game ur thinking of is Brix, or Blocks or watever the name is, when you hit the ball into the boxes and they disapear and the point is to get rid of them all

-----------------------------------
mike200015
Wed Mar 16, 2005 5:35 pm


-----------------------------------
arni.. aka atrain.. since u pretty much steal all my stuff.. if ur program looks sumwhat like this ill clearly know u stole.. and also.. u cant really edit the screenshot 2 well.. if u did u would b able to tell that its been edited

-----------------------------------
atrain
Wed Mar 16, 2005 6:49 pm


-----------------------------------
dont worry, ur code has no use in my program anywayz...

im sticking it in comments, just to make my code longer and more sufisticated looking...

-----------------------------------
Cervantes
Wed Mar 16, 2005 7:15 pm


-----------------------------------

 just to make my code longer

You know, for all intents and purposes, shorter code is better, given that it's doing the same thing.

-----------------------------------
MysticVegeta
Sun Mar 20, 2005 11:52 am


-----------------------------------
Our teacher cuts marks for redundant/xtra code... When we ask her why, she reminds us to KISS (Keep It Simple Student)

-----------------------------------
ssr
Sun Mar 20, 2005 9:13 pm


-----------------------------------
clean code man 
I dont even include comments and space in my code to reduce it
and got 2 marks off because of that lol 
btw, I thought the last S was supposed to be stupid lol

-----------------------------------
[Gandalf]
Mon Mar 21, 2005 8:20 pm


-----------------------------------
Alright, if editing doesn't look real then this following screenshot it real.  Notice anything?  Now I can say you both edited your post...

http://img81.exs.cx/img81/3540/editedscreen15zn.jpg

Sorry if its a bit off topic...  :?

*edit* you gotta love all those tabs open  :P

-----------------------------------
Bacchus
Mon Mar 21, 2005 8:39 pm


-----------------------------------
lol proved me wrong :P

-----------------------------------
jamonathin
Wed Mar 23, 2005 7:33 am


-----------------------------------
hey, YOUR TEACHER IS A THIEF ... and a bad one...
