Posted: Sun May 29, 2005 4:42 pm Post subject: (No subject)
I made this version the day after my compsci class started graphics. The teacher was impressed. (I added the Draw.Text, intstr, and offscreenonly later)
code:
View.Set ("graphics: 510, 400; offscreenonly; nobuttonbar")
var x, y, b : int
var font := Font.New ("Serif:24")
for i : 0 .. 510 by 2
Draw.ThickLine (i, 0, i, 300, 2, i div 2)
end for
View.Update
loop
Mouse.Where (x, y, b)
Draw.FillBox (0, 300, maxx, maxy, whatdotcolour (x, y))
Draw.FillBox (245, 345, 300, 375, 0)
Draw.Box (245, 345, 300, 375, 7)
Draw.Text (intstr (whatdotcolour (x, y)), 250, 350, font, 7)
View.Update
exit when b = 1
end loop
Sponsor Sponsor
neufelni
Posted: Mon May 30, 2005 10:44 am Post subject: (No subject)
Pretty impresive, bored_hacker. I think that this is the best one I have seen.
DarkAng
Posted: Mon May 30, 2005 5:12 pm Post subject: (No subject)
wow that blows mine away lol .. nice job .. its short too!
TheOneTrueGod
Posted: Mon May 30, 2005 10:10 pm Post subject: Heres my version...
heres a version I made...
Click to "save" a colour.
code:
setscreen ("graphics:712,512,nobuttonbar")
var clr, x, y, button, num : int := 0
num := 0
for count : 1 .. 512 by 32
for count2 : 1 .. 512 by 32
drawfillbox (count, count2, count + 32, count2 + 32, clr)
clr += 1
end for
end for
loop
mousewhere (x, y, button)
locate (1, 68)
if x < 512 and y < 512 and x > 0 and y > 0 then
put y div 32 + (((x div 32) * 16))
if button = 1 then
num += 1
if num > 14 then
num := 1
end if
drawfillbox (512 + 32, num * 32, 512 + 64, (num * 32) + 32, y div 32 + (((x div 32) * 16)))
locatexy (576 + 64, num * 32)
put y div 32 + (((x div 32) * 16))
delay (100)
end if
end if
end loop
jamonathin
Posted: Tue May 31, 2005 8:04 am Post subject: Re: Heres my version...
TheOneTrueGod wrote:
heres a version I made...
Click to "save" a colour.
Don't you mean, Click to "close program due to programming error"
phuong
Posted: Tue May 31, 2005 11:16 am Post subject: (No subject)
gah.... you guys are going so high tech with this. just look at my SIMPLE color file. ^^
Posted: Tue May 31, 2005 3:14 pm Post subject: Re: Heres my version...
OneTrueGod, here's a little mod of your program so that multiple boxes don't come up if you hold down the mouse.
Turing:
setscreen("graphics:712,512,nobuttonbar") var clr, x, y, button, num :int:=0
num :=0 for count :1.. 512by32 for count2 :1.. 512by32 drawfillbox(count, count2, count + 32, count2 + 32, clr)
clr +=1 endfor endfor loop mousewhere(x, y, button) locate(1, 68) if x < 512and y < 512and x > 0and y > 0then put y div32 + (((x div32)*16)) if button =1then
num +=1 if num > 14then
num :=1 endif drawfillbox(512 + 32, num *32, 512 + 64, (num *32) + 32, y div32 + (((x div32)*16))) locatexy(576 + 64, num *32) put y div32 + (((x div32)*16)) loop mousewhere(x,y,button) exitwhen button =0 endloop endif endif endloop
phuong
Posted: Wed Jun 01, 2005 9:31 am Post subject: (No subject)
so how's my colour file?
Sponsor Sponsor
jamonathin
Posted: Wed Jun 01, 2005 8:19 pm Post subject: (No subject)
phuong wrote:
so how's my colour file?
Its not bad. Just too much code. I've said this before in previous topic such as this, cuz there's like 20 this year on em. Color-guide proggy's should be short and simple.
A colorguide program should be when you're sitting there programming your game, and you need a color, so you hit CTRL + N and juss whip together one in about 5 seconds. It shouldn't be any more than 6-7 lines.
The one I use is only 4
phuong
Posted: Thu Jun 02, 2005 11:03 am Post subject: (No subject)
gah... i'm a newbe. not really actually. i've been in comp. sci. [class] for at least 5 months. well ok that's not that long and i still haven't learnt much. but hey. that's what i could come up with. check out my blackjack program. the topic title is: New Blackjack