Author Topic: Then, suddenly, I just felt like it.  (Read 3011 times)

0 Members and 1 Guest are viewing this topic.

Offline bikemadness

  • Amiga 1200
  • ****
  • Posts: 312
  • Karma: 25
  • Hard players don't go home.
    • View Profile
Then, suddenly, I just felt like it.
« on: January 01, 2011 »
I have a DVD collection that I update and catalogue using Yabasic,
but I spent a whole day playing with an earlier program posted here.
Nothing new to report - I got out the pencil and paper and made a few simple pictures.

The time just flew by.

Very nice to see this place is still going.

Oh, and happy new year!

Code: [Select]
open window 640,512
restore shape
read maxnum
dim shape$(maxnum),m(maxnum)
for a=1 to maxnum
read shape$(a)
next a
dim xfish(108),yfish(108)
dim xcat(108),ycat(108)
dim xsnail(108),ysnail(108)
dim xbird(108),ybird(108)
for a=1 to 108
read xfish(a),yfish(a)
next a
for a=1 to 108
read xcat(a),ycat(a)
next a
for a=1 to 108
read xsnail(a),ysnail(a)
next a
for a=1 to 108
read xbird(a),ybird(a)
next a
sel=1
blox=108
dim x(blox),y(blox),x1(blox),y1(blox)
for a=1 to blox
x(a)=int(ran(25))*20+20
y(a)=int(ran(23))*20+20
x1(a)=x(a)
y1(a)=y(a)
next a
repeat
setdrawbuf vm
vm=1-vm
setdispbuf vm
clear window
c=peek("port1")
setrgb 1,100,100,100
fill rectangle 0,0 to 640,512
for a=1 to maxnum
if sel=a then
setrgb 1,0,250,0
else
setrgb 1,30,30,30
endif
text 560,a*20+100,shape$(a)
next a
go=go+1
if go>20 go=20
if and(c,16)>0 and go=20 then
sel=sel-1
go=0
endif
if sel<1 sel=maxnum
if and(c,64)>0 and go=20 then
sel=sel+1
go=0
endif
if sel>maxnum sel=1
for a=1 to blox
if x(a)>x1(a) x(a)=x(a)-1
if x(a)<x1(a) x(a)=x(a)+1
if y(a)>y1(a) y(a)=y(a)-1
if y(a)<y1(a) y(a)=y(a)+1
if and(c,16384)>0 and x(a)=x1(a) and y(a)=y1(a) and sel=1 then
x1(a)=int(ran(25))*20+20
y1(a)=int(ran(23))*20+20
endif
if and(c,16384)>0 and sel=2 then
x1(a)=xfish(a)
y1(a)=yfish(a)
endif
if and(c,16384)>0 and sel=3 then
x1(a)=xcat(a)
y1(a)=ycat(a)
endif
if and(c,16384)>0 and sel=4 then
x1(a)=xsnail(a)
y1(a)=ysnail(a)
endif
if and(c,16384)>0 and sel=5 then
x1(a)=xbird(a)
y1(a)=ybird(a)
endif
setrgb 1,250,150,0
fill rectangle x(a)-10,y(a)-10 to x(a)+10,y(a)+10
setrgb 1,0,0,0
rectangle x(a)-10,y(a)-10 to x(a)+10,y(a)+10
next a
until (1=0)
label shape
data 5
data "random","fish","cat","snail","bird"
'fish coords
data 140,40,120,40,100,60,100,80,80,100,80,120,80,140,80,160,80,180
data 80,200,80,220,80,240,100,260,100,280,120,280,80,300,100,320,120,320
data 140,320,160,320,180,340,200,340,160,360,140,360,120,380,140,400,160,400
data 180,400,200,400,220,380,240,380,260,400,280,400,300,400,300,380,320,400
data 340,420,360,440,380,460,400,460,400,440,400,420,380,400,420,420,440,420
data 440,400,440,380,440,360,440,340,440,320,420,300,400,280,380,280,360,260
data 340,260,320,240,300,240,280,220,260,200,240,180,220,180,220,160,220,200
data 220,220,200,220,180,220,160,200,140,200,120,180,140,160,160,140,180,120
data 160,120,140,120,140,100,140,80,140,60,360,360,380,360,380,340,400,340
data 380,320,360,320,340,340,320,280,300,280,280,300,280,320,300,340,440,260
data 440,220,420,180,380,160,400,140,380,120,360,140,320,120,340,100,320,80
data 300,100,260,80,260,60,240,40,220,40,200,60,200,80,220,100,240,100
'cat coords
data 200,20,180,40,180,60,180,80,180,100,200,120,200,140,180,140,160,140
data 140,140,120,160,100,180,80,200,60,220,60,240,60,260,60,280,60,300
data 60,320,60,340,60,360,100,360,80,380,80,400,80,420,100,440,120,440
data 140,440,160,440,180,440,200,440,220,440,240,440,260,440,280,440,300,440
data 320,460,340,460,340,440,340,420,320,420,300,420,280,420,260,420,240,420
data 220,420,200,420,180,420,160,420,140,400,140,380,180,380,200,380,220,380
data 240,380,260,380,280,380,260,400,260,360,260,340,260,320,260,300,260,280
data 280,260,280,240,280,220,280,200,280,180,280,160,300,140,300,120,300,100
data 320,80,320,60,320,40,300,40,280,60,260,60,240,60,220,40,160,240
data 180,220,200,240,220,240,220,260,220,280,220,300,220,320,220,340,200,360
data 400,380,380,380,360,380,340,360,320,340,320,320,320,300,340,280,360,260
data 380,260,400,260,420,280,440,300,440,320,440,340,420,360,440,380,460,380
'snail coords
data 160,240,160,220,180,200,180,180,200,160,220,140,240,120,260,100,280,100
data 300,80,320,80,340,80,360,100,380,100,400,100,420,120,440,120,460,140
data 460,160,480,180,480,200,480,220,480,240,480,260,460,280,460,300,440,320
data 420,340,400,340,380,360,360,360,340,360,320,340,300,340,280,320,280,300
data 280,280,300,260,300,240,320,220,340,220,360,220,380,240,400,260,380,280
data 360,300,340,280,260,320,240,300,220,300,300,260,200,280,180,280,160,260
data 140,260,120,260,100,260,80,280,80,300,80,320,100,340,120,340,140,340
data 160,340,180,340,200,360,220,360,240,360,260,380,280,380,300,380,320,400
data 340,400,360,400,380,400,400,400,420,380,440,380,460,380,480,380,500,360
data 520,340,500,340,480,340,460,340,440,340,100,240,80,220,60,200,40,180
data 20,180,20,160,40,160,60,260,40,260,20,260,20,240,40,240,120,400
data 60,420,100,420,120,420,140,420,80,440,100,440,120,440,140,440,160,440
'bird coords
data 40,40,40,60,40,80,20,100,20,120,40,140,40,160,60,140,80,140
data 80,160,80,180,60,200,60,220,80,240,80,260,100,280,120,300,140,320
data 160,340,180,360,200,380,200,400,200,420,180,440,160,440,140,440,200,460
data 220,460,300,440,280,440,260,440,240,440,240,420,220,400,220,380,220,360
data 220,340,260,400,260,380,240,240,260,260,260,280,280,300,280,320,300,340
data 300,360,160,160,140,160,120,180,120,200,120,220,140,240,140,260,160,260
data 180,280,200,300,220,320,240,320,260,340,280,360,300,380,320,380,340,380
data 360,380,360,400,380,400,380,420,400,420,400,440,420,440,440,440,460,440
data 480,420,420,420,420,400,440,380,460,380,500,360,480,360,460,360,440,360
data 420,360,400,360,380,340,360,340,340,320,320,300,320,280,300,260,300,240
data 280,220,280,200,260,180,240,160,220,140,200,120,180,100,180,80,180,60
data 180,40,180,20,160,20,140,40,120,20,100,20,80,20,60,20,80,80

I might add a couple more. To this post.

Anyone else like to try?


Have a Yahappy day.
I don't know what is wrong with the world - but I know how to fix it.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17407
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Then, suddenly, I just felt like it.
« Reply #1 on: January 08, 2011 »
I like the way that they morph, they must have taken a while to design :-)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Wenlock

  • C= 64
  • **
  • Posts: 68
  • Karma: 4
  • BASIC & Testcards rule.
    • View Profile
Re: Then, suddenly, I just felt like it.
« Reply #2 on: January 10, 2011 »
Looks cool on the emulator, will try it on PS2/3 soon.

Still love typing listings.
YABASIC ROOLZ!