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.


Messages - bikemadness

Pages: [1] 2 3 4 5 6 7 8 ... 11
1
Yabasic / Re: Pendulum Rope
« on: August 05, 2026 »
Shockwave. I've played with your program to understand it.
Create initial start and mid swings using page-up or page-down.

Code: [Select]
joint=32

dim x(joint)
dim y(joint)
dim oldx(joint)
dim oldy(joint)

length=10

gravity=.1
drag=.9

' create rope hanging down
for a=1 to joint
x(a)=320
y(a)=80+(a-1)*length

oldx(a)=x(a)
oldy(a)=y(a)
next a

' give rope a big initial swing
'for a=1 to joint
'x(a)=320+(a*a*.35)
'oldx(a)=x(a)-20
'next a

dim go(16)
dim g(16)

open window 640,512

repeat

setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window
c=peek("port1")

for a=1 to 16
if and(c,2^(a-1))<>0 go(a)=1
if go(a)=1 g(a)=g(a)+1
if g(a)>2 g(a)=2
if g(a)=2 go(a)=0
if and(c,2^(a-1))=0 g(a)=0
next a

g=ran(1)

if go(4)=1 x(32)=600
if go(4)=1 y(32)=80

if go(1)=1 then
for a=1 to joint
x(a)=320+(a*a*g)
oldx(a)=x(a)-20
next a
endif

' physics update

for a=2 to joint

vx=x(a)-oldx(a)
vy=y(a)-oldy(a)

oldx(a)=x(a)
oldy(a)=y(a)

x(a)=x(a)+vx*drag
y(a)=y(a)+vy*drag+gravity

next a


' solve rope lengths

for b=1 to 8

x(1)=320
y(1)=80

for a=2 to joint

dx=x(a)-x(a-1)
dy=y(a)-y(a-1)

dist=sqrt(dx*dx+dy*dy)

if dist>0 then

diff=(dist-length)/dist

if a<>2 then
x(a-1)=x(a-1)+dx*diff*.5
y(a-1)=y(a-1)+dy*diff*.5
endif

x(a)=x(a)-dx*diff*.5
y(a)=y(a)-dy*diff*.5

endif

next a

next b


' redraw rope

setrgb 1,255,255,255

for a=1 to joint-1
line x(a),y(a) to x(a+1),y(a+1)
next a


until (1=0)


2
Yabasic / Re: Another Wire Frame
« on: August 03, 2026 »
I've seen many variations coding 3D including the cube on the PS2 demo disc.
It was beyond my comprehension and still is since I barely managed one axis.
But I had easy access to coding which was beyond my budget before.
I developed a lot faster when the emulator came along and then joined this site. So helpful.
My best work is on this site, but I have hundreds of small operational programs.
And some not so small like the search program for my 4500 dvd collection.
What a journey thanks to everyone here.
And Jim when I got him to transfer my PS2 memory cards to PC.

3
Yabasic / Re: Pendulum Rope
« on: August 01, 2026 »
I don't mind in the least.
All I could do was put individual controls of line length and angle for each segment.
And what i showcased here.
Not in my wildest dreams before this.
And thankyou.

4
Yabasic / Puzzle Platform
« on: July 17, 2026 »
Stand puzzle where a grid of numbers
represent all the letters of the alphabet.

It uses the print screen to input the number
then Enter
then the keyboard for the letter.
Or to change it.
The number then delete to wipe the letter.

Enter then delete to bring up the screens.

Code: [Select]
restore fillin
read grid
dim nos(grid)

for a=1 to grid
read nos(a)
next a

restore code
read letter
dim num(letter)
dim ltr$(letter)

for a=1 to letter
read num(a)
next a

open window 640,512

repeat
clear screen
input z

ltr$(z)=inkey$
if ltr$(z)="del" ltr$(z)=""

setrgb 1,0,0,0
clear fill rectangle 125,z*12+41 to 145,z*12+53
setrgb 1,256,256,256

for a=1 to letter
text 100,a*12+50,str$(a,"##")
next a

text 130,z*12+50,upper$(ltr$(z))

setrgb 1,256,256,256
fill rectangle 200,0 to 640,512
setrgb 1,0,0,0

x=0
y=1
for a=1 to grid
x=x+1
if x>15 then
x=1
y=y+1
endif
rectangle x*15+285,y*15+260 to x*15+300,y*15+275
rectangle x*25+200,y*15+10 to x*25+225,y*15+25
if nos(a)=0 fill rectangle x*15+285,y*15+260 to x*15+300,y*15+275
if nos(a)=0 fill rectangle x*25+200,y*15+10 to x*25+225,y*15+25
if nos(a)<10 text x*25+200,y*15+21,"0"
text x*25+200,y*15+21,str$(nos(a),"##")
next a

x=0
y=1
for a=1 to grid
x=x+1
if x>15 then
x=1
y=y+1
endif

for b=1 to letter
z=z+nos(a)
if nos(a)=num(b) text x*15+286,y*15+271,upper$(ltr$(b))
next b

next a

until (1=0)

label fillin
data 225
data 09,04,10,15,00,09,06,26,17,13,00,03,15,04,19
data 02,00,21,00,01,00,15,00,10,00,15,00,07,00,04
data 25,06,09,11,04,10,05,00,21,22,02,06,11,04,10
data 25,00,18,00,24,00,19,00,11,00,09,00,17,00,15
data 00,01,06,08,21,19,04,00,21,09,18,06,07,10,00
data 04,00,07,00,10,00,23,02,20,00,21,00,09,00,01
data 16,04,26,06,15,18,05,00,11,12,07,09,03,21,15
data 15,00,00,00,00,04,00,00,00,04,00,00,00,00,06
data 21,15,09,10,05,17,11,00,04,19,14,21,09,11,13
data 10,00,12,00,21,00,05,04,19,00,04,00,02,00,12
data 00,16,06,18,18,04,17,00,21,15,09,04,10,21,00
data 04,00,15,00,18,00,12,00,05,00,03,00,06,00,09
data 17,07,09,09,04,18,04,00,07,15,21,17,11,18,05
data 21,00,21,00,16,00,04,00,15,00,05,00,04,00,06
data 15,04,13,12,00,13,15,04,01,13,00,01,10,07,15

