### Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Pages: [1] 2 3 4
1
##### Yabasic / scrolling title display
« on: March 05, 2019 »
Simple stand-alone scroll.

Code: [Select]
`open window 640,512restore bodypartsread bodiesdim parts\$(bodies)dim prices(bodies)dim listed(bodies)for a=1 to bodiesread parts\$(a)read prices(a)read listed(a)next arow=1repeatsetdrawbuf vmvm=1-vmsetdispbuf vmclear windowc=peek("port1")row1=0if and(c,16)<>0 up=1if up=1 u=u+1if u>2 u=2if u=2 up=0if and(c,16)=0 u=0if and(c,64)<>0 down=1if down=1 d=d+1if d>2 d=2if d=2 down=0if and(c,64)=0 d=0if up=1 row=row-1if down=1 row=row+1if row<1 row=1if row>bodies row=bodiesfor a=1 to bodiesif row=a text 20,180,parts\$(a)if row=a thensetrgb 1,0,256,0elsesetrgb 1,256,256,256endiftext 100,a*15-(row*15-15)+165,parts\$(a)text 180,a*15+165,parts\$(a)next asetrgb 1,256,256,256for a=1 to bodiesif row=a thenspace=20elsespace=0endiftext 260+space,a*15+165,parts\$(a)next afor a=1 to bodiesif row=a text 340,a*15+165,">"text 350,a*15+165,parts\$(a)next afor a=1 to bodiesif row=a thentext 430,180,parts\$(a)elserow1=row1+1text 430,row1*15+200,parts\$(a)endifnext auntil (1=0)label bodypartsdata 10data "hand",7,1data "mouth",10,1data "ear",4,1data "leg",9,1data "arm",2,1data "chest",3,0data "elbow",5,0data "knee",8,0data "ankle",1,0data "eye",6,0`
have a yahappy day[/code]

2
##### Yabasic / Letter Colour Assign
« on: July 08, 2018 »
Just something I've wanted to achieve.
An idea I wanted to apply to another program here.

Code: [Select]
`restore wishlistread listdim wish\$(list)for a=1 to listread wish\$(a)next arestore highlightread colsdim letters\$(cols)dim R(cols)dim G(cols)dim B(cols)for c=1 to colsread letters\$(c)read R(c)read G(c)read B(c)next csel=1open window 640,512repeatsetdispbuf vmvm=1-vmsetdrawbuf vmclear windowletter=0row=0c=peek("port1")if and(c,16)>0 scroll=scroll+15if and(c,64)>0 scroll=scroll-15if scroll>0 scroll=0if and(c,128)<>0 left=1if left=1 L=L+1if L>2 L=2if L=2 left=0if and(c,128)=0 L=0if left=1 sel=sel-1if sel<1 sel=3for a=1 to listspace=260/len(wish\$(a))if instr(wish\$(a),"*",0)=0 thenrow=row+1for b=1 to len(wish\$(a))for c=1 to colsif mid\$(wish\$(a),b,1)=letters\$(c) thenletter=letter+1setrgb 1,R(c),G(c),B(c)endifnext cif sel=1 text b*10+10,row*15+scroll,mid\$(wish\$(a),b,1)if sel=2 text b*10-(len(wish\$(a))*10)+260,row*15+scroll,mid\$(wish\$(a),b,1)if sel=3 text b*space,row*15+scroll,mid\$(wish\$(a),b,1)next bendifnext asetrgb 1,256,256,256text 10,(row+1)*15+scroll,"The "+str\$(row)+" listed are the ones I"text 10,(row+2)*15+scroll,"have of the "+str\$(maxnum)+" in my wishlist"text 10,(row+3)*15+scroll,str\$(letter)until (1=0)label wishlistdata 94data "A QUIET PLACE"data "*ACTS OF VIOLENCE"data "AMERICAN PASTORAL"data "ATLANTIC RIM RESURRECTION"data "AVENGERS INFINITY WAR"data "*BALLAD OF LEFTY BROWN. THE"data "*BEAST OF BURDEN"data "*BLACK PANTHER"data "*BRAVEN"data "*BREATHE"data "BROKEN"data "*BUTTERFLIES ARE FREE"data "BUTTERFLY TREE"data "CALL ME BY YOUR NAME"data "CHAOS"data "CHAPPAQUIDDICK"data "CIRCLE OF TWO"data "CITY OF GHOSTS"data "COCAINE GODMOTHER"data "COLD MOON"data "COMMANDO"data "*COMMUTOR. THE"data "DEVIL IN A BLUE DRESS"data "*DOCTOR DETROIT"data "ENDLESS. THE"data "EVERY DAY"data "EXCEPTION. THE"data "*FORGOTTEN. THE"data "FUNHOUSE. THE"data "GAME NIGHT"data "GARAGE SALE MYSTERY"data "GHOSTHOUSE"data "GORGEOUS"data "GRAVE OF THE FIREFLIES"data "GUARDIAN. THE"data "GUERNSEY. THE"data "*GUN SHY"data "HANGMAN"data "HERO. THE"data "HOWARDS END"data "HUMANITY BUREAU. THE"data "*HUNTERS PRAYER"data "I KILL GIANTS"data "*INSIDIOUS THE LAST KEY"data "JOURNEY. THE"data "KNIGHTS OF THE DAMNED"data "LADY BIRD"data "LAST FLAG FLYING"data "LITTLE VAMPIRE. THE"data "LONDON"data "*LOOKING GLASS"data "MARY AND THE WITCHS FLOWER"data "MARY MAGDALENE"data "MEAN MACHINE"data "MECHANIC RESURRECTION"data "MENASHE"data "MERCY. THE"data "MOLLYS GAME"data "MOM AND DAD"data "*MONEY TRAIN"data "*MONSTER FAMILY"data "MOUNTAIN"data "MY LIFE WITHOUT ME"data "*NINE"data "PACIFIC RIM UPRISING"data "PETER RABBIT"data "*PHANTOM THREAD"data "*PRESSURE"data "PROUD MARY"data "RAISING CAIN"data "RAMPAGE"data "READY PLAYER ONE"data "REANIMATOR TRILOGY"data "RECALL. THE"data "*RED SPARROW"data "RENEGADES"data "RETURN TO MONTAUK"data "REVOLVER"data "RUROUNI KENSHIN"data "RWBY"data "SAM I BLOOD"data "SECRET WINDOW"data "SILENT RUNNING"data "SINGULARITY"data "SNOWWHITE A TALE OF TERROR"data "STOP MAKING SENSE"data "STRANGERS PREY AT NIGHT. THE"data "SUICIDE SQUAD HELL TO PAY"data "TEACHER. THE"data "TOP GUN"data "TURN IT UP"data "TWELVE STRONG"data "VIEW FROM THE TOP"data "WEST AND THE RUTHLESS. THE"data "WILD CARD"data "WINCHESTER"label highlightdata 26data "A",255,125,5data "B",50,150,50data "C",175,75,145data "D",95,30,210data "E",255,255,5data "F",150,175,185data "G",210,115,30data "H",180,240,165data "I",255,5,5data "J",250,70,10data "K",195,40,10data "L",100,75,30data "M",180,180,180data "N",85,170,225data "O",5,255,5data "P",165,105,105data "Q",230,230,130data "R",255,200,200data "S",255,5,255data "T",80,80,205data "U",5,5,255data "V",200,150,35data "W",240,15,70data "X",15,15,90data "Y",65,140,250data "Z",45,160,85`
Have A Yahappy Day.

