Yabasic (for the PS2)

I found Yabasic as an extra for a PS2 demodisc, and i recently dug it out from my Ps2 pile. it is a fun and simple piece of software for creating small programs, in which you type a command (eg. print, input, goto, beep etc.) and then a piece of text. here is a code for a simple number guess program, sorry for mistakes
REM Number guess game
print "I am thinking of a number between 1 and 50, try to guess it!"
input a$
if (a$>13) then
print "your number was larger than mine!"
goto input
endif
elseif (a$<13) then
print "your number was smaller than mine!"
goto input
endif
elseif (a$=13) then
print "My number was 13! Congratulations, you win!"

Feel free to edit the prints, and the number doesn't have to be 13. there are other things involving string variables and other commands. heres one called identitiy finder

REM Identity finder program
Print "What is your name?" :":
input a$
Print "How old are you, ",a$,"?" :":
Input b$
Print "And where do you live, ",a$,"?" :":
Input c$
Print "so your name is ",a$,", you are ",b$," years old and you live in ",c$,", correct?"
Pause 5

Feel free to add more string variables, just add them as d$, e$, f$ etc.

anyway, post coding for more yabasic programs, and use the stuff above!

4QLADY7 years ago
Commands from the PS2 controller can also be included.

this is a keyboard game - using the controller.

open window 640,512
score=0
lives=10
mlr=1
mud=1
size=96
fst=1
letters=20
dim x(letters),y(letters),m(letters)
dim z(letters),case(letters)
for a=1 to letters
case(a)=int(ran(2))
if case(a)=0 l=65
if case(a)=1 l=97
x(a)=int(ran(64))*10
y(a)=ran(100)+60
m(a)=ran(1)+0.1
z(a)=int(ran(26)+l)
next a
repeat
setdispbuf vm
vm=1-vm
setdrawbuf vm
clear window
hold=hold+fst
if hold>10 go=1
if hold>10 hold=10
c=peek("port1")
if and(c,32)>0 and go=1 then
mlr=mlr+1
hold=0
go=0
endif
if and(c,128)>0 and go=0 then
mlr=mlr-1
hold=0
go=0
endif
if and(c,16)>0 and go=3 then
mud=mud-1
size=96
hold=0
go=0
endif
if and(c,64)>0 and go=3 then
mud=mud+1
size=64
hold=0
go=0
endif
if mlr>26 mlr=1
if mlr<1 mlr=26
if mud<1 mud=1
if mud>2 mud=2
if and(c,32)>0 or and(c,128)>0 then
skp=skp+1
if skp>20 fst=10
if skp>20 skp=20
else
skp=0
fst=1
endif
rectangle mlr*15+148,mud*20-15 to mlr*15+163,mud*20+5
for L=1 to 26
text 15*L+150,20,chr$(L+96)
text 15*L+150,40,chr$(L+64)
next L
line 0,45 to 640,45
for a=1 to letters
case(a)=int(ran(2))
if case(a)=0 l=65
if case(a)=1 l=97
y(a)=y(a)+m(a)
text x(a),y(a),chr$(z(a))
if y(a)>512 then
lives=lives-1
y(a)=60
x(a)=int(ran(64))*10
z(a)=int(ran(26)+l)
endif
if and(c,16384)>0 and chr$(size+mlr)=chr$(z(a)) then
score=score+1
y(a)=60
x(a)=int(ran(64))*10
z(a)=int(ran(26)+l)
endif
next a
text 20,20,"score="+str$(score)
text 20,40,"lives="+str$(lives)
until (1=0)

NachoMahma9 years ago
. Use the ran() function to set the target number in your first listing. Eg:
  t$=ran(50)
. If Yabasic is like the BASICs I've used, you will get a casting/typing error, since t$ is a string variable and ran() returns a number. If so, change t$ to t.
The Jamalam (author)  NachoMahma9 years ago
ok, ill try that later!