label code
data 26
data 1,2,3,4,5,6,7,8,9,10,11,12,13,14
data 15,16,17,18,19,20,21,22,23,24,25,26

' answer
' 01 02 03 04 05 06 07 08 09 10 11 12 13
'  G  U  K  O  Y  A  I  Z  C  R  T  H  S
' 14 15 16 17 18 18 20 21 22 23 24 25 26
'  J  N  W  P  L  B  X  E  Q  D  V  F  M


5
Yabasic / Pendulum Rope
« on: June 20, 2026 »
This shows a preset segmented line controlled by repeating math.

Code: [Select]
joint=24
dim x(joint)
dim y(joint)
dim dir(joint)
dim arm(joint)
dim s(joint)

for a=1 to joint
dir(a)=0
arm(a)=15
next a

dir(1)=20
ang=pi/180
x=320
y=100

open window 640,512
repeat
setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window

dir(1)=dir(1)+m
if dir(1)<90 m=m+.05
if dir(1)>91 m=m-.05

for a=2 to joint
if dir(1)<90 dir(a)=dir(a)-.12
if dir(1)>90 dir(a)=dir(a)+.12
next a

for a=1 to joint
s(a)=0
next a

d=0

setrgb 1,256,256,256

for a=1 to joint
d=d+dir(a)

x(a)=cos(d*ang)*arm(a)
y(a)=sin(d*ang)*arm(a)

s(1)=s(1)+x(a-1)
s(2)=s(2)+y(a-1)
s(3)=s(3)+x(a)
s(4)=s(4)+y(a)

line s(1)+x,s(2)+y to s(3)+x,s(4)+y
next a

until (1=0)


6
Yabasic / Another Wire Frame
« on: June 17, 2026 »
An Icosahedron this time.

The code includes putting the
points into data.
Which didn't work out.

Code: [Select]
restore edges
read tips
dim s(tips)
dim e(tips)

for a=1 to tips
read s(a)
read e(a)
next a

point=10
dim r(point)
dim x(point)
dim y(point)
dim l(point)
dim d(point)
dim s(point)
dim m(point)
rad=pi/180
ang=360/(point/2)

for a=1 to point
l(a)=400
s(a)=3
m(a)=.005
next a

for a=1 to 5
r(a)=a*ang*rad
d(a)=-0.35
next a

for a=6 to 10
r(a)=(a+0.5)*ang*rad
d(a)=0.35
next a

x=320
y=256

open window 640,512
repeat
setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window

text 250,12,"ICOSAHEDRON"
text 250,24,"  12 points"
text 250,36,"20 triangles"
text 250,48,"  40 lines"

for a=1 to point
x(a)=cos(r(a))/(sin(r(a))+s(a))*l(a)+x
y(a)=d(a)/(sin(r(a))+s(a))*l(a)+y
next a

for a=1 to point
r(a)=r(a)+m(a)
if m(a)>360 m(a)=0
next a

for a=1 to 5
line x,y-120 to x(a),y(a)
next a

for a=6 to 10
line x,y+120 to x(a),y(a)
next a

line x(1),y(1) to x(2),y(2)
line x(2),y(2) to x(3),y(3)
line x(3),y(3) to x(4),y(4)
line x(4),y(4) to x(5),y(5)
line x(5),y(5) to x(1),y(1)

line x(1),y(1) to x(6),y(6)
line x(2),y(2) to x(6),y(6)
line x(2),y(2) to x(7),y(7)
line x(3),y(3) to x(7),y(7)
line x(3),y(3) to x(8),y(8)
line x(4),y(4) to x(8),y(8)
line x(4),y(4) to x(9),y(9)
line x(5),y(5) to x(9),y(9)
line x(5),y(5) to x(10),y(10)
line x(1),y(1) to x(10),y(10)

line x(6),y(6) to x(7),y(7)
line x(7),y(7) to x(8),y(8)
line x(8),y(8) to x(9),y(9)
line x(9),y(9) to x(10),y(10)
line x(10),y(10) to x(6),y(6)

for a=1 to point
'text x(a),y(a),str$(a)
next a

for a=1 to tips
'line x(s(a)),y(s(a)) to x(e(a)),y(e(a))
next a

until (1=0)

label edges
data 20
data 1,2
data 2,3
data 3,4
data 4,5
data 5,1

data 1,6
data 2,6
data 2,7
data 3,7
data 3,8
data 4,8
data 4,9
data 5,9
data 5,10
data 1,10

data 6,7
data 7,8
data 8,9
data 9,10
data 10,6


7
Yabasic / Colliding Redux
« on: May 13, 2026 »
But with the added feature of the

squares moving into place.

Code: [Select]
blox=40
dim x(blox)
dim y(blox)
dim x1(blox)
dim y1(blox)

for a=1 to blox
x(a)=int(ran(30))*20+20
y(a)=int(ran(23))*20+20
next a

for a=1 to blox
x1(a)=x(a)
y1(a)=y(a)
next a

xb=320
yb=256
r=5
b=5

xm=1
ym=1

sel=3

open window 640,512
repeat
setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window

for a=1 to blox
rectangle x1(a)-b,y1(a)-b to x1(a)+b,y1(a)+b
next a

circle xb,yb,r
xb=xb+xm
yb=yb+ym
if xb<0+r or xb>640-r xm=-xm
if yb<0+r or yb>512-r ym=-ym