3
##### Yabasic / Another Colour Select/Randomizer
« on: April 24, 2018 »
D-Pad to select, Page Up to Randomize.

Instead of a 1+1/1-1 count, data has been used for chosen numbers.
In this program, there is 32, 16 and 8 counts, changed by the line - restore value*. * is 1, 2 or 3.

Code: [Select]
`restore RGBread setsdim Rset\$(sets)dim Rnos(sets)for a=1 to setsread Rset\$(a)read Rnos(a)next arestore values3read colsdim Rv(cols)dim R(cols)for a=1 to colsread Rv(a)next asel=3for a=1 to selR(a)=int(cols/2)next aopen window 640,512repeatsetdispbuf vmvm=1-vmsetdrawbuf vmclear windowc=peek("port1")if and(c,128)<>0 left=1if left=1 L=L+1if L>2 L=2if L=2 left=0if and(c,128)=0 L=0if and(c,32)<>0 right=1if right=1 R=R+1if R>2 R=2if R=2 right=0if and(c,32)=0 R=0if left=1 sel=sel-1if right=1 sel=sel+1if sel<1 sel=1if sel>sets sel=setsif and(c,16)<>0 up=1if up=1 U=U+1if U>2 U=2if U=2 up=0if and(c,16)=0 U=0if and(c,64)<>0 down=1if down=1 D=D+1if D>2 D=2if D=2 down=0if and(c,64)=0 D=0if and(c,1)<>0 slide=1if slide=1 S=S+1if S>2 S=2if S=2 slide=0if and(c,1)=0 S=0for a=1 to setsif sel=a then setrgb 1,256,128,0fill rectangle 75*a+150,138 to 75*a+(len(Rset\$(a))*10)+150,156endifif sel=a thensetrgb 1,0,128,0elsesetrgb 1,256,256,256endiftext 75*a+150,150,Rset\$(a)next afor a=1 to sets rem selif sel=a and up=1 R(a)=R(a)+1if sel=a and down=1 R(a)=R(a)-1if R(a)<1 R(a)=1if R(a)>cols R(a)=colsfor b=1 to colsif R(a)=b Rnos(a)=Rv(b)next bsetrgb 1,256,256,256text 75*a+150,165,str\$(Rnos(a))next aif slide=1 thenfor a=1 to selR(a)=int(ran(cols))+1next aendiffor a=1 to selsetrgb 1,Rnos(1),Rnos(2),Rnos(3)fill rectangle 200,200 to 450,450next auntil (1=0)label RGBdata 3data "RED",0data "GREEN",0data "BLUE",0label values1data 9data 0,32,64,96,128,160,192,224,256label values2data 16data 0,16,32,48,80,96,112,128,144data 160,176,192,208,224,240,256label values3data 31data 0,8,16,24,32,40,48,56,80,88data 96,104,112,120,128,136,144data 152,160,168,176,184,192,200data 208,216,224,232,240,248,256`

4
##### Yabasic / Prime Numbers
« on: January 08, 2018 »
Couldn't find any samples of working out prime numbers
So here's mine.

Code: [Select]
`open window 640,512setrgb 1,200,200,200space=12spaces=int(490/space)lines=0gap=0z=3500repeatlines=0gap=0number=0for y=1 to znum=0for x=1 to yif frac(y/x)=0 num=num+1next xif num<3 thenlines=lines+1number=number+1text 10+gap,lines*space,str\$(y) endifif lines>spaces then   gap=gap+50   lines=0   endifnext ytext gap,(lines+1)*space,"("+str\$(number)+")"until (1=0)`

5
##### Yabasic / display problem fixed
« on: November 05, 2017 »
It's been a while, but I had to show this one.

The end result of this might not be of use to most people,
but the programming might. (resistor paralleling values)
My problem was displaying more inputs than I needed,
but only using two or more of those inputs.
All in a simple program. D-pad to navigate.

Code: [Select]
`restore resistorsread setsdim Rset\$(sets)dim Rnos(sets)dim R(sets)for a=1 to setsread Rset\$(a)read Rnos(a)R(a)=1next arestore valuesread resistordim Rv(resistor)for a=1 to resistorread Rv(a)next asel=1open window 640,512repeatanswer=0setdispbuf vmvm=1-vmsetdrawbuf vmclear windowc=peek("port1")if and(c,128)<>0 left=1if left=1 L=L+1if L>2 L=2if L=2 left=0if and(c,128)=0 L=0if and(c,32)<>0 right=1if right=1 R=R+1if R>2 R=2if R=2 right=0if and(c,32)=0 R=0if left=1 sel=sel-1if right=1 sel=sel+1if sel<1 sel=1if sel>8 sel=8if and(c,16)<>0 up=1if up=1 U=U+1if U>2 U=2if U=2 up=0if and(c,16)=0 U=0if and(c,64)<>0 down=1if down=1 D=D+1if D>2 D=2if D=2 down=0if and(c,64)=0 D=0for a=1 to setsif sel=a thensetrgb 1,0,256,0elsesetrgb 1,256,256,256endiftext 50*a+50,150,Rset\$(a)next afor a=1 to selif sel=a and up=1 R(a)=R(a)+1if sel=a and down=1 R(a)=R(a)-1if R(a)<1 R(a)=1if R(a)>5 R(a)=5for b=1 to resistorif R(a)=b Rnos(a)=Rv(b)next bsetrgb 1,256,256,256text 50*a+50,165,str\$(Rnos(a))next afor a=1 to selanswer=answer+1/Rnos(a)next atext 500,165,str\$(1/answer)until (1=0)label resistorsdata 8data "R1",0data "R2",0data "R3",0data "R4",0data "R5",0data "R6",0data "R7",0data "R8",0label valuesdata 5data 2.2,3.3,8,15,39 `

6
##### Yabasic / Basic San Serif Font
« on: August 07, 2016 »
I bothered to do a letter-only upper case font.
Some of the letters could be a bit more pleasant looking - which I'll probably fix - later.

The working part of the program was done for me in another post.

