Here's the entry challenge for Dark Noobs for me:
Use the right mouse button to draw regular lines
Use the left mouse button to draw the shapes you see on the left
Click texture to bring up a sphere in a window textured with the image you are drawing
Use arrow keys to rotate the sphere
The window can be dragged and closed
sync on : sync rate 200 : cls rgb(255,255,255) : newx=mousex() : newy=mousey()
red=1
for y=0 to 100
for x=0 to 72
ink rgb(r,g,b),0
inc cycle
if cycle=5 then cycle=1
if cycle=4
if red=1
r=r+1
if r=255
r=0
red=0
blue=1
endif
endif
if blue=1
b=b+1
if b=255
b=0
blue=0
green=1
endif
endif
if green=1
g=g+1
if g=255
g=0
green=0
yellow=1
endif
endif
if yellow=1
r=r+1
g=g+1
if g=255 and r=255
g=0
r=0
yellow=0
pink=1
endif
endif
if pink=1
g=g+1
b=b+1
if b=255 and g=255
b=0
g=0
pink=0
purple=1
endif
endif
if purple=1
b=b+1
r=r+1
if b=255 and r=r+1
b=0
r=0
purple=0
white=1
endif
endif
if white=1
b=b+1
g=g+1
r=r+1
if b=255 and g=255 and r=255
b=0
r=0
g=0
white=0
endif
endif
endif
dot x,y
next x
next y
get image 12,0,0,72,100
do
if window>0 then paste image 500,0,0
mx=mousex() : my=mousey()
if wind=0
if mx>=568 and my>=380 then gosub colors
gosub dots
if mode=0 then gosub line
if mode=1 then gosub box
if mode=2 then gosub circle
if mode=3 then gosub ellipse
endif
gosub logo
gosub bline : gosub bbox : gosub bcircle : gosub bellipse
gosub buttons
sync
if window>0 then cls rgb(255,255,255)
loop
bline:
if mx>30 and mx<80 and my>50 and my<100
ink rgb(255,255,0),0
if wind=0
if mouseclick()=1 then mode=0
endif
else
ink 0,0
endif
line 30,50,80,100
return
bbox:
if mx>30 and mx<80 and my>150 and my<200
ink rgb(255,255,0),0
if wind=0
if mouseclick()=1 then mode=1
endif
else
ink 0,0
endif
line 30,150,30,200 : line 30,150,80,150 : line 30,200,80,200 : line 80,150,80,200
return
bcircle:
if mx>30 and mx<80 and my>250 and my<300
ink rgb(255,255,0),0
if wind=0
if mouseclick()=1 then mode=2
endif
else
ink 0,0
endif
circle 55,275,25
return
bellipse:
if mx>30 and mx<80 and my>350 and my<400
ink rgb(255,255,0),0
if wind=0
if mouseclick()=1 then mode=3
endif
else
ink 0,0
endif
ellipse 55,375,15,25
return
dots:
oldx=newx-0.0001
oldy=newy-0.0001
newx=mousex()
newy=mousey()
if mouseclick()=2
ink color,0
line oldx,oldy,newx,newy
endif
return
line:
if lclicked=0
if mouseclick()=1
lx=mousex()
ly=mousey()
lclicked=1
endif
endif
if lclicked=1
if mouseclick()=0
xl=mousex()
yl=mousey()
lclicked=2
endif
endif
if lclicked=2
ink color,0
line lx,ly,xl,yl
lclicked=0
endif
return
box:
if bclicked=0
if mouseclick()=1
bx=mousex()
by=mousey()
bclicked=1
endif
endif
if bclicked=1
if mouseclick()=0
xb=mousex()
yb=mousey()
bclicked=2
endif
endif
if bclicked=2
ink color,0
line bx,by,xb,by : line bx,by,bx,yb : line bx,yb,xb,yb : line xb,by,xb,yb
bclicked=0
endif
return
circle:
if cclicked=0
if mouseclick()=1
cx=mousex()
cy=mousey()
cclicked=1
endif
endif
if cclicked=1
if mouseclick()=0
xc=mousex()
yc=mousey()
sizex=abs(xc-cx)/2
sizey=abs(yc-cy)/2
if sizex>sizey then size=sizex
if sizex<sizey then size=sizey
cclicked=2
endif
endif
if cclicked=2
ink color,0
if cx<xc and cy<yc then circle cx+size,cy+size,size
if cx<xc and cy>yc then circle cx+size,cy-size,size
if cx>xc and cy<yc then circle cx-size,cy+size,size
if cx>xc and cy>yc then circle cx-size,cy-size,size
cclicked=0
endif
return
ellipse:
if eclicked=0
if mouseclick()=1
ex=mousex()
ey=mousey()
eclicked=1
endif
endif
if eclicked=1
if mouseclick()=0
xe=mousex()
ye=mousey()
sizew=abs(xe-ex)/2
sizeh=abs(ye-ey)/2
eclicked=2
endif
endif
if eclicked=2
ink color,0
if ex<xe and ey<ye then ellipse ex+sizew,ey+sizeh,sizew,sizeh
if ex<xe and ey>ye then ellipse ex+sizew,ey-sizeh,sizew,sizeh
if ex>xe and ey<ye then ellipse ex-sizew,ey+sizeh,sizew,sizeh
if ex>xe and ey>ye then ellipse ex-sizew,ey-sizeh,sizew,sizeh
eclicked=0
endif
return
logo:
ink rgb(255,255,255),0 : box 0,0,110,479 : box 294,3,336,12 : box 567,0,639,479
ink rgb(rnd(255),rnd(255),rnd(255)),0 : center text 320,0,"a"
ink rgb(rnd(255),rnd(255),rnd(255)),0 : center text 313,0,"P"
ink rgb(rnd(255),rnd(255),rnd(255)),0 : center text 305,0,"B"
ink rgb(rnd(255),rnd(255),rnd(255)),0 : center text 297,0,"D"
ink rgb(rnd(255),rnd(255),rnd(255)),0 : center text 325,0,"i"
ink rgb(rnd(255),rnd(255),rnd(255)),0 : center text 330,0,"n"
ink rgb(rnd(255),rnd(255),rnd(255)),0 : center text 336,0,"t"
ink 0,0 : line 110,0,110,479 : line 567,0,567,479
paste image 12,568,380
return
colors:
color=point(mx,my)
return
buttons:
if mx>588 and mx<623 and my>153 and my<164
ink rgb(255,0,0),0
center text 605,150,"SAVE"
if wind=0
if mouseclick()=1
if window>0 then gosub closes
get image 300,111,0,566,479
if file exist("DBPaint.bmp")=1 then delete file "DBPaint.bmp"
save image "DBPaint.bmp",300
delete image 300
window=1
endif
endif
else
ink 0,0
center text 605,150,"SAVE"
endif
if mx>577 and mx<634 and my>53 and my<64
ink rgb(255,0,0),0
center text 605,50,"TEXTURE"
if wind=0
if window=0
if mouseclick()=1 then window=1
endif
endif
else
ink 0,0
center text 605,50,"TEXTURE"
endif
if mx>593 and mx<620 and my>253 and my<264
ink rgb(255,0,0),0
center text 605,250,"EXIT"
if wind=0
if mouseclick()=1 then end
endif
else
ink 0,0
center text 605,250,"EXIT"
endif
if window>0
gosub texture
endif
return
closes:
window=0
delete object 1
draw to front
cls rgb(255,255,255)
paste image 500,0,0
backdrop off
return
texture:
if wind=0 then get image 500,0,0,639,479
if window=1
backdrop on
get image 200,111,0,567,479
make object sphere 1,50
texture object 1,200
for x=1 to 256
ink rgb(rr,gg,255),0
line x,1,x,16
rr=rr+1
gg=gg+1
next x
ink rgb(128,128,128),0
line 0,0,257,0 : line 0,0,0,273 : line 0,273,257,273 : line 257,0,257,273 : line 0,17,257,17
box 241,2,254,15
ink 0,0
center text 31,1,"WINDOW"
line 241,2,254,2 : line 241,2,241,15 : line 241,15,254,15 : line 254,2,254,15 : line 241,2,254,15 : line 242,15,254,3
ink rgb(0,0,128),0 : box 1,18,256,272
get image 100,0,0,258,274
window=2
endif
if wind=1
xpos=mousex()-mxpos
ypos=mousey()-mypos
if xpos<=0 then xpos=0
if xpos>=640-258 then xpos=640-258
if ypos<=0 then ypos=0
if ypos>=480-274 then ypos=480-274
endif
if mouseclick()=0 then clicked=0:wind=0
set camera view xpos+1,ypos+18,xpos+257,ypos+273
paste image 100,xpos,ypos
if rightkey()=1 then mmy#=wrapvalue(mmy#-5)
if leftkey()=1 then mmy#=wrapvalue(mmy#+5)
if upkey()=1 then mmx#=wrapvalue(mmx#+5)
if downkey()=1 then mmx#=wrapvalue(mmx#-5)
rotate object 1,mmx#,mmy#,0
draw to back
if mx>xpos and mx<xpos+257 and my>ypos and my<ypos+17
if wind=0
if mx>xpos+240 and mx<xpos+255 and my>ypos+1 and my<ypos+16
if mouseclick()=1 then gosub closes
endif
endif
if window>0
if mouseclick()=1
if clicked=0
wind=1
mxpos=mousex()-xpos
mypos=mousey()-ypos
clicked=1
endif
endif
endif
endif
return