for a=1 to blox
if x1(a)>x(a) x1(a)=x1(a)-.25
if x1(a)<x(a) x1(a)=x1(a)+.25
if y1(a)>y(a) y1(a)=y1(a)-.25
if y1(a)<y(a) y1(a)=y1(a)+.25
next a

for a=1 to blox

if xb+r>x(a)-b and xb-r<x(a)+b and yb>y(a)-b and yb<y(a)+b then
xm=-xm

if sel=1 then
x(a)=int(ran(30))*20+20
y(a)=int(ran(23))*20+20
endif

if sel=2 then
x(a)=a*10+120
y(a)=256
endif

if sel=3 then
x(a)=420
y(a)=a*10+40
endif

if sel=4 then
row=row+1
if row>8 then
row=1
col=col+1
endif
x(a)=row*10+240
y(a)=col*10+100
endif

if sel=5 then
x(a)=cos((a)*(360/blox)*(pi/180))*240+320
y(a)=sin((a)*(360/blox)*(pi/180))*150+256
endif

endif

if yb+r>y(a)-b and yb-r<y(a)+b and xb>x(a)-b and xb<x(a)+b then
ym=-ym

if sel=1 then
x(a)=int(ran(30))*20+20
y(a)=int(ran(23))*20+20
endif

if sel=2 then
x(a)=a*10+120
y(a)=256
endif

if sel=3 then
x(a)=420
y(a)=a*10+40
endif

if sel=4 then
row=row+1
if row>8 then
row=1
col=col+1
endif
x(a)=row*10+240
y(a)=col*10+100
endif

if sel=5 then
x(a)=cos((a)*(360/blox)*(pi/180))*240+320
y(a)=sin((a)*(360/blox)*(pi/180))*150+256
endif

endif

next a

until (1=0)


8
Yabasic / Colliding
« on: May 12, 2026 »
Object ball bouncing off static squares.

Depending on the end result (sel=1,2,3 or 4),

The squares will randomly pop up somewhere else,

or not.

Code: [Select]
blox=40
dim x(blox)
dim y(blox)

for a=1 to blox
x(a)=int(ran(30))*20+20
y(a)=int(ran(23))*20+20
next a
b=5

xb=320
yb=256
r=5

xm=1
ym=1

sel=1

open window 640,512
repeat
setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window

for a=1 to blox
rectangle x(a)-b,y(a)-b to x(a)+b,y(a)+b
next a

circle xb,yb,r
xb=xb+xm
yb=yb+ym
if xb<0+r or xb>640-r xm=-xm
if yb<0+r or yb>512-r ym=-ym

for a=1 to blox

if xb+r>x(a)-b and xb-r<x(a)+b and yb>y(a)-b and yb<y(a)+b then
xm=-xm

if sel=1 then
x(a)=int(ran(30))*20+20
y(a)=int(ran(23))*20+20
endif

if sel=2 then
x(a)=a*10+120
y(a)=256
endif

if sel=3 then
row=row+1
if row>8 then
row=1
col=col+1
endif
x(a)=row*10+240
y(a)=col*10+200
endif

if sel=4 then
x(a)=cos((a)*(360/blox)*(pi/180))*240+320
y(a)=sin((a)*(360/blox)*(pi/180))*150+256
endif

endif

if yb+r>y(a)-b and yb-r<y(a)+b and xb>x(a)-b and xb<x(a)+b then
ym=-ym

if sel=1 then
x(a)=int(ran(30))*20+20
y(a)=int(ran(23))*20+20
endif

if sel=2 then
x(a)=a*10+120
y(a)=256
endif

if sel=3 then
row=row+1
if row>8 then
row=1
col=col+1
endif
x(a)=row*10+240
y(a)=col*10+200
endif

if sel=4 then
x(a)=cos((a)*(360/blox)*(pi/180))*240+320
y(a)=sin((a)*(360/blox)*(pi/180))*150+256
endif

endif

next a

until (1=0)


9
Yabasic / 3D Ring Of Planets
« on: May 08, 2026 »
Shows colours and sorting.

Code: [Select]
point=20
dim r(point)
dim x(point)
dim y(point)
dim l(point)
dim d(point)
dim s(point)
dim m(point)
dim R(point)
dim G(point)
dim B(point)
dim size(point)
dim order$(point)
ang=360/point

for a=1 to point
r(a)=a*ang*(pi/180)
l(a)=500 rem int(ran(300))+200
s(a)=2
d(a)=-.1
m(a)=.005
R(a)=ran(256)
G(a)=ran(256)
B(a)=ran(256)
next a

x=320
y=256

open window 640,512
repeat
setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window

for a=1 to point
x(a)=cos(r(a))/(sin(r(a))+s(a))*l(a)+x
y(a)=d(a)/(sin(r(a))+s(a))*l(a)+y
next a

for a=1 to point
r(a)=r(a)+m(a)
if m(a)>360 m(a)=0
next a

for a=1 to point
order$(a)=str$(size(a))
next a

for k=1 to point-1
for j=1 to point-k

if order$(j)>order$(j+1) then

temp=r(j)
r(j)=r(j+1)
r(j+1)=temp

temp=x(j)
x(j)=x(j+1)
x(j+1)=temp

temp=y(j)
y(j)=y(j+1)
y(j+1)=temp

temp=l(j)
l(j)=l(j+1)
l(j+1)=temp

temp=d(j)
d(j)=d(j+1)
d(j+1)=temp

temp=s(j)
s(j)=s(j+1)
s(j+1)=temp

temp=m(j)
m(j)=m(j+1)
m(j+1)=temp

temp=R(j)
R(j)=R(j+1)
R(j+1)=temp

temp=G(j)
G(j)=G(j+1)
G(j+1)=temp

temp=B(j)
B(j)=B(j+1)
B(j+1)=temp

temp=size(j)
size(j)=size(j+1)
size(j+1)=temp

temp$=order$(j)
order$(j)=order$(j+1)
order$(j+1)=temp$