Code: [Select]
`a\$="i bothered to do a basic letter only upper"a\$=a\$+" case font for title headings in pstwo"a\$=a\$+" abcde fghij klmno pqrst uvwxyz"LoadFont()open window 640,512repeatsetdrawbuf vmvm=1-vmsetdispbuf vmclear windowx=20y=20for a=1 to len(a\$)PrintCharacter(mid\$(a\$,a,1),x,y)x=x+CharacterWidthif x>500 and mid\$(a\$,a,1)=" " theny=y+CharacterHeightx=CharacterWidthendifnext auntil (1=0)sub LoadFont()MAX_CHARACTERS=256dim Start(MAX_CHARACTERS)dim Count(MAX_CHARACTERS)dim x1(1),y1(1),x2(1),y2(1),x3(1),y3(1)read NumCharactersread CharacterWidthread CharacterHeightTotalLines=1for ch=1 to NumCharactersread Ascii\$read NumLinesAscii = asc(lower\$(Ascii\$))Start(Ascii) = TotalLinesCount(Ascii) = NumLinesfor l=1 to NumLinesredim x1(TotalLines),y1(TotalLines)redim x2(TotalLines),y2(TotalLines)redim x3(TotalLines),y3(TotalLines)read x1(TotalLines),y1(TotalLines)read x2(TotalLines),y2(TotalLines)read x3(TotalLines),y3(TotalLines)TotalLines = TotalLines + 1next lnext chend subsub PrintCharacter(char\$,x,y)ch = asc(mid\$(char\$,1,1))for i=Start(ch) to Start(ch)+Count(ch)-1fill triangle x+x1(i),y+y1(i) to x+x2(i),y+y2(i) to x+x3(i),y+y3(i)next iend subdata 26 rem numcharactersdata 27 rem characterwidthdata 35 rem characterheightdata "a",8data 9,0,15,0,6,9data 15,0,18,9,6,9data 6,9,12,9,6,27data 6,9,6,27,0,27data 12,9,18,9,18,27data 18,9,24,27,18,27data 15,18,17,24,7,24data 9,18,15,18,7,24data "b",29data 0,0,6,0,0,27data 6,0,6,27,0,27data 6,0,9,6,6,6data 6,0,9,0,9,6data 9,0,12,1,9,6data 12,1,14,3,9,6data 14,3,10,7,9,6data 14,3,15,5,10,7data 15,5,16,7,10,7data 10,7,16,7,16,9data 10,7,16,9,10,9data 10,9,16,9,15,11data 10,9,15,11,13,13data 10,9,13,13,9,10data 9,10,13,13,9,16data 6,10,9,10,9,16data 6,10,9,16,6,16data 13,13,11,17,9,16data 13,13,16,15,11,17data 16,15,17,17,11,17data 11,17,17,17,17,20data 11,17,17,20,11,20data 11,20,17,20,16,22data 11,20,16,22,14,25data 11,20,14,25,12,26data 11,20,12,26,9,21data 9,21,12,26,9,27data 6,21,9,21,9,27data 6,21,9,27,6,27data "c",30data 17,6,18,9,12,9data 11,7,17,6,12,9data 16,4,17,6,11,7data 16,4,11,7,10,6data 13,1,16,4,10,6data 10,0,13,1,10,6data 8,0,10,0,10,6data 8,0,10,6,8,6data 5,1,8,0,8,6data 5,1,8,6,2,4data 2,4,8,6,7,8data 2,4,7,8,1,6data 1,6,7,8,6,9data 1,6,6,9,0,9data 0,9,6,9,0,18data 6,9,6,18,0,18data 0,18,6,18,1,21data 6,18,7,19,1,21data 1,21,7,19,2,23data 7,19,5,26,2,23data 7,19,8,20,5,26data 8,20,8,27,5,26data 8,20,10,20,8,27data 10,20,10,27,8,27data 10,20,13,26,10,27data 11,19,13,26,10,20data 11,19,16,23,13,26data 11,19,17,21,16,23data 12,18,17,21,11,19data 12,18,18,18,17,21data "d",20data 0,0,10,0,0,6data 10,0,10,6,0,6data 10,0,13,1,10,6data 13,1,16,4,10,6data 16,4,11,7,10,6data 16,4,17,6,11,7data 17,6,12,9,11,7data 17,6,18,9,12,9data 12,9,18,9,18,18data 12,9,18,18,12,18data 12,18,18,18,17,21data 12,18,17,21,11,20data 11,20,17,20,16,23data 11,20,16,23,10,21data 10,21,16,23,13,26data 10,21,13,26,10,27data 0,21,10,21,10,27data 0,21,10,27,0,27data 6,6,6,21,0,21data 0,6,6,6,0,21data "e",8data 0,0,18,0,0,6data 18,0,18,6,0,6data 6,10,15,10,6,16data 15,10,15,16,6,16data 0,6,6,6,6,21data 0,6,6,21,0,21data 0,21,18,21,0,27data 18,21,18,27,0,27data "f",6data 0,0,18,0,0,6data 18,0,18,6,0,6data 6,10,15,10,6,16data 15,10,15,16,6,16data 0,6,6,6,6,27data 0,6,6,27,0,27data "g",34data 17,6,18,9,12,9data 11,7,17,6,12,9data 16,4,17,6,11,7data 16,4,11,7,10,6data 13,1,16,4,10,6data 10,0,13,1,10,6data 8,0,10,0,10,6data 8,0,10,6,8,6data 5,1,8,0,8,6data 5,1,8,6,2,4data 2,4,8,6,7,8data 2,4,7,8,1,6data 1,6,7,8,6,9data 1,6,6,9,0,9data 0,9,6,9,0,18data 6,9,6,17,0,18data 0,18,6,17,1,21data 6,17,7,19,1,21data 1,21,7,19,2,23data 7,19,5,26,2,23data 7,19,8,20,5,26data 8,20,8,27,5,26data 8,20,10,20,8,27data 10,20,10,27,8,27data 10,20,13,26,10,27data 11,19,13,26,10,20data 11,19,16,23,13,26data 11,19,17,21,16,23data 12,17,17,21,11,19data 12,17,18,18,17,21data 18,13,18,18,12,18data 12,13,18,13,12,18data 12,13,12,17,9,17data 9,13,12,13,9,17data "h",6data 0,0,6,0,0,27data 6,0,6,27,0,27data 6,10,12,10,6,16data 12,10,12,16,6,16data 12,0,18,0,12,27data 18,0,18,27,12,27data "i",6data 3,0,17,0,3,6data 17,0,17,6,3,6data 7,6,13,6,7,21data 13,6,13,21,7,21data 3,21,17,21,3,27data 17,21,17,27,3,27data "j",18data 0,18,6,18,1,21data 6,17,7,19,1,21data 1,21,7,19,2,23data 7,19,5,26,2,23data 7,19,8,20,5,26data 8,20,8,27,5,26data 8,20,10,20,8,27data 10,20,10,27,8,27data 10,20,13,26,10,27data 11,19,13,26,10,20data 11,19,16,23,13,26data 11,19,17,21,16,23data 12,18,17,21,11,19data 12,18,18,18,17,21data 6,0,18,0,6,6data 18,0,18,6,6,6data 12,6,18,6,12,18data 18,6,18,18,12,18data "k",6data 0,0,6,0,0,27data 6,0,6,27,0,27data 16,0,24,0,6,10data 24,0,6,18,6,10data 11,13,24,27,16,27data 11,13,16,27,7,17data "l",4data 3,0,9,0,3,27data 9,0,9,27,3,27data 9,21,21,21,9,27data 21,21,21,27,9,27data "m",9data 0,0,6,0,0,27data 6,0,6,27,0,27data 6,0,12,18,6,18data 6,18,12,18,9,27data 12,18,15,27,9,27data 12,18,18,18,15,27data 18,0,18,18,12,18data 18,0,24,27,18,27data 18,0,24,0,24,27data "n",6data 0,0,6,0,0,27data 6,0,6,27,0,27data 6,0,15,16,6,11data 6,11,15,16,15,27data 15,0,21,0,15,27data 21,0,21,27,15,27data "o",32data 17,6,18,9,12,9data 11,7,17,6,12,9data 16,4,17,6,11,7data 16,4,11,7,10,6data 13,1,16,4,10,6data 10,0,13,1,10,6data 8,0,10,0,10,6data 8,0,10,6,8,6data 5,1,8,0,8,6data 5,1,8,6,2,4data 2,4,8,6,7,8data 2,4,7,8,1,6data 1,6,7,8,6,9data 1,6,6,9,0,9data 0,9,6,9,0,18data 6,9,6,18,0,18data 0,18,6,18,1,21data 6,18,7,19,1,21data 1,21,7,19,2,23data 7,19,5,26,2,23data 7,19,8,20,5,26data 8,20,8,27,5,26data 8,20,10,20,8,27data 10,20,10,27,8,27data 10,20,13,26,10,27data 11,19,13,26,10,20data 11,19,16,23,13,26data 11,19,17,21,16,23data 12,18,17,21,11,19data 12,18,18,18,17,21data 18,9,18,18,12,18data 12,9,18,9,12,18data "p",18data 0,0,6,0,0,27data 6,0,6,27,0,27data 6,0,9,6,6,6data 6,0,9,0,9,6data 9,0,12,0,9,6data 12,0,15,2,9,6data 15,2,12,8,9,6data 15,2,17,4,12,8data 17,4,18,8,12,8data 12,8,18,8,12,10data 18,8,18,10,12,10data 12,10,18,10,17,14data 12,10,17,14,15,16data 12,10,15,16,9,12data 9,12,15,16,12,18data 9,12,12,18,9,18data 9,12,9,18,6,18data 6,12,9,12,6,18data "q",34data 17,6,18,9,12,9data 11,7,17,6,12,9data 16,4,17,6,11,7data 16,4,11,7,10,6data 13,1,16,4,10,6data 10,0,13,1,10,6data 8,0,10,0,10,6data 8,0,10,6,8,6data 5,1,8,0,8,6data 5,1,8,6,2,4data 2,4,8,6,7,8data 2,4,7,8,1,6data 1,6,7,8,6,9data 1,6,6,9,0,9data 0,9,6,9,0,18data 6,9,6,18,0,18data 0,18,6,18,1,21data 6,18,7,19,1,21data 1,21,7,19,2,23data 7,19,5,26,2,23data 7,19,8,20,5,26data 8,20,8,27,5,26data 8,20,10,20,8,27data 10,20,10,27,8,27data 10,20,13,26,10,27data 11,19,13,26,10,20data 11,19,16,23,13,26data 11,19,17,21,16,23data 12,18,17,21,11,19data 12,18,18,18,17,21data 18,9,18,18,12,18data 12,9,18,9,12,18data 9,16,20,25,17,28data 9,16,17,28,8,18data "r",19data 0,0,6,0,0,27data 6,0,6,27,0,27data 6,0,9,6,6,6data 6,0,9,0,9,6data 9,0,12,0,9,6data 12,0,15,2,9,6data 15,2,12,8,9,6data 15,2,17,4,12,8data 17,4,18,8,12,8data 12,8,18,8,12,10data 18,8,18,10,12,10data 12,10,18,10,17,14data 12,10,17,14,15,16data 12,10,15,16,9,12data 9,12,15,16,12,18data 9,12,12,18,9,18data 9,12,9,18,6,18data 6,12,9,12,6,18data 13,13,19,27,12,27data 13,13,12,27,8,16data "s",38data 18,7,18,9,12,9data 16,3,18,7,12,9data 16,3,12,9,11,7data 14,1,16,3,11,7data 14,1,11,7,10,6data 10,0,14,1,10,6data 8,0,10,0,10,6data 8,0,10,6,8,6data 4,1,8,0,8,6data 4,1,8,6,6,7data 4,1,6,7,2,3data 2,3,6,7,0,6data 0,6,6,7,0,10data 6,7,6,9,0,10data 0,10,6,9,2,13data 6,9,4,15,2,13data 6,9,8,10,4,15data 8,10,8,16,4,15data 8,10,10,10,8,16data 10,10,10,16,8,16data 10,10,14,11,10,16data 14,11,12,17,10,16data 14,11,16,13,12,17data 16,13,18,16,12,17data 12,17,18,16,18,21data 12,17,18,21,12,20data 12,20,18,21,16,24data 12,20,16,24,14,26data 10,21,12,20,14,26data 10,21,14,26,10,27data 10,21,10,27,8,27data 8,21,10,21,8,27data 8,21,8,27,4,26data 7,20,8,21,4,26data 7,20,4,26,2,24data 6,18,7,20,2,24data 6,18,2,24,0,20data 0,18,6,18,0,20data "t",4data 3,0,21,0,3,6data 21,0,21,6,3,6data 9,6,15,6,9,27data 15,6,15,27,9,27data "u",18data 0,0,6,0,0,18data 6,0,6,18,0,18data 0,18,6,18,0,20data 6,18,2,24,0,20data 6,18,7,20,2,24data 7,20,4,26,2,24data 7,20,8,21,4,26data 8,21,8,27,4,26data 8,21,10,21,8,27data 10,21,10,27,8,27data 10,21,14,26,10,27data 10,21,11,20,14,26data 11,20,16,24,14,26data 12,18,16,24,11,20data 12,18,18,20,16,24data 12,18,18,18,18,20data 18,0,18,18,12,18data 12,0,18,0,12,18data "v",7data 0,0,6,0,6,18data 6,0,12,18,6,18data 6,18,12,18,9,27data 12,18,15,27,9,27data 12,18,18,18,15,27data 18,0,18,18,12,18data 18,0,24,0,18,18data "w",8data 0,0,6,0,6,27data 6,0,12,27,6,27data 11,7,12,27,6,27data 11,7,16,7,12,27data 11,7,16,7,16,27data 16,7,21,27,16,27data 21,0,21,27,16,27data 21,0,27,0,21,27data "x",4data 0,0,6,0,16,27data 6,0,22,27,16,27data 16,0,6,27,0,27data 16,0,22,0,6,27data "y",6data 0,0,6,0,8,18data 6,0,14,18,8,18data 16,0,14,18,8,18data 16,0,22,0,14,18data 8,18,14,18,8,27data 14,18,14,27,8,27data "z",6data 0,0,18,6,0,6data 0,0,18,0,18,6data 11,6,7,21,0,21data 11,6,18,6,7,21data 0,21,18,21,18,27data 0,21,18,27,0,27`

7
##### Yabasic / Over-lap Colour Mixing
« on: June 21, 2016 »
I've always wanted to have different coloured squares moving around and creating
new colours during over-laps of two or more. No knowledge for full interaction with
any and all other squares - only two and one number apart - but the moving
program sample of two squares shows what I mean and an obvious colour mix.

Code: [Select]
`open window 640,512x1=260y1=200r1=256g1=256b1=0x2=380y2=310r2=256g2=0b2=0m=1repeatsetdrawbuf vmvm=1-vmsetdispbuf vmclear windowif x2-x1<50 or x2-x1>210 m=-mx1=x1+my1=y1+mx2=x2-my2=y2-msetrgb 1,r1,g1,b1fill rectangle x1-100,y1-100 to x1+100,y1+100setrgb 1,r2,g2,b2fill rectangle x2-100,y2-100 to x2+100,y2+100setrgb 1,256,256,256if x2-x1<200 thencircle x2-100,y1+100,5circle x1+100,y2-100,5endifsetrgb 1,(r1+r2)/2,(g1+g2)/2,(b1+b2)/2if x2-x1<200 fill rectangle x2-100,y1+100 to x1+100,y2-100 rem doesn't work with yellow/bluesetrgb 1,0,0,0text x1-90,y1-80,"box1"text x2+50,y2+80,"box2"setrgb 1,256,256,256until (1=0)`