endif

next j
next k

for a=1 to point
size(a)=15*(10-(y(a)/27))
setrgb 1,R(a),G(a),B(a)
fill circle x(a),y(a),size(a)
setrgb 1,256,256,256
circle x(a),y(a),size(a)
next a

until (1=0)


10
Yabasic / Re: 3D Wire Frame
« on: May 08, 2026 »
Thanks. I'm having trouble sorting colours.

The points are getting mixed up.

11
Yabasic / Re: 3D Starfield
« on: May 08, 2026 »
Thanks. Its taken me years to get head around it.

The first one I saw was on the PS2 demo disc.

The code just blew me away.

I still have a number of those disks.

12
Yabasic / 3D Wire Frame
« on: May 07, 2026 »
A bit more work this time.

Yet to work out data.

Code: [Select]

point=16
dim r(point)
dim x(point)
dim y(point)
dim l(point)
dim d(point)
dim s(point)
dim m(point)
dim size(point)

for a=1 to point
r(a)=a*45*(pi/180)
l(a)=300
s(a)=2 rem couples with l(a) s(a)/l(a)
m(a)=.005
next a

for a=1 to 8
d(a)=-.35
next a

for a=9 to 16
d(a)=.35
next a

x=320
y=256

open window 640,512
repeat
setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window

for a=1 to point
x(a)=cos(r(a))/(sin(r(a))+s(a))*l(a)+x
y(a)=d(a)/(sin(r(a))+s(a))*l(a)+y
next a

for a=1 to point
r(a)=r(a)+m(a)
if m(a)>360 m(a)=0
next a

for a=1 to 8
line x,y-150 to x(a),y(a)
next a

for a=9 to 16
line x,y+150 to x(a),y(a)
next a

setrgb 1,256,256,256
line x(1),y(1) to x(2),y(2)
line x(2),y(2) to x(3),y(3)
line x(3),y(3) to x(4),y(4)
line x(4),y(4) to x(5),y(5)
line x(5),y(5) to x(6),y(6)
line x(6),y(6) to x(7),y(7)
line x(7),y(7) to x(8),y(8)
line x(8),y(8) to x(1),y(1)
line x(9),y(9) to x(10),y(10)
line x(10),y(10) to x(11),y(11)
line x(11),y(11) to x(12),y(12)
line x(12),y(12) to x(13),y(13)
line x(13),y(13) to x(14),y(14)
line x(14),y(14) to x(15),y(15)
line x(15),y(15) to x(16),y(16)
line x(16),y(16) to x(9),y(9)
line x(1),y(1) to x(9),y(9)
line x(2),y(2) to x(10),y(10)
line x(3),y(3) to x(11),y(11)
line x(4),y(4) to x(12),y(12)
line x(5),y(5) to x(13),y(13)
line x(6),y(6) to x(14),y(14)
line x(7),y(7) to x(15),y(15)
line x(8),y(8) to x(16),y(16)

until (1=0)


13
Yabasic / 3D Starfield
« on: May 06, 2026 »
Done to death, but this is my first.

I finally figuured something out.

Code: [Select]
star=200
dim r(star)
dim x(star)
dim y(star)
dim l(star)
dim d(star)
dim s(star)
dim m(star)

for a=1 to star
r(a)=int(ran(360))*(pi/180)
l(a)=int(ran(400))+160
d(a)=ran(1)-int(ran(2)) rem height
s(a)=ran(2)+2 rem couples with l(a) s(a)/l(a)
m(a)=.005
next a

x=320
y=256

open window 640,512
repeat
setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window

for a=1 to star
x(a)=cos(r(a))/(sin(r(a))+s(a))*l(a)+x
y(a)=d(a)/(sin(r(a))+s(a))*l(a)+y
next a

for a=1 to star
r(a)=r(a)+m(a)
if m(a)>360 m(a)=0
next a

for a=1 to star
dot x(a),y(a)
next a

until (1=0)

14
Yabasic / Re: Animated Words Maker
« on: April 05, 2026 »
The number ordering has a process I used that feels like an algorithm.
This  program is based on an app that did the word building on entry of letters.
But it animated the changes - cool I thought.
If I could even write algorithms, I would only need to write the words.

15
Yabasic / Animated Words Maker
« on: April 03, 2026 »
1300 words can be made with the letters I'm using.
Each combination has 2 to 4 words in a line.
Using about 350 different words in 150 lines.

Up or down D-pad to scroll through the list.
Or right D-pad to randomize.

Code: [Select]
dim n(1800)

for a=1 to 1800
read n(a)
next a

a$="ACEILNOPRTWY"

num=len(a$)
dim xs(num)
dim xm(num)

for a=1 to num
xs(a)=a
xm(a)=a
next a

keys=16
dim go(keys)
dim g(keys)

space=25
cen=(640-(len(a$))*space)/2-space
off=1

open window 640,512
repeat
setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window
c=peek("port1")

for a=1 to keys
if and(c,2^(a-1))<>0 go(a)=1
if go(a)=1 g(a)=g(a)+1
if g(a)>2 g(a)=2
if g(a)=2 go(a)=0
if and(c,2^(a-1))=0 g(a)=0
next a

for a=1 to num
if xm(a)>xs(a) xm(a)=xm(a)-0.1
if xm(a)<xs(a) xm(a)=xm(a)+0.1
next a

if go(5)=1 sel=sel-12
if sel<0 sel=1788

if go(7)=1 sel=sel+12
if sel>1788 sel=0

if go(6)=1 sel=int(ran(150)+1)*12
if off=1 text 470,124,str$((sel/12)+1,"###")

if go(8)=1 off=off+1
if off>2 off=1

for a=1+sel to num+sel
xs(a-sel)=n(a)
next a

for a=1 to num
if off=2 text xm(a)*space+cen,100,str$(xs(a))
text xm(a)*space+cen,124,mid$(a$,a,1)
if off=2 text xm(a)*space+cen,148,str$(n(a))
next a