8
##### Yabasic / Letter colouring and count
« on: May 10, 2016 »
vowels only and sometimes 'y'.

Code: [Select]
`restore smallwordsread maxnumdim word\$(maxnum)for a=1 to maxnumread word\$(a)next aopen window 640,512repeatsetdrawbuf vmvm=1-vmsetdispbuf vmclear windowrow=0col=0a1=0e1=0i1=0o1=0u1=0y1=0for a=1 to maxnumrow=row+1if row>31 thencol=col+39row=1endiffor b=1 to len(word\$(a))setrgb 1,256,256,256a\$=mid\$(word\$(a),b,1)if a\$="A" setrgb 1,256,0,0if a\$="A" a1=a1+1if a\$="Y" setrgb 1,256,96,0if a\$="Y" y1=y1+1if a\$="E" setrgb 1,256,256,0if a\$="E" e1=e1+1if a\$="I" setrgb 1,0,256,0if a\$="I" i1=i1+1if a\$="O" setrgb 1,0,0,256if a\$="O" o1=o1+1if a\$="U" setrgb 1,256,0,256if a\$="U" u1=u1+1text b*10+col,row*16,mid\$(word\$(a),b,1)next bnext asetrgb 1,256,256,256text 10,510,str\$(a1)+" A's/"text 90,510,str\$(e1)+" E's/"text 170,510,str\$(i1)+" I's/"text 250,510,str\$(o1)+" O's/"text 330,510,str\$(u1)+" U's/"text 410,510,str\$(y1)+" Y's in this list"until (1=0)label smallwordsdata 496data "ACE","ACT","ADD","AGE","AGO","AID","AIL","AIM","AIR","ALE"data "ALL","ALP","AMP","AND","ANT","ANY","APE","APT","ARC","ARE"data "ARK","ARM","ART","ASH","ASK","ASP","ASS","ATE","AVE","AWE"data "AWL","AWN","AXE","AYE","BAD","BAG","BAN","BAR","BAT","BAY"data "BED","BEE","BEG","BET","BIB","BID","BIG","BIN","BIT","BOA"data "BOB","BOG","BOO","BOP","BOW","BOX","BOY","BRA","BUD","BUG"data "BUM","BUN","BUR","BUS","BUT","BUY","BYE","CAD","CAM","CAN"data "CAP","CAR","CAT","COB","COD","COG","CON","COP","COT","COW"data "COY","CRY","CUB","CUD","CUE","CUP","CUR","CUT","DAB","DAG"data "DAM","DAY","DEW","DID","DIE","DIG","DIM","DIN","DIP","DOE"data "DON","DOT","DRY","DUB","DUD","DUE","DUG","DUO","DUX","DYE"data "EAR","EAT","EEK","EFT","EGG","EGO","EKE","ELF","ELK","ELM"data "EMU","END","EON","ERA","ERR","EWE","EYE","FAB","FAD","FAG"data "FAN","FAR","FAT","FED","FEE","FEW","FIB","FIG","FIN","FIR"data "FIT","FIX","FLU","FLY","FOB","FOE","FOG","FOR","FOX","FRY"data "FUN","FUR","GAG","GAL","GAP","GAS","GAY","GEE","GEL","GEM"data "GET","GIG","GIN","GIT","GNU","GOB","GOD","GOO","GOT","GUM"data "GUN","GUT","GUY","GYM","HAD","HAG","HAM","HAS","HAT","HAY"data "HEM","HEN","HER","HEW","HEX","HEY","HID","HIM","HIP","HIS"data "HIT","HOB","HOE","HOG","HOP","HOT","HOW","HUB","HUE","HUG"data "HUH","HUM","HUT","ICE","ICY","IDE","IFS","ILK","INK","INN"data "INS","ION","IRE","IRK","ITS","IVY","JAB","JAG","JAM","JAR"data "JAW","JET","JEW","JIB","JIG","JOB","JOG","JOT","JOY","JUG"data "JUT","KEA","KEF","KEG","KEY","KID","KIN","KIP","KIT","LAB"data "LAD","LAG","LAP","LAW","LAY","LEA","LED","LEE","LEG","LEI"data "LET","LEW","LID","LIE","LIP","LIT","LOB","LOG","LOO","LOP"data "LOT","LOW","LUG","LUX","MAD","MAN","MAP","MAR","MAT","MAX"data "MAY","MEN","MET","MID","MIX","MOA","MOB","MOM","MOO","MOP"data "MOW","MUD","MUG","MUM","NAB","NAG","NAP","NAY","NET","NEW"data "NIB","NIL","NIP","NIT","NOB","NOD","NOG","NON","NOR","NOT"data "NOW","NUB","NUN","NUT","OAF","OAK","OAR","OAT","ODD","ODE"data "OFF","OFT","OHM","OIL","OLD","ONE","OPT","ORB","ORE","OUR"data "OUT","OWE","OWL","OWN","PAD","PAL","PAN","PAR","PAT","PAW"data "PAY","PEA","PEE","PEG","PEN","PET","PEW","PIE","PIG","PIN"data "PIP","PIT","PLY","POD","POP","POT","POX","PRY","PUB","PUD"data "PUG","PUN","PUP","PUS","PUT","PYE","RAG","RAM","RAN","RAP"data "RAT","RAW","RAY","RED","RIB","RID","RIG","RIM","RIP","ROB"data "ROD","ROE","ROT","ROW","RUB","RUE","RUG","RUM","RUN","RUT"data "RYE","SAC","SAD","SAG","SAM","SAN","SAP","SAT","SAW","SAY"data "SEA","SEE","SET","SEW","SEX","SHE","SHY","SIN","SIP","SIR"data "SIT","SIX","SKI","SKY","SLY","SOB","SOD","SON","SOW","SOY"data "SPA","SPY","STY","SUB","SUD","SUE","SUM","SUN","TAB","TAD"data "TAG","TAN","TAP","TAR","TAX","TEA","TEE","TEN","THE","THY"data "TIC","TIE","TIN","TIP","TIT","TOE","TOG","TON","TOO","TOP"data "TOT","TOW","TOY","TRY","TUB","TUG","TUI","TUM","TUP","TUT"data "TUX","TWO","UPS","URE","USE","UTE","VAN","VAT","VEE","VET"data "VEX","VIA","VIE","VIM","VOW","WAD","WAG","WAR","WAS","WAX"data "WAY","WEB","WED","WEE","WET","WHO","WHY","WIG","WIN","WIT"data "WOE","WOK","WON","WRY","YAK","YAM","YAP","YEN","YES","YET"data "YOB","YOU","ZAP","ZIP","ZIT","ZOO"`