if off=1 text 10,12,"key pad left for info"
if off=2 then
text 10,12,"line "+str$((sel/12)+1,"###")
text 10,24,"  up list-key pad up"
text 10,36,"down list-key pad down"
text 10,48,"   random-key pad right"
text 10,60," info off-key pad left"
endif

until (1=0)

data 1,2,3,4,5,6,7,8,9,10,11,12 rem aceilnoprtwy
data 5,1,2,6,8,7,11,10,3,4,12,9 rem certainlypow
data 8,10,4,1,7,2,11,6,5,3,12,9 rem interplaycow
data 7,4,5,8,6,9,2,1,3,11,10,12 rem porcelainwty
data 6,1,5,10,7,3,2,11,9,8,4,12 rem conwealtripy 5
data 2,8,7,3,11,4,10,1,6,5,9,12 rem paintrecwoly
data 7,10,4,8,1,9,2,6,5,11,3,12 rem lowerpaincty
data 1,10,4,3,2,5,7,6,8,9,11,12 rem alienportcwy
data 11,7,8,6,5,12,3,10,2,1,4,9 rem trowliceypan
data 5,9,7,2,3,1,10,11,8,6,4,12 rem nilwatercopy 10
data 7,1,4,11,9,3,2,12,6,5,8,10 rem conetrawlyip
data 2,8,9,7,11,4,5,10,3,6,1,12 rem warnoticeply
data 3,7,8,6,2,5,12,1,9,10,11,4 rem playnicertwo
data 10,7,12,5,9,6,2,8,1,11,3,4 rem rowyincplate
data 2,1,8,6,10,3,11,9,5,7,4,12 rem canwriteploy 15
data 2,12,5,11,1,7,9,10,6,8,3,4 rem lawyerntopic
data 9,1,6,12,10,7,2,11,5,8,3,4 rem cowyrentalpi
data 6,9,11,7,8,3,2,5,10,1,12,4 rem tonypailcrew
data 9,2,7,1,10,8,4,6,3,11,5,12 rem icrowpenalty
data 7,10,2,8,9,1,11,12,6,5,3,4 rem newytrailcop 20
data 8,6,1,10,7,2,4,5,9,11,3,12 rem enwopclarity
data 8,1,7,10,6,4,2,5,3,11,9,12 rem cornpleawity
data 4,3,12,10,1,5,6,7,11,8,9,2 rem lycanoptwire
data 10,7,8,6,12,1,2,4,5,3,11,9 rem notpriceyawl
data 6,7,8,10,5,4,2,11,3,1,9,12 rem tornlacewipy 25
data 2,9,8,10,1,4,6,7,5,11,3,12 rem lawnropecity
data 7,9,2,11,12,6,10,4,1,3,8,5 rem reptynawcoil
data 2,3,4,6,5,11,9,7,1,8,10,12 rem raceliptowny
data 2,4,5,11,1,6,9,8,3,12,10,7 rem larcenypowit
data 3,1,8,10,9,12,11,7,2,5,4,6 rem crawtypelion 30
data 3,5,8,10,9,11,6,7,2,12,1,4 rem wraycopelint
data 6,4,12,1,8,3,2,11,5,9,7,10 rem ioncrawltype
data 6,5,8,10,9,4,2,7,3,11,1,12 rem worncapelity
data 11,5,10,4,9,3,2,12,7,1,6,8 rem tonicwryleap
data 11,9,4,6,10,7,2,12,3,5,1,8 rem woretinyclap 35
data 7,9,12,10,3,5,4,1,6,11,8,2 rem pylonrawcite
data 11,1,5,3,2,4,8,10,7,6,12,9 rem clinetroypaw
data 10,1,6,3,2,9,4,7,11,8,5,12 rem clioweptnary
data 2,9,6,11,7,12,10,8,3,4,1,5 rem wartyelpcoin
data 10,4,9,2,11,3,7,6,8,12,1,5 rem wincyporealt 40
data 2,3,12,10,11,8,6,9,1,5,7,4 rem racytownpile
data 2,9,11,8,3,7,6,1,5,4,12,10 rem paltronicyew
data 10,7,8,6,3,11,1,9,5,12,2,4 rem owlyricepant
data 1,8,9,7,10,3,11,5,6,12,2,4 rem awnypricelot
data 3,11,12,10,5,7,8,1,2,9,4,6 rem prawlynotice 45
data 2,11,12,9,6,10,5,1,4,3,8,7 rem patrolywince
data 9,5,6,4,3,11,2,1,8,7,10,12 rem policetrawny
data 10,8,12,6,5,7,2,1,9,11,3,4 rem powylincrate
data 10,3,4,11,12,8,6,5,7,9,1,2 rem wyceporntail
data 10,11,12,4,2,5,8,1,9,6,7,3 rem plyintworace 50
data 6,9,12,2,11,8,10,1,7,3,5,4 rem pitywarncole
data 7,1,12,10,9,11,2,8,6,3,5,4 rem cotywrapline
data 6,5,4,2,11,10,9,3,7,8,1,12 rem wipecartonly
data 7,5,4,2,10,3,11,9,6,12,1,8 rem winecrayplot
data 3,11,12,10,1,4,2,5,6,8,9,7 rem loanprytwice 55
data 6,7,8,10,2,5,3,1,11,9,4,12 rem plownacetiry
data 5,9,7,1,10,6,11,12,3,2,8,4 rem itryanewclop
data 2,8,4,7,1,12,11,5,6,3,10,9 rem latepricywon
data 6,11,12,10,5,3,2,8,9,4,1,7 rem wontlayprice
data 9,3,11,2,12,10,6,8,1,5,7,4 rem ricytowpanel 60
data 1,4,11,6,5,2,9,8,12,7,10,3 rem anyclitpower
data 2,4,5,11,6,12,8,1,3,7,10,9 rem parceltoywin
data 3,6,2,11,7,12,8,10,4,9,1,5 rem wearyclotpin
data 11,1,4,2,5,8,6,10,7,3,12,9 rem citelornypaw
data 7,10,2,8,9,6,11,1,3,4,12,5 rem pertynailcow 65
data 2,9,8,11,10,5,6,12,3,7,1,4 rem warynoteclip
data 6,1,12,10,3,11,2,8,7,5,9,4 rem colytarpwine
data 7,3,6,2,9,8,11,5,10,12,1,4 rem wicypenalrot
data 9,1,11,5,8,6,2,4,12,7,3,10 rem cowpintlayer
data 6,2,9,1,8,10,4,7,3,11,5,12 rem icrowaplenty 70
data 8,3,4,2,12,1,10,5,6,9,11,7 rem nicepryatowl
data 6,11,12,10,9,3,2,1,7,8,5,4 rem ponywartlice
data 10,9,12,2,4,3,7,1,6,11,8,5 rem pinlyrowcate
data 6,11,12,9,1,10,2,8,5,4,3,7 rem lowtraypince
data 2,9,12,7,1,4,10,8,6,11,3,5 rem lawnyripcote 75
data 2,9,8,11,10,4,6,12,5,7,3,1 rem tawnroteclip
data 6,7,11,9,5,3,2,10,12,1,8,4 rem tonylacwiper
data 2,7,12,6,11,4,10,9,3,5,1,8 rem warnticypole
data 2,3,4,10,9,11,6,1,7,8,5,12 rem pacewortliny
data 11,8,5,7,10,6,3,12,2,4,1,9 rem wrotenicylap 80
data 7,1,9,11,8,4,2,6,3,12,10,5 rem cornypalewit
data 7,5,2,10,6,11,12,1,3,4,9,8 rem pertclaywino
data 7,6,2,11,4,8,5,12,10,9,3,1 rem yewlocantrip
data 6,3,4,10,11,2,1,5,7,8,9,12 rem oncepartwily
data 3,4,5,7,9,8,10,6,2,1,11,12 rem tracepinlowy 85
data 9,8,7,5,1,6,2,4,10,11,3,12 rem lowpinecarty
data 3,11,5,10,9,8,6,4,2,1,7,12 rem trapeownlicy
data 7,8,5,1,11,4,2,10,6,9,3,12 rem iowneractply
data 6,7,8,2,3,12,11,5,9,4,1,10 rem wiltpaceryon
data 11,4,5,3,10,12,7,9,2,1,8,6 rem triceyowplan 90
data 7,1,12,10,4,9,2,5,6,11,3,8 rem cowlpraynite
data 8,9,3,6,11,7,10,1,2,12,5,4 rem preywinacolt
data 11,5,4,2,6,3,7,9,10,8,1,12 rem wineclotpray
data 5,1,2,6,9,7,10,8,3,4,11,12 rem certainplowy
data 9,4,11,2,8,3,5,7,12,6,1,10 rem wincotplayer 95
data 2,4,5,6,7,11,9,3,10,1,8,12 rem tapceilworny
data 7,9,5,11,10,1,2,6,3,12,4,8 rem norwepayclit
data 11,4,3,2,1,8,6,10,5,12,7,9 rem liecrownypat
data 3,2,11,1,9,12,7,5,6,4,8,10 rem icatprowlyen
data 11,5,6,4,12,7,8,10,2,1,9,3 rem tryicenowpal 100
data 2,6,8,5,7,9,10,1,3,4,11,12 rem particlenowy
data 7,5,10,3,2,11,4,1,9,12,6,8 rem pliocwayrent
data 5,8,4,2,6,3,10,7,9,1,11,12 rem tinealpcrowy
data 10,3,6,5,4,7,2,12,11,8,9,1 rem yoclientwarp
data 7,9,3,1,6,4,11,12,10,5,2,8 rem iwentlaycrop 105
data 5,4,9,2,8,10,3,7,1,11,6,12 rem riocawplenty
data 6,5,4,2,1,7,11,9,10,3,12,8 rem litecanyprow
data 8,9,6,2,3,7,11,5,12,10,1,4 rem wilypenactor
data 3,10,8,11,12,9,1,7,4,5,2,6 rem owartypencil
data 8,4,5,2,12,3,11,7,10,9,1,6 rem winceypatrol 110
data 5,2,8,1,12,6,11,7,10,9,4,3 rem icywanpetrol
data 3,1,10,11,2,12,8,6,7,9,4,5 rem clawyprotein
data 8,6,1,5,11,10,3,7,2,4,9,12 rem eroticpawnly
data 2,9,8,6,7,3,10,11,1,4,5,12 rem rantwilecopy
data 6,7,11,10,9,1,2,5,12,4,3,8 rem nowtpacylier 115
data 1,2,9,4,11,6,5,10,8,3,7,12 rem actionwreply
data 10,3,9,2,5,12,6,1,11,4,7,8 rem pictlowyearn
data 11,1,7,3,2,8,4,12,10,9,5,6 rem cliowyentrap
data 7,6,2,5,4,8,11,3,1,9,12,10 rem replicantyow
data 1,6,7,4,8,5,11,2,3,10,12,9 rem aprincelytow 120
data 11,10,7,9,8,12,2,6,3,4,1,5 rem wortypelican
data 4,5,3,11,6,12,8,10,2,1,9,7 rem treaclyowpin
data 3,7,2,11,5,1,8,10,4,12,9,6 rem nearlycowpit
data 11,10,2,8,9,7,5,1,12,4,3,6 rem pewtoynilcar
data 5,1,9,11,12,6,2,8,10,7,4,3 rem coywantperil 125
data 10,2,1,5,9,11,3,8,6,12,4,7 rem ecowiryplant
data 9,12,2,11,3,10,6,8,7,4,1,5 rem weltyorpanic
data 2,3,4,10,9,11,6,1,7,8,5,12 rem pacewortliny
data 11,10,4,2,12,3,6,5,7,8,1,9 rem wineportycal
data 11,9,2,3,4,5,6,12,10,7,1,8 rem weilnotycrap 130
data 7,11,12,2,3,10,9,8,6,4,1,5 rem wiltyraponce
data 3,1,9,10,2,4,7,8,6,5,11,12 rem clantropeiwy
data 10,11,8,2,1,3,6,4,5,9,7,12 rem linprowetacy
data 5,9,3,11,4,6,7,12,8,10,1,2 rem wyelanorctip
data 11,9,8,6,3,12,2,7,5,4,1,10 rem woltripecyan 135
data 2,8,9,6,12,7,11,4,5,10,3,1 rem yawprincetol
data 2,12,7,5,1,6,11,10,8,3,4,9 rem latwinerypoc
data 2,1,4,12,11,7,6,5,3,8,9,10 rem carepontwyli
data 7,8,3,11,5,4,1,2,10,12,9,6 rem openlyacwrit
data 6,9,3,10,7,4,1,2,11,8,5,12 rem openwaltciry 140
data 7,10,4,8,9,1,2,3,11,5,6,12 rem nopetwailcry
data 7,4,9,2,6,8,11,12,3,10,1,5 rem wircylanetop
data 11,1,9,7,2,4,3,12,8,10,6,5 rem clonywiretap
data 5,8,12,3,9,11,10,7,2,1,6,4 rem triyawpclone
data 2,10,11,9,8,4,7,6,12,1,3,5 rem tawnypolicer 145
data 2,11,12,10,9,4,8,7,5,1,3,6 rem tawnrypolice
data 8,11,6,4,3,10,2,1,9,5,7,12 rem politewarncy
data 5,11,2,10,9,3,8,7,6,4,1,12 rem wentarpolicy
data 11,5,8,3,10,4,6,9,7,1,2,12 rem twincoreplay
data 11,6,8,5,10,4,1,9,7,3,2,12 rem owtnicreplay 150