9
##### Yabasic / manual letter jumble
« on: June 10, 2015 »
application for single activation button push
arrow keys to move high-lighted letter
'END' key to change high-lighted letter

Code: [Select]
`a\$="DBFINTERACTIVE"open window 640,512word=len(a\$)cen=(620-(word*20))/2dim x(word)dim y(word)for a=1 to wordx(a)=a*20+ceny(a)=260next alite=1repeatc=peek("port1")setdrawbuf vmvm=1-vmsetdispbuf vmclear windowif and(c,8196)<>0 letter=1if letter=1 L=L+1if L>2 L=2if L=2 letter=0if and(c,8196)=0 L=0if letter=1 lite=lite+1if lite>word lite=1if and(c,16)<>0 up=1if up=1 u=u+1if u>2 u=2if u=2 up=0if and(c,16)=0 u=0if and(c,64)<>0 down=1if down=1 d=d+1if d>2 d=2if d=2 down=0if and(c,64)=0 d=0if and(c,128)<>0 left=1if left=1 l=l+1if l>2 l=2if l=2 left=0if and(c,128)=0 l=0if and(c,32)<>0 right=1if right=1 r=r+1if r>2 r=2if r=2 right=0if and(c,32)=0 r=0for a=1 to wordif lite=a thenif up=1 y(a)=y(a)-20if down=1 y(a)=y(a)+20if left=1 x(a)=x(a)-20if right=1 x(a)=x(a)+20endifif lite=a thensetrgb 1,0,256,0elsesetrgb 1,256,256,256endiftext x(a),y(a),mid\$(a\$,a,1)next auntil (1=0)`
have a yahappy day

10
##### Yabasic / single action button push
« on: June 07, 2015 »
moves a simple object around the screen using arrow keys
one action, per button push, at a time

Code: [Select]
`open window 640,512x=320y=256repeatsetdrawbuf vmvm=1-vmsetdispbuf vmclear windowc=peek("port1")if and(c,16)<>0 up=1if up=1 u=u+1if u>2 u=2if u=2 up=0if and(c,16)=0 u=0if and(c,64)<>0 down=1if down=1 d=d+1if d>2 d=2if d=2 down=0if and(c,64)=0 d=0if and(c,128)<>0 left=1if left=1 l=l+1if l>2 l=2if l=2 left=0if and(c,128)=0 l=0if and(c,32)<>0 right=1if right=1 r=r+1if r>2 r=2if r=2 right=0if and(c,32)=0 r=0if up=1 y=y-50if down=1 y=y+50if left=1 x=x-50if right=1 x=x+50if x<25 x=25if x>615 x=615if y<25 y=25if y>485 y=485rectangle x-25,y-25 to x+25,y+25until (1=0)`

11
##### Yabasic / nutting out starfield
« on: May 31, 2015 »
here is left to right (my head hurts)
I'll post towards viewer version (much) later

Code: [Select]
`open window 640,512starfield=100dim x(starfield)dim y(starfield)dim z(starfield)for a=1 to starfieldx(a)=ran(620)+10y(a)=ran(490)+10z(a)=ran(4)+0.2next arepeatsetdrawbuf vmvm=1-vmsetdispbuf vmclear windowfor a=1 to starfieldx(a)=x(a)+z(a)fill circle x(a),y(a),z(a)if x(a)>640 x(a)=0next auntil (1=0)`

12
##### Yabasic / Maze
« on: December 27, 2014 »
It's not a true maze, but it is a maze like pattern.

Code: [Select]
`open window 640,512 rem >.blox=800dim x(blox)dim y(blox)dim r(blox)for a=1 to bloxr(a)=ran(4) rem or 3 or 2next arepeatsetdrawbuf vmvm=1-vmsetdispbuf vmclear windowfor a=1 to bloxxx=xx+1if xx>32 thenxx=1yy=yy+1endifif yy>25 yy=1x(a)=xx*20y(a)=yy*20if r(a)<.7 line x(a),y(a) to x(a)+20,y(a)if r(a)>.6 and r(a)<1.3 line x(a),y(a) to x(a),y(a)-20if r(a)>1.2 and r(a)<2.9 line x(a),y(a) to x(a)-20,y(a)if r(a)>2.8 line x(a),y(a) to x(a),y(a)+20next auntil(1=0)`

13
##### General chat / Are there people like this here?
« on: March 18, 2014 »

article, top right-hand of page, click on page to expand.

-altered

14
##### Yabasic / Yet Another Matrix
« on: February 09, 2014 »
I've made other versions - this is better.

Code: [Select]
`open window 640,512mx=50my=42dim scr(mx,my)for y=0 to myfor x=0 to mxscr(x,y)=int(ran(96)+33)next xnext yms=40dim sx(ms)dim sy(ms)for a=1 to mssx(a)=int(ran(mx))sy(a)=int(ran(my))next arepeatsetdispbuf vmvm=1-vmsetdrawbuf vmfor s=1 to msx=sx(s)y=sy(s)setrgb 1,0,255,0gosub lettery=y-1setrgb 1,0,200,0gosub lettery=y-1setrgb 1,0,150,0gosub lettery=y-1setrgb 1,0,0,0fill rect x*12.8-1,y*12.8+4 to x*12.8+12,y*12.8-10setrgb 1,0,70,0gosub lettery=y-24setrgb 1,0,0,0fill rect x*12.8-1,y*12.8+4 to x*12.8+12,y*12.8-10next sfor s=1 to msif int(ran(5)+1)=1 sy(s)=sy(s)+1if sy(s)>my+25 thensy(s)=0sx(s)=int(ran(mx))finext suntil (1=0)label letterif y<0 or y>my returnc=scr(x,y)text x*12.8,y*12.8,chr\$(c)return`

15
##### Yabasic / Random Coloured Line Star
« on: January 27, 2014 »
Another from the archives. Down, D-pad to change.