16
Yabasic / Animated Lotto
« on: April 03, 2026 »
I wanted to do this years ago.
Couldn't even imagine how to code it.
Tried with various coding methods I'd learnt.
Finally got it.

It does a few things using the D-pad.
Down does the basic operation.
Left shows the last 20 randoms.

Code: [Select]
num=40

dim xs(num)
dim ys(num)
dim xe(num)
dim ye(num)

row=0
col=1
for a=1 to num
row=row+1
if row>8 then
col=col+1
row=1
endif
xs(a)=row*30+185
ys(a)=col*30+60
xe(a)=row*30+185
ye(a)=col*30+60
next a

amount=6
dim lot(amount)

b=20
a=6
dim lit(b,a)

dim shade(20)
for a=1 to 20
if frac(a/2)=0 shade(a)=50
if frac(a/2)=.5 shade(a)=100
next a

keys=16
dim go(keys)
dim g(keys)

shape=3
off=1
t=0
count=200
stop=1

open window 640,512
repeat
setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window
c=peek("port1")

for a=1 to keys
if and(c,2^(a-1))<>0 go(a)=1
if go(a)=1 g(a)=g(a)+1
if g(a)>2 g(a)=2
if g(a)=2 go(a)=0
if and(c,2^(a-1))=0 g(a)=0
next a