Code: [Select]
`open window 640,512ang=pi/180points=30skip=int(ran(points-1)/2)+1radius=int(ran(75))+100dim r(points)dim g(points)dim b(points)for point=1 to pointsr(point)=ran(256)g(point)=ran(256)b(point)=ran(256)next pointx=320 y=256 repeatsetdrawbuf vmvm=1-vmsetdispbuf vmclear windowgo=go+1if go>10 go=10c=peek("port1")if and(c,16384)>0 and go=10 thengo=1points=int(ran(27))+3 skip=int(ran(points/2))+1radius=int(ran(75))+100 for point=1 to pointsr(point)=ran(256)g(point)=ran(256)b(point)=ran(256)next pointendiffor point=1 to pointsdir=360/pointsx1=cos(dir*ang*point)*radius+xy1=sin(dir*ang*point)*radius+y  x2=cos(dir*ang*(point+skip))*radius+xy2=sin(dir*ang*(point+skip))*radius+y setrgb 1,r(point),g(point),b(point)line x1,y1 to x2,y2next pointsetrgb 1,256,256,256text 20,20,"   points used: "+str\$(points)text 20,40,"points skipped: "+str\$(skip)text 20,60,"      diameter: "+str\$(radius)if skip=1 thentext 250,radius+y+40,str\$(points)+" sided polygon "if points=3 text 410,radius+y+40,"(triangle)"if points=4 text 410,radius+y+40,"(square)"if points=5 text 410,radius+y+40,"(pentagon)"if points=6 text 400,radius+y+40,"(hexagon)"if points=7 text 400,radius+y+40,"(septagon)"if points=8 text 400,radius+y+40,"(octagon)"if points=9 text 400,radius+y+40,"(nonagon)"endifif skip>1text 250,radius+y+40,str\$(points)+" point star"until (1=0)`

16
##### Yabasic / Random Colour Chart
« on: January 27, 2014 »
Here's something I needed, from my early days.

Code: [Select]
`open window 640,512nos=15 rem squares, x-axisrow=nos*.8boxx=640/nosboxy=510/rowdim r(nos,row)dim g(nos,row)dim b(nos,row)dim x(nos)dim y(row)for c=1 to rowfor a=1 to nosr(a,c)=int(ran(256))g(a,c)=int(ran(256))b(a,c)=int(ran(256))x(a)=a*boxx-(boxx/2)y(c)=c*boxy-(boxy/2)next anext crepeatsetdrawbuf vmvm=1-vmsetdispbuf vmclear windowc=peek("port1")go=go+1if go>10 go=10if go>2 off=0if and(c,64)>0 and go=10 thengo=1if go<3 off=1endiffor c=1 to rowfor a=1 to nosif off=1 thenr(a,c)=int(ran(256))g(a,c)=int(ran(256))b(a,c)=int(ran(256))endifsetrgb 1,r(a,c),g(a,c),b(a,c)fill rectangle x(a)-(boxx/2),y(c)-(boxy/2) to x(a)+(boxx/2),y(c)+(boxy/2)setrgb 1,256,256,256text x(a)-15,y(c)-9,str\$(r(a,c))text x(a)-15,y(c)+3,str\$(g(a,c))text x(a)-15,y(c)+15,str\$(b(a,c))next anext cuntil (1=0)`

17
##### Yabasic / Fraction Display
« on: January 27, 2014 »
It's been a while. So hard to come up with original ideas.
Here's something that got into my head.
Displaying fractions of an inch, as in imperial drill size range.

Code: [Select]
`open window 640,512denominator=128 rem this number is parts per inch'second number shows mm equivalentdim loop(denominator)dim topnum(denominator)dim count(denominator)dim botnum(denominator)for a=1 to denominator topnum(a)=a count(a)=1 botnum(a)=denominatornext arepeat setdrawbuf vm vm=1-vm setdispbuf vm clear window col=1 gap=0 for a=1 to denominator loop(a)=topnum(a)/2 if frac(topnum(a)/2)=0 then count(a)=count(a)*2 topnum(a)=loop(a) else col=col+1 if topnum(a)<10 then align=10 elseif topnum(a)>99 then align=-10 else align=0 endif if botnum(a)/count(a)<=1 then setrgb 1,256,0,0 else setrgb 1,256,256,256 endif text 10+gap+align,15*col,str\$(topnum(a))+"/"+str\$(botnum(a)/count(a)) endif text 80+gap,15*col,str\$((a/denominator)*25.4) if col>32 then gap=gap+160 col=1 endif next auntil (1=0)`

18
##### Yabasic / YaBasic on PSP?
« on: September 09, 2013 »
I kept forgetting that it was possible and I've come across the files.
Can this be put in tutorials ? The best I get is corrupted data.

19
##### Yabasic / Animated Name Data
« on: August 10, 2013 »
A previous post, animated.

Up and Down keys to highlight a name
Right key for random, Left key to reset
Keys '1', '2' and '3' to move (highlighted) name
Name list starts at '1'

Code: [Select]
`restore selection read maxnumdim name\$(maxnum)dim type(maxnum)for a=1 to maxnumread name\$(a)read type(a)next adim x(maxnum),y(maxnum)dim x1(maxnum),y1(maxnum)for a=1 to maxnumx1(a)=x(a)y1(a)=y(a)x(a)=50y(a)=270next adown=1speed=2open window 640,512repeatsetdrawbuf vmvm=1-vmsetdispbuf vmclear windowrow1=0row2=0row3=0c=peek("port1")go=go+1if go>10 go=10if and(c,16)>0 and go=10 thengo=0down=down-1endifif and(c,64)>0 and go=10 thengo=0down=down+1endifif down<1 down=maxnumif down>maxnum down=1if and(c,128)>0 and go=10 thenfor a=1 to maxnumgo=0type(a)=1next aendifg\$=inkey\$(0)for a=1 to maxnumif down=a thenif g\$="1" type(a)=1if g\$="2" type(a)=2if g\$="3" type(a)=3endifnext afor a=1 to maxnumif speed=1 thenx(a)=x1(a)y(a)=y1(a)endifif speed=2 thenif x(a)>x1(a) x(a)=x(a)-5if x(a)<x1(a) x(a)=x(a)+5if y(a)>y1(a) y(a)=y(a)-1if y(a)<y1(a) y(a)=y(a)+1endifif down=a thensetrgb 1,256,0,0else setrgb 1,256,256,256endifif type(a)=1 thenrow1=row1+17x1(a)=140-(len(name\$(a))*10)y1(a)=row1+50text x(a),y(a),name\$(a)endifif type(a)=2 thenrow2=row2+17x1(a)=340-(len(name\$(a))*10)y1(a)=row2+50text x(a),y(a),name\$(a)endifif type(a)=3 thenrow3=row3+17x1(a)=540-(len(name\$(a))*10)y1(a)=row3+50text x(a),y(a),name\$(a)endifnext afor a=1 to maxnumif x(a)<>x1(a) or y(a)<>y1(a) thenstart=0elsestart=1endifnext aif and(c,32)>0 and go=10 and start=1 thenfor a=1 to maxnumgo=0type(a)=int(ran(3))+1next aendifsetrgb 1,256,256,256text 10,20," (1)Undecided"text 210,20," (2)Left Wing"text 410,20,"(3)Right Wing"until(1=0)label selectiondata 25data "Benny!",1data "Bikemadness",1data "Clanky",1data "Clyde",1data "Combatking0",1data "Hellfire",1data "Hotshot",1data "Jim",1data "Ninogenio",1data "Optimus",1data "Paul",1data "Pixel_Outlaw",1data "Rain_Storm",1data "RBZ",1data "RDC",1data "Relsoft",1data "Shockwave",1data "Slinks",1data "Staticgerbil",1data "Stonemonkey",1data "Stormbringer",1data "Taj",1data "Tetra",1data "Va!n",1data "Yaloopy",1`
I don't know what is wrong with the world, but I know how to fix it.

Have a Yahappy day.

20
##### Yabasic / Data movement
« on: July 28, 2013 »
This could be useful, as opposed to doing it by hand.

I saw an idea, I wondered if I could do that.

Down key to highlight a name and right key to move that name.

Code: [Select]
`restore selection read maxnumdim name\$(maxnum)dim type(maxnum)for a=1 to maxnumread name\$(a)read type(a)next adown=1open window 640,512repeatsetdrawbuf vmvm=1-vmsetdispbuf vmclear windowrow1=0row2=0row3=0c=peek("port1")go=go+1if go>10 go=10if and(c,64)>0 and go=10 thengo=0down=down+1endifif down>maxnum down=1for a=1 to maxnumif and(c,32)>0 and go=10 and down=a thengo=0type(a)=type(a)+1endifif type(a)>3 type(a)=1next afor a=1 to maxnumif down=a thensetrgb 1,256,0,0elsesetrgb 1,256,256,256endifif type(a)>3 type(a)=1if type(a)=1 thenrow1=row1+1text 10,row1*17+50,name\$(a)endifif type(a)=2 thenrow2=row2+1text 210,row2*17+50,name\$(a)endifif type(a)=3 thenrow3=row3+1text 400,row3*17+50,name\$(a)endifnext asetrgb 1,256,256,256text 10,20,"Undecided"text 210,20,"Left Wing"text 400,20,"Right Wing"until(1=0)label selectiondata 25data "Benny!",1data "Bikemadness",1data "Clanky",1data "Clyde",1data "Combatking0",1data "Hellfire",1data "Hotshot",1data "Jim",1data "Ninogenio",1data "Optimus",1data "Paul",1data "Pixel_Outlaw",1data "Rain_Storm",1data "RBZ",1data "RDC",1data "Relsoft",1data "Shockwave",1data "Slinks",1data "Staticgerbil",1data "Stonemonkey",1data "Stormbringer",1data "Taj",1data "Tetra",1data "Va!n",1data "Yaloopy",1`
added bits (just for fun) version.

Down key to highlight a name and Right key to move that name.
Left key to randomize positions and Up key to reset.

Code: [Select]
`restore selection read maxnumdim name\$(maxnum)dim type(maxnum)for a=1 to maxnumread name\$(a)read type(a)next adown=1open window 640,512repeatsetdrawbuf vmvm=1-vmsetdispbuf vmclear windowrow1=0row2=0row3=0c=peek("port1")go=go+1if go>10 go=10if and(c,64)>0 and go=10 thengo=0down=down+1endifif down>maxnum down=1if and(c,16384)>0 and go=10 thenfor a=1 to maxnumif len(name\$(a))<6 type(a)=1if len(name\$(a))>5 and len(name\$(a))<9 type(a)=2if len(name\$(a))>8 type(a)=3next aendifif and(c,16)>0 and go=10 thenfor a=1 to maxnumgo=0type(a)=1next aendifif and(c,128)>0 and go=10 thenfor a=1 to maxnumgo=0type(a)=int(ran(3))+1next aendiffor a=1 to maxnumif and(c,32)>0 and go=10 and down=a thengo=0type(a)=type(a)+1endifif type(a)>3 type(a)=1next afor a=1 to maxnumif down=a thensetrgb 1,256,0,0elsesetrgb 1,256,256,256endifif type(a)>3 type(a)=1if type(a)=1 thenrow1=row1+1text 140-(len(name\$(a))*10),row1*17+50,name\$(a)+" "+str\$(len(name\$(a)))endifif type(a)=2 thenrow2=row2+1text 340-(len(name\$(a))*10),row2*17+50,name\$(a)+" "+str\$(len(name\$(a)))endifif type(a)=3 thenrow3=row3+1text 530-(len(name\$(a))*10),row3*17+50,name\$(a)+" "+str\$(len(name\$(a)))endifnext asetrgb 1,256,256,256text 10,20,"    Undecided"text 210,20,"    Left Wing"text 400,20,"   Right Wing"until(1=0)label selectiondata 25data "Benny!",1data "Bikemadness",1data "Clanky",1data "Clyde",1data "Combatking0",1data "Hellfire",1data "Hotshot",1data "Jim",1data "Ninogenio",1data "Optimus",1data "Paul",1data "Pixel_Outlaw",1data "Rain_Storm",1data "RBZ",1data "RDC",1data "Relsoft",1data "Shockwave",1data "Slinks",1data "Staticgerbil",1data "Stonemonkey",1data "Stormbringer",1data "Taj",1data "Tetra",1data "Va!n",1data "Yaloopy",1`
Or a basic version, using 1,2 and 3 for name movement.

Code: [Select]
`restore selection read maxnumdim name\$(maxnum)dim type(maxnum)for a=1 to maxnumread name\$(a)read type(a)next adown=1open window 640,512repeatsetdrawbuf vmvm=1-vmsetdispbuf vmclear windowrow1=0row2=0row3=0c=peek("port1")go=go+1if go>10 go=10if and(c,16)>0 and go=10 thengo=0down=down-1endifif and(c,64)>0 and go=10 thengo=0down=down+1endifif down<1 down=maxnumif down>maxnum down=1if and(c,128)>0 and go=10 thenfor a=1 to maxnumgo=0type(a)=1next aendifg\$=inkey\$(0)for a=1 to maxnumif down=a thenif g\$="1" type(a)=1if g\$="2" type(a)=2if g\$="3" type(a)=3endifnext afor a=1 to maxnumif type(a)=1 thenrow1=row1+1if down=a text 145,row1*17+50,"<"text 140-(len(name\$(a))*10),row1*17+50,name\$(a)endifif type(a)=2 thenrow2=row2+1if down=a text 345,row2*17+50,"<"text 340-(len(name\$(a))*10),row2*17+50,name\$(a)endifif type(a)=3 thenrow3=row3+1if down=a text 545,row3*17+50,"<"text 540-(len(name\$(a))*10),row3*17+50,name\$(a)endifnext atext 10,20," (1)Undecided"text 210,20," (2)Left Wing"text 410,20,"(3)Right Wing"until(1=0)label selectiondata 25data "Benny!",1data "Bikemadness",1data "Clanky",1data "Clyde",1data "Combatking0",1data "Hellfire",1data "Hotshot",1data "Jim",1data "Ninogenio",1data "Optimus",1data "Paul",1data "Pixel_Outlaw",1data "Rain_Storm",1data "RBZ",1data "RDC",1data "Relsoft",1data "Shockwave",1data "Slinks",1data "Staticgerbil",1data "Stonemonkey",1data "Stormbringer",1data "Taj",1data "Tetra",1data "Va!n",1data "Yaloopy",1`
I don't know what is wrong with the world, but I know how to fix it.

Have a Yahappy day.

Pages: [1] 2 3 4