if go(6)=1 stop=stop+1
if stop>2 stop=1
if stop=1 sp=2
if stop=2 sp=0

if go(8)=1 off=off+1
if off>3 off=1

if go(5)=1 shape=shape+1
if shape>3 shape=1

if go(7)=1 then
for b=1 to amount
0 lot(b)=int(ran(40))+1
for a=1 to b
if a<>b if lot(b)=lot(a) goto 0
next a
next b
endif

if go(7)=1 t=t+1
if t>20 t=1
for b=1 to 20
for a=1 to 6
if t=b lit(b,a)=lot(a)
next a
next b

if go(6)=1 t=0
for b=1 to 20
for a=1 to 6
if go(6)=1 lit(b,a)=0
next a
next b

for a=1 to 20
setrgb 1,shade(a),shade(a),shade(a)
if off=3 fill rectangle 205,a*11+271 to 445,a*11+282
next a

for b=1 to 20
for a=1 to 6
if t=b setrgb 1,0,256,0
if t<>b setrgb 1,256,256,256
if off=2 or off=3 text a*42+167,b*11+280,str$(lit(b,a),"##")
next a
next b

row=0
if go(7)=1 if count=200 then
count=0
for b=1 to num
for a=1 to amount
if lot(a)=b then
row=row+1
xe(b)=row*42+175
ye(b)=260
endif
next a
next b
endif

count=count+1
if count>200 count=200

row=0
col=1
if count=200 then
for a=1 to num
row=row+1
if row>8 then
col=col+1
row=1
endif
xe(a)=row*30+185
ye(a)=col*30+60
next a
endif

for a=1 to num
if xs(a)>xe(a) xs(a)=xs(a)-sp
if xs(a)<xe(a) xs(a)=xs(a)+sp
if ys(a)>ye(a) ys(a)=ys(a)-sp
if ys(a)<ye(a) ys(a)=ys(a)+sp
next a

setrgb 1,256,256,256
for a=1 to num
text xs(a)-10,ys(a)+3,str$(a,"##")
if a<10 text xs(a)-10,ys(a)+3,"0"
if shape=2 rectangle xs(a)-15,ys(a)-15 to xs(a)+15,ys(a)+15
if shape=1 circle xs(a),ys(a),15
next a

for b=1 to num
for a=1 to amount
if lot(a)=b then
if count<200 setrgb 1,0,256,0
if stop=1 setrgb 1,256,256,256
text xs(b)-10,ys(b)+3,str$(b,"##")
if b<10 text xs(b)-10,ys(b)+3,"0"
endif
next a
next b

setrgb 1,256,256,256
x=0
y=1
for a=1 to num
x=x+1
if x>8 then
y=y+1
x=1
endif
if shape=3 rectangle x*30-15+185,y*30-15+60 to x*30+15+185,y*30+15+60
next a

until (1=0)

17
I had long forgotten my password when trying to login - in windows 10.
Then I remembered.
I had been using windows 7, which had the password.
I still had laptop with windows 7.
Relief.

18
General chat / Logging in
« on: June 12, 2025 »
Google saves passwords for automatic login.
A good thing because I have no idea what mine is now.
I had been trying to log in up until a few weeks ago.
And I couldn't.
It seemed google lost the dbf password.
It actually didn't have it - in windows 10.
So I brushed off a mini-laptop still loaded with windows 7.
My recent posts have made with the mini.
It's fifteen years old and luckily still reliable.
Interesting.

19
Yabasic / Orbiting Planets
« on: June 09, 2025 »
I reverse engineered an old program with the only sample
of sorting I found. It's easier to use and understand.
This is my first moving graphic. Just one axis and no perspective.
Up arrow - change direction/stop
Left arrow - random postion
Right arrow - change view
Down arrow - change colour/no colour

Code: [Select]
open window 640,512
x=320
y=256
ang=pi/180
rain=20
dim R(rain)
dim G(rain)
dim B(rain)
dim dir(rain)
dim dist(rain)
dim sp(rain)
dim x1(rain)
dim y1(rain)
dim size(rain)
dim order$(rain)

for a=1 to rain
R(a)=int(ran(200))
G(a)=int(ran(200))
B(a)=int(ran(200))
dir(a)=int(ran(360))
dist(a)=int(ran(15))*20+20
next a

shape=4
turn=2
col=1

keys=16
dim go(keys)
dim g(keys)

key=16
dim go1(key)

repeat
setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window
c=peek("port1")

for a=1 to keys
if and(c,2^(a-1))<>0 go(a)=1
if go(a)=1 g(a)=g(a)+1
if g(a)>2 g(a)=2
if g(a)=2 go(a)=0
if and(c,2^(a-1))=0 g(a)=0
next a

for a=1 to key
if and(c,2^(a-1))<>0 go1(a)=1
if and(c,2^(a-1))=0 go1(a)=0
next a

if go(6)=1 shape=shape+1
if shape>4 shape=1
text 12,24,str$(shape)

if go(5)=1 turn=turn+1
if turn>4 turn=1

if go(7)=1 col=col+1
if col>2 col=1

for a=1 to rain
if turn=3 or turn=1 dir(a)=dir(a)+0
if turn=2 dir(a)=dir(a)+sp(a)
if dir(a)>359 dir(a)=0
if turn=4 dir(a)=dir(a)-sp(a)
if dir(a)<0 dir(a)=359
next a

for a=1 to rain
if shape=5 then
dir(a)=a*(360/rain)
dist(a)=200
endif
next a

for a=1 to rain
if go(8)=1 then
dir(a)=int(ran(360))
dist(a)=int(ran(230))+20
endif
next a

for a=1 to rain
order$(a)=str$(size(a))
next a

for k=1 to rain-1
for j=1 to rain-k

if order$(j)>order$(j+1) then

temp=size(j)
size(j)=size(j+1)
size(j+1)=temp

temp=R(j)
R(j)=R(j+1)
R(j+1)=temp

temp=G(j)
G(j)=G(j+1)
G(j+1)=temp

temp=B(j)
B(j)=B(j+1)
B(j+1)=temp

temp=dir(j)
dir(j)=dir(j+1)
dir(j+1)=temp

temp=dist(j)
dist(j)=dist(j+1)
dist(j+1)=temp

temp=x1(j)
x1(j)=x1(j+1)
x1(j+1)=temp

temp=y1(j)
y1(j)=y1(j+1)
y1(j+1)=temp

temp$=order$(j)
order$(j)=order$(j+1)
order$(j+1)=temp$

endif

next j
next k

for a=1 to rain
x1(a)=cos(dir(a)*ang)*dist(a)+320
y1(a)=sin(dir(a)*ang)*dist(a)+256
sp(a)=25/dist(a)
size(a)=(y1(a)/500)*3
next a

for a=1 to rain
if shape=1 line x,y to x1(a),y1(a)
if shape=2 then
if col=1 or col=2 then
setrgb 1,256,256,256
circle x1(a),y1(a),15
endif
if col=2 then
setrgb 1,R(a),G(a),B(a)
fill circle x1(a),y1(a),14
endif
endif
if shape=3 then
setrgb 1,256,256,256
text x1(a),y1(a),"*"
endif
if shape=4 then
fill circle x1(a),256,12*size(a)
if col=1 setrgb 1,0,0,0
if col=2 setrgb 1,R(a),G(a),B(a)
fill circle x1(a),256,11*size(a)
setrgb 1,256,256,256
endif
'if shape=5 line x1(a),10*size(a)+240 to x1(a),10*size(a)+270
next a

text 0,12,str$(dir(1),"###")

until (1=0)


20
Yabasic is just perfect. The emulator just made it better.
I found the emulator before dbf went live and copies of
the first only download have been loaded on all computers
I've owned. My first program was my biggest. It took 3
months to write, get it to run and debug it and it was
written on PS2 console yabasic. When the emulator
came along, I baulked at having to re-type it.
Then I heard that memory cards could be tranferred to computer.
So I asked Jim about it. He had the gear. I sent him 3
years of work and he put it on this site.
I have copies of that everywhere too.
I have written far more since then and my best stuff
is on this site. I wished there coding samples when I started.

Pages: [1] 2 3 4 5 6 7 8 ... 11