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 - SERGIO_ManOwaR_

Pages: [1] 2
1
Yabasic / Re: YA-GOLF MINI Super challengue
« on: July 15, 2012 »
Hi Sergio,
When I use up/down/left/right with my USB adapter and DS2, I get the same as you
Up 256
Right 512
Down 1024
Left 2048


Thx so much jim, i was very intrigated about that, so it's very usefull info for me.
So i guess everybody will get the same peek, that means no need to do different profiles for dualshock, just one adapted for that combination. Have a  nice remap routine anyway and its very usefull.
The bad news are that there are 4 keys lost... i'm working in a point n click adventure originally writed for PS2 when the game uses all the buttons for dualshock and it's impossible to emulate with 4 missin in action keys... but as usually, when things go wrong, the ideas gets better, and the 4 keys losed can be emulated in some other ways, for example by double taping some keys... and it's actually maded! :)

see you!

2
Yabasic / Re: More typing done
« on: July 12, 2012 »
Hi wenlock! So, your the crazy typer boy!  Thats a hard work!

I remember when I first meet the yabasic forums at yabasic.uk in 2006 and i don't even had a pc... i used to go to a ciber and print some codes for yabasic.. and type them in my PS2... really hard work specially when i get a TYPING ERROR grrrr....

Typed some games from shockwave and really enjoy it but most time had errors cos i was so excited to finish typin' ad start gaming hahaha.

greetings and see u around.. u really like typing isn't it?  ;D

3
Yabasic / FORCING FLUSH RATE
« on: July 12, 2012 »

If Wenlock decides to type this in it will keep him busy for a long time!

When we were all using this on the PS2 the size of the listing was detrimental to the frame rate... It's really nice to see what can be done without these silly limitations.

Sure! It's exactly 12225 lines of surce code... i can imagin that... weeks and weeks of hard work... and then finally.... time to PRESS START AND ENJOY.....  and then... ERROR!  :o Typing mistake!!! OMFG!!! ;D

Any way, this versions won't work on the ps2 cos' i've started to programm for the emu and the game is intended to flush at 60 FPS.  In ps2 may be work at 0.01 FPS actually with the bitmaps.... hahah

Yes it's really silly limitations... most of my projects were abandoned when i reached the point of FPS DECREASE... and you now.. that's a point of no return!

When fps started to decrease under 24 fps and still so much code to be written i can only say: SH*T!! Another one for the thrash...

Actually im very interested on force flush rate routines. The emu has his own option to force it but it makes the game a little bit limited. When force flush rate is OFF, the game can draw as fast as possible, just as fast as your cpu can do it.
That means that some pcs may show the game at 30 fps and some others could do it at 80 FPS or maybe more... then need to force flush rate from the source code itself.

My first idea was to add pauses  when game is running quiqcly... that was a poor idea, since the FPS RATE could only be checked after one second (of course) adding pauses make the game freeze sometimes until next FPS RATE CHEK decides that there's no need to pause the game. Pause games was quicky rejected.
My second idea consists in leave the game freely drawing as quiqly as it cans, and compensate the slow/quiqck frame rate differences by drawing polygons or something hiden under the "clear window" screen. This means that the game is always drawing AS MUCH POLYGONS AS IT CAN, increasing or decreasing the number of hidden polygons to be drawed until the fps rate is exaclty the fps we want. I dont know if it is a good idea cos' may be to many work for the processor or some... i don't know very well how the hardware works.
At the moment this way to force flush rate is giving me good result but it is still beeing modified to get the optimal routine that can decide  how many polygons draw at any moment to do the perfect compensation. Great differences between screens takes time to compensate (for example draw a bitmap 50x50 pixels= 2500 rectangles) when suddenly stop drawing something big, the FPS RATE increases from 60 to 75 (or maybe more) and needs to be quiqly compensate. Im working so hard in this. Theres a way to quick compensate by keeping the number of polygons drawed on each frame and then discount this value form the hiden poligons to be drawed... but still takes time. The routine is always tring to display game at 60 FPS... if it can't be done for a while, then tries to play at 59...58..59.... and start reducing the number of polyonos and textures (most textures are also hidded on this versions)  untill it can flush smooth.Low Frame rates will result in a worst (but quiqly) bitmaps quality and some other adjust and even the bitmaps can be automatically disabled by the routine if it can work with a minimum of 40 FPS.

So many work with the flush rates and still workin on it. One of the worst things is that the routine takes some time to reach the optimal fps when the game starts so i think that i must do a screen for selecting video quality and leave the routine chek performance for a few seconds to decide how many hiden polygons will be a good choose for starting the game. During the game the routine is permanently doing his work.... but needs to be adjusted for a better performance.

Forcin flush rate from the source code itself may not be a good idea but at this point i was forced to do it cos the game runs slowly with the bitmaps.

Would  like to see some ideas or suggestions about FPS FORCE FLUSH RATE, wich is something that i would never had to handle (cos the ps2 works exacly the same for everybody) but when i tested my game in different pcs was shocked to see so many different results...

see u shockwave!

4
Yabasic / About DUALSHOCK 2
« on: July 12, 2012 »

Most of the joystick drivers these days come with a configuration control panel that lets you remap buttons - does yours have that?


Hi jim!! Ive tried most of the drivers and softwares for usb dualshock converters. Even some very usefull profilers like motioninjoy which allows to remape everything, but it doesn't recognize dualshock 2, only dualshock 3... so i can't go any far.. just waiting for any results if anybody can do the peek("port1") test and then decide what do about it.

I've been thinking that maybe some people just plug and play ok but any other with the same usb converter that i have will probably get the same result so it would be a good idea create some kind of "profiles" in games to be choosen until the user's dualshock becames 100% compatible. That would be a solution.  cheers!

5
Yabasic / SUDOKU GENERATOR for Yabasic
« on: July 12, 2012 »
Shared my old ps2 sudoku generator with a quiqk fix to play in the emulator.

There is only one possible solution to solve the soduku combatking, since the soduku was created and stored:The numbers stay fixed in the matrix and never change.
The player may do all the changes he want to do, that dosn't affect the solved sudoku matrix. Remeber there must be at least two matrix: the one with the right numbers that are fixed and other one for temporary numbers where player may change numbers as will.

I see this is getting hot so i've decided to share my old sudoku generator, but it is not yet 100% compatible with the emu.

The game uses a combination of single and double display buffers that is buggie in the emu so need to configure the emu.
Instructions to configure emu are in the source code.

The controls are terrible wrong... they are based on the PS2 CPU process times to make some short pauses between key presses that in the emulator gets a horrible result.

I've just fixed some bugs and make the translation to english and share to start see how is it what we are talking about.

Promise to review the code and put it in clear and adapted for emulator.

The game is a demo that generates random sudokus you can play with no time limit until you solved it.

Can choose different difficulties and that will show more or less clue numbers in board at the beginning of the game.

Player can place numbers as will, and the game will chek if match automatically.

There are color codes for the numbers.

BLACK: Fixed numbers. This are the clue numbers and can't be erased

RED: Temporary numbers: This are the numbers the player puts on the board and can be true or false, dosn't matter

GREEN: This numbers have been cheked and are RIGHT. Can't be erased.

The controls were bassed on the dualshock, so there's no keyboard to input numbers!!

CONTROLS ARE EXPLAINED ON SCREEN.


Sudoku takes up to 1 minute to generate. I maded a creating screen for the while.
I have tried to generate sudokus as fast as possible and with no info on screen and in the emulators are generated in just a few seconds so i will change that cos' is boring to wait so many time.

This is it.. sudoku generator.. working horrible but enough to understand the basics. As i said, promise to review this and make an adapted version for the emulator working nice, but for now i will be a little bussy.

PLAY RANDOM SUDOKU! :D

See u combatking!

Code: [Select]


' S U D O K U  G E N E R A T O R  D E M O
'
' HI EVERYODY IN YABASIC FORUMS!
'
' This little demo was maded originally in 2006 for the ps2
' and i'm sharing to show routines to create sodokus are easy
' and 100% trustable.
'
' Sorry for the crappy source code, this is the originall old ps2
' code and i've just fix some changes for the emulator.
'
' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
' W A R N I N G !!!
'
' THIS GAME NEED AN ESPECIFIC CONFIGURATION OF THE
' EMULATOR TO RUN PROPERLY!
'
'
' GO TO: Win32 yabasic emulator>EDIT>OPTIONS
' and do the next settings:
'
' SYNC TO:Ps2
' FORCE FLUSH RATE:ON
'
' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   
' Greetings to everybody, hope some day can put in clear this code
' and share somethingh pretty much beautiful than this is.

' PLAY RANDOM SUDOKU!! :)








open window 1,1:poke "textalign","lt"
total=2
lp=12
dim pl(150,150)

px=-20
py=-5
t=48
t2=t/lp
for z=0 to 9:for zz=1 to lp*lp
read pl(z,zz):rem figura,bit
next:next





dim n(9,9)
dim v(9,9)
dim p(9,9)
dim c(9,9)






 for z=0 to 9
 for zy=1 to lp
 for zx=1 to lp
'  if pl(z,zy*lp-lp+zx)=1 ?"$";
'  if pl(z,zy*lp-lp+zx)=0 ?".";
 next
 next

 next


dif=1
setrgb 0,120,120,120


label menu
s=s+1
jx=5
jy=5
nuevo=1
inpu=0
minu=0
segu=0
resul=0

setdrawbuf buf:setdispbuf 1-buf
clear window
setrgb 1,0,0,0

texto_1( 320,50,"S U D O K U  M A N I A   0.1")
texto_1( 320,120,"DEMO VERSION.")
texto_1( 320,150,"P L A Y  A  R A N D O M  S U D O K U ")
texto_1( 180,295,"D I F F I C U L T Y:")
texto_1( 320,395,"PRESS [Ins] TO CONTINUE")
texto_1( 320,370,"Press [ ] [ ] to choose game difficulty")
texto_1( 320,450,"ฉ Sergio Ba๑o Soeiro 2006,2012")


for z=320 to 520 step 50
circle z,290,20
next
for z=320 to 320+dif*50-50  step 50
setrgb 1,0,0,0
fill circle z,290,17
setrgb 1,222,222,0
fill circle z-2,288,16
setrgb 1,222,222,222
fill circle z-4,286,15
setrgb 1,222,222,0
fill circle z-2,288,14

next


setrgb 1,222,222,0
texto_1 (318,448,"ฉ Sergio Ba๑o Soeiro 2006,2012")
texto_1 (318,48,"S U D O K U  M A N I A   0.1")


setdispbuf buf:buf=1-buf




label tec
k=peek("port1")

if k=128 then dif=dif-1:if dif<0 dif=0:pause .1:beep:goto menu:fi
if k=32 then dif=dif+1:if dif>5 dif=5:pause .1:beep:goto menu:fi
if not k=32768 goto tec


for y=1 to 9:for x=1 to 9
p(x,y)=0
c(x,y)=0
next:next


setdrawbuf buf:setdispbuf 1-buf
clear window
setrgb 1,0,0,0
texto_1( 320,15,"C R E A T I N G   S U D O K U")
texto_1( 320,35,"P L E A S E  W A I T . . .")
setdispbuf buf:buf=1-buf

crear()



1


 setdrawbuf buf:setdispbuf 1-buf
clear window


setrgb 1,0,0,0
for zy=1 to 10 step 3
fill rect 28,py-3+zy*t,461,py+zy*t+3
next
for zx=1 to 10 step 3
fill rect px-3+zx*t,40,px+zx*t+3,478
next

for zy=1 to 9
for zx=1 to 9
setrgb 1,0,0,0
rect px+zx*t,py+zy*t,px+zx*t+t,py+zy*t+t

if v(zx,zy)>0 dib(n(zx,zy),zx,zy)
if p(zx,zy)>0 dib(p(zx,zy),zx,zy)


next
next


setdispbuf buf:buf=1-buf

if compl=81 then t(2):goto chek:goto menu:fi



2

if pul>0  then
k2=peek("port1")
if k2<>pul then timpul=0:fi
if k2=pul then timpul=timpul+1:fi
if k2=0 pul=0
if k2>=32768 timpul=33
fi

k=peek("port1")
if pul>0  then
if timpul<33 k=0
fi
if pul=0 pul=k


if and (k,16384)>0 then

if inpu=0 and  p(jx,jy)>0 then beep:
 pause .1
setrgb 1,120,120,120:fill rect -16+jx*t,jy*t,-24+jx*t+t,-10+jy*t+t:p(jx,jy)=0:fi
if inpu=1 then beep
 pause .1
setrgb 1,120,120,120:fill rect -16+jx*t,jy*t,-24+jx*t+t,-10+jy*t+t:p(jx,jy)=0:inpu=0:fi

fi




if and (k,32768)=0 and inpu=1 then inpu=0
setrgb 1,120,120,120
fill rect -16+jx*t,jy*t,-24+jx*t+t,-10+jy*t+t
if nuevo>0 then p(jx,jy)=nuevo:dib(p(jx,jy),jx,jy)

z=p(jx,jy)
revi=0
faltan=0
compl=0
for y=1 to 9:for x=1 to 9
if n(x,y)=z and v(x,y)=0 and p(x,y)<>z faltan=faltan+1
if (v(x,y)>1 and n(x,y)=z)  or (v(x,y)=0 and p(x,y)=z) then revi=revi+1:if revi>9 faltan=9:fi

if v(x,y)>0 or p(x,y)>0 compl=compl+1
next
next



if faltan=0 then for y=1 to 9:for x=1 to 9
if n(x,y)=z v(x,y)=2
next:next

w()
texto_1( 320,200,"A L L  N U M B E R S  "+str$(z)+"  A R E  R I G H T")
t(1):w()
goto 1
fi


fi:fi











if and (k,32768)>0 and v(jx,jy)=0 then
if inpu=0 then
setrgb 1,255,0,0
fill rect -16+jx*t,jy*t,-24+jx*t+t,-10+jy*t+t
fi

' if p(jx,jy)>0 nuevo=p(jx,jy)
inpu=1
dr=dr*1.1
dib (nuevo,jx,jy)
br=255
fi






if inpu=1 then
if and (k,16)>0 then
setrgb 1,120,120,120
fill rect -16+jx*t,jy*t,-24+jx*t+t,-10+jy*t+t
nuevo=nuevo+1:if nuevo=10 nuevo=1
br=255
dib(nuevo,jx,jy)
pause .1
fi

if and (k,64)>0 then
setrgb 1,120,120,120
fill rect -16+jx*t,jy*t,-24+jx*t+t,-10+jy*t+t
nuevo=nuevo-1:if nuevo=0 nuevo=9
br=255
dib(nuevo,jx,jy)
pause .1
fi


fi:rem inpu=1


if inpu=0 then
mov=0
if and (k,16)>0 then
setrgb 1,120,120,120
rect -17+jx*t,-2+jy*t,-24+jx*t+t,-9+jy*t+t
rect -16+jx*t,-1+jy*t,-25+jx*t+t,-10+jy*t+t
rect -15+jx*t,jy*t,-26+jx*t+t,-11+jy*t+t
jy=jy-1:if jy=0 jy=9
mov=1
fi

if and (k,64)>0 then
setrgb 1,120,120,120
rect -17+jx*t,-2+jy*t,-24+jx*t+t,-9+jy*t+t
rect -16+jx*t,-1+jy*t,-25+jx*t+t,-10+jy*t+t
rect -15+jx*t,jy*t,-26+jx*t+t,-11+jy*t+t
jy=jy+1:if jy=10 jy=1
mov=1
fi
if and (k,32)>0 then
setrgb 1,120,120,120
rect -17+jx*t,-2+jy*t,-24+jx*t+t,-9+jy*t+t
rect -16+jx*t,-1+jy*t,-25+jx*t+t,-10+jy*t+t
rect -15+jx*t,jy*t,-26+jx*t+t,-11+jy*t+t
jx=jx+1:if jx=10 jx=1
mov=1
fi
if and (k,128)>0 then
setrgb 1,120,120,120
rect -17+jx*t,-2+jy*t,-24+jx*t+t,-9+jy*t+t
rect -16+jx*t,-1+jy*t,-25+jx*t+t,-10+jy*t+t
rect -15+jx*t,jy*t,-26+jx*t+t,-11+jy*t+t

jx=jx-1:if jx=0 jx=9
mov=1
fi
fi:rem inpu=0


if k=2 then t=t*.9:t2=t/7:goto 1:fi
if k=4 then t=t*1.1:t2=t/7:goto 1:fi

if k=1 then
setrgb 1,0,0,0:fill rect 40,100,600,412
setrgb 1,222,222,222


for z=1 to 9
faltan=0
for y=1 to 9
for x=1 to 9



















if n(x,y)=z and v(x,y)=0 and p(x,y)<>z faltan=faltan+1
next
next


if faltan=0 then texto_1( 320,120+z*20,"A L L  N U M B E R S  "+str$(z)+"  A R E  R I G H T")
for y=1 to 9:for x=1 to 9
if n(x,y)=z v(x,y)=2
next:next
fi

if faltan>0 texto_1( 320,120+z*20,"N U M B E R  "+str$(z)+" : "+str$(faltan)+"  L E F T")
next
pause 2
texto_1( 320,370,"PRESS [Ins] TO CONTINUE")
k(32768)
k(0)
goto 1:fi




if k=8 then
setrgb 1,0,0,0:fill rect 40,100,600,412
setrgb 1,222,222,222
texto_1(320,150,"C H E C K I N G  S U D O K U . . .")
rect 138,200,502,240

loadb=0
resul=100
fallos=0
for y=1 to 9
for x=1 to 9
loadb=loadb+1
fill rect 140,202,140+loadb*4.46,238
if resul<>1 or loadb<15 pause .1
if p(x,y)=0 and v(x,y)=0 resul=1
if v(x,y)=0 and p(x,y)<>n(x,y) fallos=fallos+1
next:next

if resul<>1 and fallos>0 resul=2

if resul=1 texto_1( 320,300,"S U D O K U  I S  N O T  C O M P L E T E D !")

if resul=2 and fallos=1 texto_1( 320,300,"I S  N O T  C O R R E C T!  T H E R E  I S  A  F A I L U R E")
if resul=2 and fallos>1 texto_1( 320,300,"I S  N O T  C O R R E C T!  T H E R E  A R E  "+str$(fallos)+" F A I L U R E S!")

if resul=100 then texto_1( 320,300,"C O N G R A T U L A T I O N S!  I T  I S  C O R R E C T !  :D"):fi

pause 2

texto_1( 320,370,"PRESS [Ins] KEY TO CONTINUE")
k(32768)
k(0)
goto 1:fi




3
 br=br+dr:if br<1 dr=2:if br>255 dr=-3




segn=val(right$(time$,1))
if segn<>sego  then sego=segn:segu=segu+1
if segu>59 then segu=0:minu=minu+1:fi
dibti=1:fi

if dibti=1 then
setrgb 1,0,0,0
fill rect 480,40,620,90
setrgb 1,222,222,222
texto_1(550,45,"TIME:")
texto_1(540,65,str$(minu)+":")
texto_1(560,65,str$(segu))
dibti=0
' pause .03
fi


 if inpu=1 and v(jx,jy)=0 dib (nuevo,jx,jy)
if v(jx,jy)>1 dib (n(jx,jy),jx,jy)
' if v(jx,jy)=0 then

if mov=1 br=255
setrgb 1,br,br,br
rect -17+jx*t,-2+jy*t,-24+jx*t+t,-9+jy*t+t
rect -16+jx*t,-1+jy*t,-25+jx*t+t,-10+jy*t+t
rect -15+jx*t,jy*t,-26+jx*t+t,-11+jy*t+t

' fi
if mov=1 pause .1

goto 2





sub dib(num,xx,yy)

' if v(xx,yy)=0 return

if br=256 then
setrgb 1,br,br,br
rect -17+jx*t,-2+jy*t,-24+jx*t+t,-9+jy*t+t
rect -16+jx*t,-1+jy*t,-25+jx*t+t,-10+jy*t+t
rect -15+jx*t,jy*t,-26+jx*t+t,-11+jy*t+t
fi


setrgb 1,150,0,0
if inpu=1 setrgb 1,br,br,br
if v(xx,yy)=1 setrgb 1,0,0,0
if v(xx,yy)=2 setrgb 1,0,120,0


for y=1 to lp: for x=1 to lp
if pl(num,y*lp-lp+x)=1 fill rect px+xx*t+x*t2-t2,py+yy*t+y*t2-t2,px+xx*t+x*t2,py+yy*t+y*t2
next
next

end sub



sub k(z)
if z>0 then repeat k=peek("port1"):until (k=z):return:fi
if z=0 then repeat k=peek("port1"):until (k=0):return:fi
if z=-1 then repeat k=peek("port1"):until (k<>0):return:fi
end sub

sub w():setrgb 1,0,0,0:fill rect 40,100,600,412:setrgb 1,222,222,222:end sub

sub t(pau)
 pause pau
k(0)
setrgb 1,0,0,0:fill rect 40,335,600,400
setrgb 1,222,222,222
texto_1( 320,370,"PRESS ANY KEY TO CONTINUE")

k(0):inkey$:k(0):end sub


label chek

compl=0
w()
texto_1( 320,150,"C H E C K I N G  S U D O K U . . .")
rect 138,200,502,240

loadb=0:resul=100:fallos=0
for y=1 to 9:for x=1 to 9
loadb=loadb+1
fill rect 140,202,140+loadb*4.46,238
if resul<>1 or loadb<15 pause .05
if p(x,y)=0 and v(x,y)=0 resul=1
if v(x,y)=0 and p(x,y)<>n(x,y) fallos=fallos+1
next:next

if resul<>1 and fallos>0 resul=2

if resul=1 texto_1( 320,300,"T H E  S U D O K U  I S  N O T  C O M P L E T E D!")

if resul=2 and fallos=1 texto_1 (320,290,"I S  N O T  C O R R E C T!  T H E R E  I S  A  F A I L U R E")
if resul=2 and fallos>1 texto_1 (320,290,"I S  N O T  C O R R E C T!  T H E R E  A R E  "+str$(fallos)+" F A I L U R E S!")

if resul=100 then texto_1( 320,290,"C O N G R A T U L A T I O N S!  I T  I S  C O R R E C T !  :D")
text 120,330,"TIME TAKEN: "+str$(minu)+" MINUTES ","lc"
if segu=1 text 400,330,"AND ONE SECOND","lc"
if segu>1 text 400,330,str$(segu)+" SECONDS","lc"

fi


t(1.8):w()
if resul=100 goto menu
compl=0
goto 1





data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0

data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,1,1,0,0,0,0,0
data 0,0,0,0,1,1,1,0,0,0,0,0
data 0,0,0,0,1,1,1,0,0,0,0,0
data 0,0,0,0,0,1,1,0,0,0,0,0
data 0,0,0,0,0,1,1,0,0,0,0,0
data 0,0,0,0,0,1,1,0,0,0,0,0
data 0,0,0,0,0,1,1,0,0,0,0,0
data 0,0,0,0,1,1,1,1,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0

data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,1,1,1,0,0,0,0
data 0,0,0,0,1,1,1,1,1,0,0,0
data 0,0,0,0,1,1,0,1,1,0,0,0
data 0,0,0,0,0,0,0,1,1,0,0,0
data 0,0,0,0,0,0,1,1,0,0,0,0
data 0,0,0,0,0,1,1,0,0,0,0,0
data 0,0,0,0,1,1,1,1,1,0,0,0
data 0,0,0,0,1,1,1,1,1,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0

data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,1,1,1,1,0,0,0,0
data 0,0,0,0,1,1,1,1,1,0,0,0
data 0,0,0,0,0,0,0,1,1,0,0,0
data 0,0,0,0,0,0,1,1,0,0,0,0
data 0,0,0,0,0,0,1,1,0,0,0,0
data 0,0,0,0,0,0,0,1,1,0,0,0
data 0,0,0,0,1,1,1,1,1,0,0,0
data 0,0,0,0,1,1,1,1,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0




data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,1,1,0,0,0,0,0,0,0
data 0,0,0,1,1,0,1,1,0,0,0,0
data 0,0,0,1,1,0,1,1,0,0,0,0
data 0,0,0,1,1,1,1,1,0,0,0,0
data 0,0,0,0,1,1,1,1,0,0,0,0
data 0,0,0,0,0,0,1,1,0,0,0,0
data 0,0,0,0,0,0,1,1,0,0,0,0
data 0,0,0,0,0,1,1,1,1,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0

data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,1,1,1,1,1,0,0,0
data 0,0,0,0,1,1,1,1,1,0,0,0
data 0,0,0,0,1,1,0,0,0,0,0,0
data 0,0,0,0,1,1,1,1,0,0,0,0
data 0,0,0,0,0,1,1,1,1,0,0,0
data 0,0,0,0,0,0,0,1,1,0,0,0
data 0,0,0,0,1,1,1,1,1,0,0,0
data 0,0,0,0,1,1,1,1,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0


data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,1,1,1,1,0,0,0,0
data 0,0,0,1,1,1,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0,0,0,0
data 0,0,0,1,1,1,1,1,0,0,0,0
data 0,0,0,1,1,1,1,1,1,0,0,0
data 0,0,0,1,1,0,0,1,1,0,0,0
data 0,0,0,1,1,1,1,1,1,0,0,0
data 0,0,0,0,1,1,1,1,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0


data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,1,1,1,1,1,0,0,0
data 0,0,0,0,1,1,1,1,1,0,0,0
data 0,0,0,0,0,0,0,1,1,0,0,0
data 0,0,0,0,0,0,1,1,0,0,0,0
data 0,0,0,0,0,0,1,1,0,0,0,0
data 0,0,0,0,0,1,1,0,0,0,0,0
data 0,0,0,0,0,1,1,0,0,0,0,0
data 0,0,0,0,1,1,1,1,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0

data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,1,1,1,0,0,0,0
data 0,0,0,0,1,1,1,1,1,0,0,0
data 0,0,0,0,1,1,0,1,1,0,0,0
data 0,0,0,0,0,1,1,1,0,0,0,0
data 0,0,0,0,0,1,1,1,0,0,0,0
data 0,0,0,0,1,1,0,1,1,0,0,0
data 0,0,0,0,1,1,1,1,1,0,0,0
data 0,0,0,0,0,1,1,1,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0

data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,1,1,1,1,0,0,0,0
data 0,0,0,1,1,1,1,1,1,0,0,0
data 0,0,0,1,1,0,0,1,1,0,0,0
data 0,0,0,1,1,1,1,1,1,0,0,0
data 0,0,0,0,1,1,1,1,1,0,0,0
data 0,0,0,0,0,0,0,1,1,0,0,0
data 0,0,0,0,1,1,1,1,1,0,0,0
data 0,0,0,0,1,1,1,1,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0




label s2

data 30,81,91,10,40,51,21,71,60
data 60,71,40,31,21,91,80,50,10
data 50,10,21,81,70,60,40,90,31
data 91,21,10,70,50,80,60,30,41
data 70,61,81,40,90,30,51,11,21
data 40,31,51,20,60,11,91,80,71
data 11,41,71,90,81,20,30,61,50
data 80,50,30,61,11,41,70,21,91
data 20,90,60,50,30,70,11,41,80


label s1


data 31,81,91,11,41,51,21,71,61
data 61,71,41,31,21,91,81,51,11
data 51,11,21,81,71,61,41,91,31
data 91,21,11,70,51,81,61,31,41
data 71,61,81,41,91,31,51,11,21
data 41,31,51,21,61,11,91,81,71
data 11,41,71,91,81,21,31,61,51
data 81,51,31,61,11,41,71,21,91
data 21,91,61,51,31,71,11,41,81









101 restore s1:return
102 restore s2:return
103 restore s3:return
104 restore s4:return
105 restore s5:return
106 restore s6:return
107 restore s7:return
108 restore s8:return
109 restore s9:return



sub crear()
' xxx=40:yyy=40
i=0

setrgb 1,0,0,0
 texto_1(320,270,"CONTROLS FOR THE GAME:")
 texto_1(320,300,"[ ] [  ][ ] : Move across the board.")
 texto_1(320,320,"[Ins] : Place a new number in an empty cell.")
 texto_1(320,340,"Keep pressed [Ins] and press [ ] or [ ] to switch numbers.")
 texto_1(320,360,"[Delete]: Erase current number. (If allowed)")
 texto_1(320,380,"[ScrUp]: FORCE NUMBERS CHEK.")
 texto_1(320,400,"[ScrDwn]: FORCE SUDOKU CHEK.")

yyy=70
1



rect 40,450,600,490
setrgb 1,cc,cc,cc:cc=cc-6+r:xxx=xxx+10:yyy=yyy-2.5+r/2:if xxx>600 then xxx=40:yyy=yyy+25:fi:if yyy>420 yyy=40:if yyy<40 yyy=540:text xxx,yyy,str$(r)



i=i+1
for y=1 to 9:for x=1 to 9
n(x,y)=0:v(x,y)=0
next:next

for y=1 to 9:for x=1 to 9
celx=1+int(x/3.1):cely=1+int(y/3.1)
repeat
no=0

r=1+int(ran(9))
 for yy=1 to y:if n(x,yy)=r no=1:next
 for xx=1 to x:if n(xx,y)=r no=1:next

for yy=cely*3-2 to cely*3:for xx=celx*3-2 to celx*3:if n(xx,yy)=r and n(xx,yy)>0 no=1
next:next

setrgb 1,0,0,0:fill rect 40,450,40+((y*9-9)+x)*6.91,490

reset=reset+1
if reset=60 no=0
until(no=0)
if reset=60 goto 1
reset=0

n(x,y)=r:v(x,y)=1
' pause .03
next:next
beep

for x=1 to 9
des=2+int(ran(dif*1.2))
repeat
r=1+int(ran(9))
if v(x,r)=1 v(x,r)=0
des=des-1
until(des=0)
next


for y=1 to 9
des=2+int(ran(dif*1.2))
repeat
r=1+int(ran(9))
if v(r,y)=1 v(r,y)=0
des=des-1
until(des=0)
next
PRINT "New Sudoku created after ";:print i;:print " tryings!"
end sub


sub texto_1(x,y,t$)
x=x-len(t$)*5
text x,y,t$
end sub




 

REMEMBER TO CONFIGURE THE EMULATOR:

Sync to:ps2
Single buffer drawing only:ON
Force flush rate:ON


6
Yabasic / Re: 2D SCROLL DEMO
« on: July 12, 2012 »
Quote
My engine is here;

http://members.iinet.net.au/~jimshaw/Yabasic/yabres/games/shockwave/rpg.txt

But it's in a very raw state and it's just flip screen.  It doesn't scroll nively like yours
The RPG project was indeed abandoned - I think that somebody did something with the engine but I forget who it was and what they did unfortunately.

Oh, yes! I remember this from the yabasic resource files!
It was indeed a really good looking project for yabasic!
Sad to be early abandoned.

Today it would be possible to make a really good tyle engine but i guess that means so much work that no ones wants to do it.

I have tyles engines abandoned myself and always looking for new ideas... programming as a hobbie means that you can't spend your life in a project and needs to get fun from new projects.. thats why I suppose most of us like to coding short demos and starting more and more little programms instead of beeing 100% working on a project.

Thanks to share! See you around :)

7
By reading again your post im thinking that yoy may be talking about the posibility of the player doesn't have enough info to be sure of the solution.

Accepting the fact that we have a solved sudoku, what you mean is that with only a few clue numbers (and random) could exist the posibbility for the player not to be sure 100% of a number. That really can happen but dosnt change the fact: Sudoku is solved.
So if few numbers are placed, the player may get stuck in a dead end and need to start tryin trial and error. ฟWhat if this number was here? Let's chek....

That is more with the sudoku "how to play" tips than the "how to program a sudoku". No algorithm usefull here! and no need to do it, just place more or less clue numbers acording the game difficult.

I'm not a great enthusiastic of sudokus, discovered them a few years ago and started to "play" first with a pencil, and later creating a routine for yabasic. By taking a look at the sudokus wroted in thos hobbie books (sorry i dont know hot to call them) i realized that the clue numbers had a very simple pattern:
easy difficult: Show 15-20 random numbers
normal difficult: Show 10-15 random numbers
hard difficult: Show 5-10 random numbers.


thats all!! No algorithm need or something... its so easy!

Of course sometimes the player cant tell 100% that a number is in the right place, but that is one of the particularities of sudoku, and need to start trial and error sometimes... but the sudoku always can be solved. :)

8
No, you must accept the fact that the sudoku is solved even you can't see the numbers. The really important question here is make a creating routine which cheks the rules for sudoku and doesn't finish until it gets a solved sudoku. As I said, in the ps2 this could take up to three minutes (because of the ps2 limitations) but the fact is that placing numbers randomly, you'll finally get a solved sudoku.. dosn't matter how many time takes to do it.
Once you have created the sudoku and stored in a matrix, you can show the numbers you want, just as if you were doing the sudoku in a paper with a pencil, you can draw numbers and erase and try all you want but the solved sudoku is stored and that doesn't change.

In my code I did it this way: (I'm gonna explain you cos' the code is buggie with the emu but gonna try post soon)
1) Create a solved sudoku... SOLVED! or anyway it wont never be created.

2) Hide all the numbers. (Hide for the player but still there stored!)
3) Decide how many clue numbers to show acording the difficult of
    the game.
    Those numbers are choosen random and doesn't matter how
    many of them you show or where are placed because the showed
    numbers dosn't change the fact that we have stored a solved
    sudoku.
    The only thing that changes by showing less clue numbers
    is that the player may have not enough clues to be sure 100%
    if a number is in the right place and would need to try different
    posibilities until get enough info to decide, but remember!! The
    player my not be sure of a number, but of course THE PROGRAM IS
    because solved sudoke is stored.
    Think that even if you show a EMPTY BOARD the sudoku could be
    solved anyway... cos it is actually SOLVED BUT YOU CAN'T SEE IT

Hope you understand and start tryin'. I'm gonna share the sudoku creator as soon as posible to show hot it works and it is
100% ERROR FREE. The really important question of the sudoku creator is this: BE SURE THAT ALL THE SUDOKU RULES ARE CHEKED AND PASSED anytime you place a random number, so the creator will
be "trying" to create sudokus until it finally gets a solved sudoku, and think that the random numbers the creator is trying to place are just temporary numbers and are permanently cheked and deleted until all the number passed the rules, then the sudoku is created, the numbers became FIXED AND STORED.... and you... can do what you want... showing some of those number or no one at all.

The player can also place numbers in the board... but in a different matrix for not to lose the data of the solved sudoku... mess around, place numbers, delete... the player can do anything.
Although not able to see... THE SOLVED SUDOKU IS OUT THERE...  :kewl:

See you! If your really interested in sudoku creator keep an eye around and i'll post something soon.

9
oh sh**.. red clowns are everywhere!! Feels a little opressive!

Congratulations for your first steps into commercial games and hope your work goes so far!

10
...And ever... and ever....  :stirrer: still haven't reached version 1.0

Hi jim!! Nice to meet you!! Finally got something to share... and show yabasic can do good things in the emulator... and even better! :D

I've been very bussy trying to understand how the emu works and now starting to have more experience about what can be done on it (except an .exe file ,isn't it? :'( ) and im really happy for working in the emulator, where each day have a lot of ideas and old projects maded for the ps2 that wantssssssss to be rewrited for the emu and look great! Thanks a lot for the emu, can't stop`saying!

Many people probably won't know that some of the emu's options allows to perform great results for such languaje as yabasic... animations, bitmaps and lots of amazing things can be done.. it's so funny! :D

Thanks for the feedback, the game is really long, i can almost say that a wrote a book ahahah but most of the size is because of the bitmaps data.
Early versions had until 1 mb but now the bitmaps are compressed to save around 60% original size, and still can be reduced more by using run lenght algorithm or 216 color represented by a simple ascii character wich means 1 PIXEL= 1 Byte but it's ok like this.


I have a question for you and I leave it here co's maybe other people should also help on it.

Im very interested on the compatibility with the dualshock 2.
Got a original SONY DS2 plugged to PC Via USB CONVERTER with the right drivers and everything ok. But.... when i make a test to see the pressed keys (with peek("port1")) results that some buttons doesn't work, and others are changed.

Is it a particularity of the emu or maybe i just need another converter and driver?

The arrow keys are the worst... it doesnt work at all for me, but at least when I turn ON the ANALOG button, got a response... but, you know that arrow keys corresponds to peek"port1" numbers 16,32,64,128 and what I got is: 256,512,1024,2048 :O

That won't be a major problem since i can remap the controls for my game in a options menu in case you choose dualshock, the peek " port1" wold change numbers and work ok, but i would like to know if these numbers 256,512,1024,2048 are fixed and everybody has the same test peek "port1" result or it is just me!

It would be a lot of work to change everything in the games and later realise that the changes for the dualshock works only for me and not for everybody. So please if anybody has a dualshock 2 plugged in the pc can do a peek port1 test and chek what numbers get? That would be very usefull for me. Can use this code:

Code: [Select]

REM --------------------------------------------------------
REM CHEK PORT 1 TEST.
REM --------------------------------------------------------
REM PLEASE Plug an original wired sony dualshock 2 and test if
REM It works properly pressing some buttons and cheking if
REM the key_number given corresponds to the original key_number
REM The results will be displayed at the PS2 console window.
REM SEE THE TABLE BELOW FOR THE ORIGINAL KEY_CODES.
' ------------------------------------------------------------
' NAME OF THE BUTTON ' ORIGINAL KEY_CODE
' ------------------------------------------------------------
' SELECT                       1
' L3                           2
' R3                           4
' START                        8
' ARROW UP                    16
' ARROW RIGHT                 32
' ARROW DOWN                  64
' ARROW LEFT                 128
' L2                         256
' R2                         512
' L1                        1024
' R1                        2048
' TRIANGLE                  4096
' CIRCLE                    8192
' CROSS                    16384
' SQUARE                   32768
' ------------------------------------------------------------

1

clear screen
? "------------------------------------------------"
? "PRESS ANY BUTTON IN YOUR DUALSHOCK 2 CONTROLLER"
? "------------------------------------------------"
? "You will obtain a number that corresponds to a key_code."
? "Compare your key_code with the origibal DS key_codes."
? "If the button you pressed matches the original key_code"
? "and button name you were pressing, ITS OK!"
? "------------------------------------------------"
? "Please chek all buttons, especially POV CONTROL"
? "(ARROWS) AND L3,R3"
? "------------------------------------------------"
? "THE BUTTON \"ANALOG\" DOESN'T HAVE A KEY CODE, BUT"
? "BY ACTIVATING ANALOGUE MODE, OTHER BUTTONS KEY_CODES"
? "MAY BE AFFECTED AND CHANGES. PLEASE TRY AS WELL."
? "------------------------------------------------"

repeat key=peek("port1") until(key>0)
if key=0 goto 1
clear screen
? "------------------------------------------------"
print "KEY PRESSED:";:? key;:print "          Is it right?"
' ? "------------------------------------------------"
' ?" NAME OF THE BUTTON  ORIGINAL KEY_CODE"
? "------------------------------------------------"
? "SELECT                       1"
? "L3                           2"
? "R3                           4"
? "START                        8"
? "ARROW UP                    16"
? "ARROW RIGHT                 32"
? "ARROW DOWN                  64"
? "ARROW LEFT                 128"
? "L2                         256"
? "R2                         512"
? "L1                        1024"
? "R1                        2048"
? "TRIANGLE                  4096"
? "CIRCLE                    8192"
? "CROSS                    16384"
? "SQUARE                   32768"
beep
repeat no_key=peek("port1") until (no_key=0)
goto 1


 

Using the dualshock would be great.. in fact i haven't resist the temptation to implement it in my games, as a hiden option in the source code until i can understand how this works and made menus for choosing controls.
Another peculiarity of the DS in emu is that when you have the DS plugged, the keyboard keys start to fail and peek"port1" becomes buggie and peek flush interrupted. I guess this is because the emu centers all his atention in peek USB PORTS instead of keyboard emulated DS.

Well i'm sorry for the extensive post, to much talk about dualshock !! maybe i would have better start a new post for the dualshock 2? Anyway here it is.

As I said, nice to meet you again JIM, see u! :)

11
Yabasic / Sudoku problems... not at all! :)
« on: July 11, 2012 »
Hi combatking, that is no problem at all!

You can leave as many cells empty as you want, in fact you can leave ALL the main board empty or show what you want.

How is it? You really must have at least TWO matrix.
One for temporally numbers in cell (that must be cheked) and other for the numbers once the sudoku have been succesfully created, we can call them TRUE NUMBERS and they are FIXED.
Never change his place. (cos' they r in the right place)

So what you have is a matrix that contains the TRUE numbers of the sudoku and other matrix that u have been using to put/chek/erase numbers untill you get  the right one.
Once you have it, you can handle both matrix as you want.
The true numbers still there and never change place or value, but you can HIDE or SHOW... and you can use the temporally matrix to show other numbers such as the player imput numbers.

Theese numbers can even have different colors or been marked for the player if he/she is shure that is a right number.... numbers showed in the temporally matrix can be whatever you want, can be true numbers (showed as a clue) or even false numbers.... THAT DOESN'T CHANGE THE FACT THAT YOU HAVE STORED THE TRUE NUMBERS! :P So if you want to show a few numbers or a lot of them of even SHOW NOTHING AT ALL, that has no influence to solve the sudoku because the sudoku IS SOLVED FROM THE VERY BEGINNING IT WAS CREATED.

Remember that if you have cheked all the sudoku rules in the creator routine, sudoku can't be created unless it is 100% reliable to solve.

If anybody coding sudokus will like to see it.
I'm thinking on sharing my old sudoku creator but it's not compatible with the emu and needs several fixes, and english translation... maybe i'll post some day.

12
Yabasic / Re: Sudoku creator basics
« on: July 11, 2012 »
Hi!

I wroted a sudoku demo time ago and didn't have any problems.
The sudoku creator works 100% accuracy by placing random numbers and cheking if each number is under the rules.

The secuence to create sudokus is this:
Create a MATRIX 9x9. This will be the main board. In the main board you can store some FIXED numbers that will be the clue for doing the sudoku.
Place a temporally random number in the 9x9 main board in an empty cell.
Chek the rules of the sudoku with the new temporally number comparing with all the previous numbers in the matrix (Fixed or temporals) If the rules are passed, repeat placing numbers untill board is filled.
If the rules are breaked, you don't have to reset nothing (yet)
There's a secuence of actions to do in that case:
First, try to place the same number in other cell. (untill there's no more places to chek)
If the rules are still breaked, try to change the value from 0-9.
REMEMBER Each change of the number (place or value) must be cheked to pass the rules.
Every rule of the sudoku must be cheked everytime and whith every number on the board untill there's no more chances to create a sudoku under the rules. Thats a dead end, then the main board must be reseted...and start everything again.
Don't worry!!! If you do it right and chek the rules, placing random numbers will result finally in a nice SUDOKU! :)

I had a source code but it is for the ps2 and doesn't work very well in the emu. In the ps2 each sudoku takes about 1-3 minutes to be generated... (yes.. omg.. 3 minutes waiting numbers to be happily and randomly placed) but fortunatelly I've tried the routine in the emulator and it takes just a few seconds :D

There's a way of improve speed... instead of placing absolutelly random numbers along the board, you can place into split sub boards 3x3 so when the routine finds a dead end, theres no need to reset all main board (9x9) if you can reset only the last sub board and keep cheking until there's no more chances and needs to erase all.
By spliting the work into the subboards speeds really increase cos many times in a dead end the erasing of the last sub board (3x3) clears the problem.

Maybe i'll share some day, adapted for the emulator and with some remarks to explain how it works.

13
Yabasic / YA-GOLF MINI Vr. 0.5.2
« on: July 10, 2012 »
OMG... first release and first tons of bugsss  :-[ Last hour changes....motion replay doesn't work properly and some other stuff.

Maded a quik fix for this and release vr. 0.5.2 to download at the end of this post.

Thanks Shockwave for you really aprecciate the difficults of programming in yabasic where all you have is a blank page and nothing more. You know it very well, i've seen many codes for yabasic you wrote and yes its really a hard job.
Thanks combatking also for give it the chance.. hope you like! I also like golf but the physics for the golf are still too difficult to understand for me.
and thanks Razor! Finally i've started sharing and im very happy to see you aprecciate it.


Hope someday could make the perfect version with no bugs.. but that day is yet far away...

Can't believe so many people still interested in yabasic... now i feel i can keep on sharing more stuff and i WILL DO!

I'M VERY GLAD TO SEE SOME FEEDBACKS AND YABASIC STILL ALIVE!! See you and Thanks you all! :D

14
Yabasic / Re: 2D SCROLL DEMO
« on: July 10, 2012 »
Thanks so much Shockwave for the enthusiastic feedback. I've read about the RPG project and it would be great if were possible to finish that big project in a poor languaje such as Yabasic. Is it abandoned project? Like to see it!

I was working myself too much in engine for tyles that drives me to get something nice, like this litte demo. It was made for the Ps2 but now in the emulator could be possible to get much better performance. Anyway at the moment it is abandoned and need to be reviewed (or even better rewrited) for the emulator.

Actually workin in a minigolf game and a point and clik adventure, have no much time to old codes that has the paticularity of ruin my mind cos' so many time i haven't cheked them  that i can hardly understand a single word of my ow old, crappy, messy and totally disordered code.. aham.

Anyway will post more code of this engine in better versions (and the 3D view) just when it works ok in the emu.

Really thank you  for apreciate it :)

15
Seems that source code is TOO LONG for the page and it's cutted. ?ฟ

The file can be DOWNLADED at the end of the firts post and here as well:

16
Yabasic / YA-GOLF MINI Super challengue
« on: July 10, 2012 »
Hi everybody!  :)

After so many hours of working, I've decided to share this game with all.
I't a mini golf game with aerial view.


You can download or just select and copy the source code to the clipboard and paste it directly in the emulator or in a text file (or create your .P2Y extension file)
FILE SIZE IS 591 KB So it may take a few seconds to copy.

Game looks great in the emulator and finally could implement some bitmaps and simple but nice graphics, and my particullary tribute to a dear friend in a intro screen.


---------------------------------
GAME SPECS

Game Versi๓n is 0.5.1 (This version has a bug in motion replay, plese download another one)

> LATEST VERSION:0.5.2 (Download in the post Below)


Yet some bugs and much work to do but most of the problems were fixed and game runs smooth in most Pcs with reasonable perfomance.

8 Players can be selected for each game, and controls can be settled HUMAN OR CPU

There are 2 FIELDS AVALIABLE. (1 working progress)

Game includes some routines to control flush rate acording your pc's performance. (Hope it works for everybody)

Controls info and some help included in-game, especially how to configure the
ps2 emulator to run it.

Some debug options can be settled in the source code; disable intro screen and other screens and some more configurable options (remarks are in spanish, ask if you want)
---------------------------------


---------------------------------
EMULATOR.

You need the win32 ps2 yabasic emulator to run it. (avaliable in this link)
http://members.iinet.net.au/~jimshaw/Yabasic/ps2yabasic1.6b3.zip

กกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกก
WARNING! This game needs a especific configuration of the emulator
to work properly!

To set the right configuration config the emulator this way:
Win32 yabasic emulator>EDIT>OPTIONS>

SOURCE COLORING: OFF
NO SINC: ON
FORCE FLUSH RATE: OFF
กกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกกก



Future versions will be posted.. still so many work to do!!! (n' lots of bugs ::))   

Hope you like it!!! Yabasic is not dead and I would like to read some feedbacks.

With my greetings to all yabasic lovers and specially for Jimshaw for the great emulator.  ;D


-------------------------
VERSIONS HISTORY:
-------------------------

Vr 0.5.1:
First released version. Due to last hour changes it has some critical bugs.
The motion replay option dosn't work right and some others.

Vr 0.5.2: Quiqk fix for those bugs.

-----------------------------
LATEST VERSION: 0.5.2
-----------------------------


I Have modified the original post. My first will was to share the source code in this page to be copy/pasted for anybody even non-registered users, but source code is too long for the page and was cutted, so i've removed it.

At the moment versions can only be downloaded for registered users.

17
Yabasic / 2D SCROLL DEMO
« on: July 10, 2012 »
Hi everybody! ;D

I'm  sharing this old ps2 demo  just to learn how to post at DBF forums where this is my first topic, so I hope everything goes right.

If there are still any people interested in YABASIC i would be pleased to continue sharing more code.
Workin' on some things which really looks great in the emu... :stirrer:

This one was writed for the ps2 and I haven't adapted for the emulator; it is the original code
so it's not 100% compatible with the emu but it works.

Sorry for the crappy code! haha... by looking it now i realise its a completelly mess... from
the beginning to the end, no way to understand a word... it is the work of a  noob and
i'm  :-[ to see it, but anyway, sharing cos' I really want to start sharing something.

------------------------------
CONTROLS:

Arrow keys: MOVEMENT. Keep presed on a block to push it (If allowed).
[Supr]: STOP MOVEMENT. Keep pressed to look forward.
[Ins]: MAKE SPRINT


I'ts just a little demo, no enemies, no end of level or deaths, just walk around.
------------------------------


------------------------------
EMULATOR

I'ts obvious, you need the Ps2 emulator to run the code on it

The right configuration of the emulator to run the game is
the emu's default configuration.

------------------------------


Greetings to all yabasic lovers and specially for jimshaw for the great emulator!  :)

Code: [Select]
' ###############################################################
' 2D SCROLL DEMO By SERGIO_ManOwaR_
' ###############################################################

' This was made time ago for the ps2 and haven't been adapted for
' the emulator so it just works as its works...

' It was a project for a pac-man game based on scroll screens
' with diferents cams and zoom.

' I had wrote so many versions including one with some pseudo-3D
' cenital view graphics.

' This is one of the basic versions, just sharing to see how to
' post in DBF forum, so this is my very first shared code.
' Some of the projects i'm working actually which looks
' really good in the emulator will be posted some day. (I HOPE!)

' Greetings to all in yabasic forums and specially to jimshaw.

' >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
' JUST A FEW DEMO!!
' You can't do anything but move around... anyway..
' have a nice walk!
'                 SERGIO_ManOwaR_    :)
' <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<








open window 1,1:poke "textalign","cc"
dim xx(20),yy(20)

rem >>>>pac
dim tp(9)
tp(0)=.35
for z=1 to 9
tp(z)=.5
next
dim vex(9,4)
dim vey(9,4)
dim vexc(9)
dim veyc(9)

dim mov(9)

dim pu(20)
vx1=0:vx2=640:vy1=0:vy2=512:mint=75:maxt=140:cam0t=90


dim k(100000)
l=51
dim pl(10,25)
dim s(l,l),a(l,l),b(l,l),o(l,l),sp(l,l),ap(l,l),bp(l,l),op(l,l)

dim is(l,l),ia(l,l),ib(l,l),io(l,l),isp(l,l),iap(l,l),ibp(l,l),iop(l,l)
dim v(l,l)

dim c1a(l,l),c2a(l,l),c3a(l,l)
dim c1b(l,l),c2b(l,l),c3b(l,l)

dim x(10),y(10),p(10)

dim showpunx(20)
dim showpuny(20)
dim showpunt(20)
dim showpun$(20)


dim a1(20000)
dim a2(20000)
dim a3(20000)
dim a4(20000)


for z=0 to 1:for zz=1 to 25:read pl(z,zz):next:next
data 3,3,8,3,3
data 3,-1,-1,-1,3
data 9,-1,-1,-1,9
data 3,-1,-1,-1,3
data 3,3,8,3,3

data 0,0,0,0,0
data 0,3,3,3,0
data 0,3,-1,3,0
data 0,3,3,3,0
data 0,0,0,0,0

n=1

label gestor
n=n+1
nper=0





 
gosub ldat
clear window

setrgb 1,100-c1,100-c2,100-c3
setrgb 2,c1,c2,c3
setrgb 3,100+c1,100+c2,100+c3
gtriangle 0,0 to 640,0 to 0,512
gtriangle 640,512 to 640,0 to 0,512


setrgb 1,20,70,0
for z=40 to 472 step 2
line 40,z,600,z
next
setrgb 1,102,152,2
rect 40,40,600,472

setrgb 1,222,222,222

text 250,10,"2D SCROLL DEMO","lt"


text 215,250,"Press [SUPR] to START","lt"
text 150,490,"By Sergio ``\ซ ManOwaR ป/ดด soeiro","lt"


t(-16384)
t(16384)

rem >>>>>>>>>>>>>>EXCLUSIVO PACMAN

rem >>>abrir salid
ib(int(l/2),1)=0:ib(int(l/2),l)=0:ib(1,int(l/2))=0:ib(l,int(l/2))=0


npast=0
for y=1 to l:for x=1 to l
rem >>>pos suelo aleat y poner rayos
isp(x,y)=1+int(ran(7))
if ib(x,y)=3 then
if x<l and ib(x+2,y)=3 and io(x+1,y)>-1 io(x+1,y)=101
if y<l and ib(x,y+2)=3 and io(x,y+1)>-1 io(x,y+1)=102
fi


if ib(x,y)>=3 io(x,y)=0:rem borrar objets bajo blok blind

rem >>>poner pastill
if ib(x,y)=0 and io(x,y)=0 then io(x,y)=1:npast=npast+1:fi

rem >>>poner adorn aleat
if ran(15)<1 ia(x,y)=4
if ran(12)<1 ia(x,y)=8
if ran(10)<1 ia(x,y)=16

next:next


v=.18

rem >>>>>>>>>>>excl


reset()
bucle()
goto gestor




rem >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>DISENADOR
rem >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>DISENADOR
rem >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>DISENADOR
label ldat

on n gosub n1,n2,n3,n5
read na,n$,l,fc1,fc2,fc3,ala1,ala2,ala3,alb1,alb2,alb3
c1=fc1
c2=fc2
c3=fc3

rem >>>> RESETEAR

for y=0 to 51:for x=0 to 51

ib(x,y)=0
is(x,y)=1
io(x,y)=0
ia(x,y)=0
c1a(x,y)=ran(ala1)
c2a(x,y)=ran(ala2)
c3a(x,y)=ran(ala3)
c1b(x,y)=ran(alb1)
c2b(x,y)=ran(alb2)
c3b(x,y)=ran(alb3)

' if ran(3)<1 and ib(x,y)=0 ib(x,y)=int(ran(4))
' isp(x,y)=int(ran(8))
' ibp(x,y)=int(ran(8))
next:next

rem >>>>>>>>>>>>>>EXCLUSIVO PACMAN
rem >>>>>>>>recuadrar
for y=0 to l+1:for x=0 to l+1:is(x,y)=1:ib(x,y)=3:v(x,y)=9999:next:next:for y=2 to l-1:for x=2 to l-1:ib(x,y)=0:v(x,y)=0:next:next







c=0:rem cosa que se usa actualmente 0=s 1=a 2=b 3=o

 setrgb 1,222,222,222
rect 59,449,560,500

setrgb 1,85,105,185


vercarga=1
for z=1 to na
 fill rect 60,450,60+(z*500/na),500



pause .1
read a

rem >>>>>>>>>>>>>>>>>0 Zona x1,x2,lx,ly,pasox,pasoy,numero
if a=0 then read x1,y1,lx,ly,pasox,pasoy,nu
for y=y1 to y1+ly step pasoy:for x=x1 to x1+lx step pasox
if c=0 is(int(x),int(y))=nu
if c=1 and and(a(int(x),int(y)),nu)=0 a(int(x),int(y))=a(int(x),int(y))+nu
if c=2 ib(int(x),int(y))=nu
if c=3 io(int(x),int(y))=nu
next:next:fi
rem <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<0

rem >>>>>>>>>>>>>>>>>50-59 poner c cosas na2 veces
if a=50 then read na2
for z2=1 to na2:read x1,y1,cosa
if c=3 io(x1,y1)=cosa
next
fi

rem >>>>>>>>>>>>>>>>>60-69 recuadros
if a=61 then read x1,y1,lx,ly,nub,nus
for y=y1 to y1+ly:for x=x1 to x1+lx
ib(x,y)=nub
is(x,y)=nus
next
next
for y=y1+1 to y1+ly-1:for x=x1+1 to x1+lx-1
ib(x,y)=0
next
next
fi

rem <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<0


rem >>>>>>>>>>>>>>>>>>>>>>>>>>>>>70-89 TRANSORM
if a>69 and a<90 then
if a=70 then read frecuencia,cosa,vieja,nueva:x1=1:x2=l:y1=1:y2=l:fi

dat=0:for y=y1 to y2:for x=x1 to x2
if cosa=0 and is(x,y)=vieja then dat=dat+1:if dat>=frecuencia is(x,y)=nueva:fi

if cosa=1 and and(a(x,y),vieja)>0 then dat=dat+1
if dat>=frecuencia then a(x,y)=a(x,y)-vieja:a(x,y)=a(x,y)+nueva:fi:fi

if cosa=2 and ib(x,y)=vieja then dat=dat+1:if dat>=frecuencia ib(x,y)=nueva:fi
if cosa=3 and io(x,y)=vieja then dat=dat+1:if dat>=frecuencia io(x,y)=nueva:fi
if cosa=10 and is(x,y)=vieja then dat=dat+1:if dat>=frecuencia isp(x,y)=nueva:fi

if dat>=frecuencia dat=0
next:next
fi

rem <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<90-99

rem >>>>>>>>>>>>>>>>>>>>>>>>>>>>>90-99 cambiar cosa a usar
if a>89 and a<100 c=a-90
rem <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<90-99

rem >>>>>>>>>>>>>>>>>>>>>>>>>100,num  poner num plantillas
rem >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>ponx,pony,plan
if a=1000  or a=1001 then read tot
for zz=1 to tot
read ponx,pony,plan
if a=1000 read num

rem exc pacm>>>>>>
if plan=0 then casax=ponx+1.5:casay=pony+1.5:fi
if plan=1 then tumbax=ponx+1.5:tumbay=pony+1.5:fi
rem <<<<<<<<<<<<<

zzx=-1:zzy=0
for zx=1 to 25
zzx=zzx+1
if zzx=5 then zzy=zzy+1:zzx=0:fi
pl=pl(plan,zx)


if a=1000 then
if pl>0 then
if c=0 is(ponx-1+zzx,pony-1+zzy)=num
if c=2 ib(ponx-1+zzx,pony-1+zzy)=num
if c=3 io(ponx-1+zzx,pony-1+zzy)=num
fi
fi

if a=1001 then
if pl<8 and pl>0 ib(ponx-1+zzx,pony-1+zzy)=pl
if pl=8 io(ponx-1+zzx,pony-1+zzy)=101
if pl=9 io(ponx-1+zzx,pony-1+zzy)=102
if pl=-1 io(ponx-1+zzx,pony-1+zzy)=-1

fi

next
next zz

fi:rem <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<100




next:rem acciones
return
rem <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<DISENADOR
rem <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<DISENADOR
rem <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<DISENADOR



label n1:restore 1:return
label n2:restore 2:return
label n3:restore 3:return









rem >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>BUCLE
rem >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>BUCLE
sub bucle()
1 if pausa=1 goto 4

if presenta=1 then
k=peek("port1")
if k=8 then presenta=0:cam=0:t(-8):goto 2:fi
goto 4:fi

2 fr=fr+1
if replay=0 and fin>0 and fr>finfr return

k=peek("port1")
' dx=0:dy=0
if and(k,8)>0  then pausa=1:t(-8):oppau=1:menup=0:goto 4:fi


if and(k,8192)>0 then romper=1 else romper=0:fi
if and(k,16384)>0 then tipocam=1
if (dx<>0 or dy<>0) then dx=0:dy=0:fi
fi


if and(k,16)>0 then dy=-1:dx=0:fi
if and(k,32)>0 then dx=1:dy=0:fi
if and(k,64)>0 then dy=1:dx=0:fi
if and(k,128)>0 then dx=-1:dy=0:fi

' if and(k,1)>0 then beep:pause .1:tipocam=1-tipocam:fi
if and(k,256)>0 t=t*1.1
if and(k,512)>0 t=t/1.1


if and(k,32768)>0  and (dx<>0 or dy<>0) v=.45-fatiga
if and(k,32768)=0  or (dx=0 and  dy=0) then if fatiga>0 fatiga=fatiga-.01:fi





if dx<>0 then
ultdx=dx
ultdy=0
tipocam=0
x(0)=x(0)+dx*v
mov(0)=mov(0)+int(1.8+v)
fi


if dy<>0 then
ultdy=dy
ultdx=0
tipocam=0
y(0)=y(0)+dy*v
mov(0)=mov(0)+int(1.8+v)
fi


if mov(0)>7 mov(0)=0

if v>.18 then
if dx<>0 or dy<>0 fatiga=fatiga+.02
if fatiga>.25 fatiga=.25
pupa=int((v-.18)*20):if v>.18 v=v-.01:fi

if v<.18 v=.18


rem >>>>>>PASAR DE LADO PACO
 if x(0)<1 x(0)=l+1:if y(0)<1 y(0)=l+1:if x(0)>l+1 x(0)=1:if y(0)>l+1 y(0)=1


3 rem >>>>>>chek

for z=0 to nper
vexc(z)=int(x(z))
veyc(z)=int(y(z))
vex(z,1)=int(x(0)-tp(z))
 vex(z,2)=int(x(0)+tp(z))
 vex(z,3)=vex(z,1)
 vex(z,4)=vex(z,2)
 
vey(z,1)=int(y(0)-tp(z))
 vey(z,2)=vey(z,1)
 vey(z,3)=int(y(0)+tp(z))
 vey(z,4)=vey(z,3)

next



rem >>>chek mur pac
pegado=0
cx=vexc(0)
cy=veyc(0)

if dy=-1 then

bl=b(vex(0,1),vey(0,1))
if bl>0 then
y(0)=vey(0,1)+1+tp(0)+.01
if b(vex(0,2),vey(0,2))>0 then dy=1
' if and(k,16)>0 pegado=1
 else x(0)=x(0)+.2:fi
fi

bl=b(vex(0,2),vey(0,1))
if bl>0 then
y(0)=vey(0,1)+1+tp(0)+.01
if b(vex(0,1),vey(0,1))>0 then dy=1
if and(k,16)>0 pegado=1

else x(0)=x(0)-.2:fi
fi

fi:rem dy=-1


if dy=1 then

bl=b(vex(0,1),vey(0,3))
if bl>0 then
y(0)=vey(0,3)-tp(0)-.01
if b(vex(0,2),vey(0,3))>0 then dy=-1
else x(0)=x(0)+.2:fi
fi

bl=b(vex(0,2),vey(0,4))
if bl>0 then
y(0)=vey(0,4)-tp(0)-.01
if b(vex(0,1),vey(0,4))>0 then dy=-1
if and(k,64)>0 pegado=1

 else x(0)=x(0)-.2:fi
fi

fi:rem dy=1



if dx=-1 then

bl=b(vex(0,1),vey(0,1))
if bl>0 then
x(0)=vex(0,1)+1+tp(0)+.01
if b(vex(0,1),vey(0,3))>0 then dx=1
else y(0)=y(0)+.2:fi
fi
 bl=b(vex(0,3),vey(0,3))
 if bl>0 then
 x(0)=vex(0,1)+1+tp(0)+.01
 if b(vex(0,1),vey(0,1))>0 then dx=1
if and(k,128)>0 pegado=1

else y(0)=y(0)-.2:fi
 fi


fi:rem dx=-1


if dx=1 then

bl=b(vex(0,2),vey(0,2))
if bl>0 then
x(0)=vex(0,2)-tp(0)-.01
if b(vex(0,2),vey(0,4))>0 then dx=-1
else y(0)=y(0)+.2:fi

fi
 bl=b(vex(0,4),vey(0,4))
 if bl>0 then
 x(0)=vex(0,4)+-tp(0)-.01
 if b(vex(0,2),vey(0,2))>0 then dx=-1
if and(k,32)>0 pegado=1
else y(0)=y(0)-.2:fi
 fi


fi:rem dx=-1



if pegado=1 then

mov(0)=10
 t=t*1.015:if v<.48 v=v+.02
if v>.48 then
b=b(cx,cy)
if b>0 and b<3 then
if b(cx-dx,cy-dy)=0 and o(cx-dx,cy-dy)<1 then
b(cx-dx,cy-dy)=b(cx,cy)
v(cx-dx,cy-dy)=v(cx,cy)
b(cx,cy)=0
pupa=-10
pu(3)=pu(3)-10
x(0)=x(0)-dx*.4
y(0)=y(0)-dy*.4


if dy<>0  and and(a(cx,cy),2)=0 a(cx,cy)=a(cx,cy)+2
if dx<>0 and and(a(cx,cy),1)=0 a(cx,cy)=a(cx,cy)+1
' if and(a(cx-dx,cy-dy),3)=0 a(cx-dx,cy-dy)=a(cx-dx,cy-dy)+3
dx=0:dy=0:mov(0)=0:v=.18


fi


' v(cx,cy) =v(cx,cy)/1.2
' if v(cx,cy)<1 b(cx,cy)=0
fi

fi:rem v>.48
dx=-dx:dy=-dy
fi:rem peg

if cam=0 then
if pegado=0 and t>cam0t t=t/1.02
fi


rem >>>>>>>>chek ob

o=o(cx,cy)
if o=1 then
com=1:comx=cx+.5:comy=cy+.5
npast=npast-1
if npast=0 then fin=1:finfr=fr+50:fi
fi


if o>100 then elec=elec+1
if elec>20 then
elec=20
beep
fi
 else if elec>0 elec=elec-1:fi















4 if t<mint t=mint:if t>maxt t=maxt

' t=20.7

if cam=0 then
porx=x(0)
pory=y(0)

if fr=0 then
obx=tumbax
oby=tumbay
cam=10
fi

fi

if cam=10 then
if porx<obx then porx=porx+.25:fi
if pory<oby pory=pory+.25
if porx>obx porx=porx-.25
if pory>oby pory=pory-.25


if pory=oby and porx=obx then if ticam=0 ticam=25
ticam=ticam-1

if obx=x(0) then cam=0:ticam=50+ran(200):presenta=0:fi

if ticam=1 then
if obx=tumbax then obx=x(0):oby=y(0):ticam=0:fi
fi


fi

fi:rem cam 10

reM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>SX,SY
obdx=(ultdx*-288)
obdy=(ultdy*-231)
if tipocam=0 then obdx=0
obdy=0
fi

 if camdx<obdx camdx=camdx+(obdx-camdx)/10
 if camdx>obdx camdx=camdx-(camdx-obdx)/10
 if camdy<obdy camdy=camdy+(obdy-camdy)/10
 if camdy>obdy camdy=camdy-(camdy-obdy)/10

sx=-int(porx*t-t):sy=-int(pory*t-t):sx=320+sx+camdx:sy=256+sy+camdy

rem >>>>>>>>LIMITES SX SY
 if sx>vx1 sx=vx1:if sx+t*l<vx2 sx=vx2-t*l:if sy>vy1 sy=vy1 :if sy+t*l<vy2 sy=vy2-t*l

rem >>>>ACTUALIZAR BRILLO
if bri<=0 dbri=30:if bri>200 dbri=-50 :bri=bri+dbri
rem >>>>>>>>>>>>>>EFECTO RETUMBE
if retumbe>0 then retumbe=retumbe-2:sx=sx-ran(retumbe*(t/60))+ran(retumbe*(t/60)):sy=sy-ran(retumbe*(t/60))+ran(retumbe*(t/60)):fi


rem >>>>>DEFINIR CASILLAS QUE SERAN DIBUJADAS
blx1=int((-sx)/t):bly1=int((-sy)/t):blx2=blx1+2+int(vx2/t):bly2=bly1+2+int(vy2/t)




5


if nuevc1>0  then
oc1=c1
c1=c1+nuevc1
fi

pause .04
 setdrawbuf buf:setdispbuf 1-buf:clear window

for y=bly1 to bly2:for x=blx1 to blx2

c1a=c1a(x,y)+c1
c2a=c2a(x,y)+c2
c3a=c3a(x,y)+c3
c1b=c1b(x,y)+c1
c2b=c2b(x,y)+c2
c3b=c3b(x,y)+c3
su=s(x,y):bl=b(x,y):ob=o(x,y)


rem >>>>>>DEFINIR PUNTOS DE DIBUJO
j=sx+x*t:h=sy+y*t
x0=j-t:x1=j-t/1.05:x2=j-t/1.11:x3=j-t/1.18:x4=j-t/1.25:x5=j-t/1.35:x6=j-t/1.43:x7=j-t/1.54:x8=j-t/1.67:x9=j-t/1.82:x10=j-t/2:x11=j-t/2.22:x12=j-t/2.5:x13=j-t/2.88:x14=j-t/3.35:x15=j-t/4:x16=j-t/5:x17=j-t/6.7:x18=j-t/10:x19=j-t/20:x20=j:y0=h-t:y1=h-t/1.05:y2=h-t/1.11:y3=h-t/1.18:y4=h-t/1.25:y5=h-t/1.35:y6=h-t/1.43:y7=h-t/1.54:y8=h-t/1.67:y9=h-t/1.82:y10=h-t/2:y11=h-t/2.22:y12=h-t/2.5:y13=h-t/2.85:y14=h-t/3.35:y15=h-t/4:y16=h-t/5:y17=h-t/6.7:y18=h-t/10:y19=h-t/20:y20=h

s=s(x,y):b=b(x,y):o=o(x,y)

if b=0 or b>100 then

' if s=1 then
' setrgb 1,50+c1,0+c2,c3
' fill rect x0,y0,x19,y9
' fill rect x0,y10,x9,y19
' fill rect x10,y10,x20,y19
' fi

if s=0 then
setrgb 1,100,155+bri,100
rect x0,y0,x20,y20
fi

if s=1 then
if sp(x,y)<>3 then
setrgb 1,20+c1a,25+c2a,30+c3a:fill rect x0,y0,x19,y9:setrgb 1,20+c1b(x-1,y)+c1+b,25+c2b(x-1,y)+c2+b,30+c3b(x-1,y)+c3+b:fill rect x0,y10,x9,y19:setrgb 1,20+c1b,25+c2b,30+c3b:fill rect x10,y10,x20,y19:fi
if sp(x,y)=3 then
setrgb 1,20+c1b,25+c2b,30+c3b
if sp(x-1,y)<>3 fill rect x1,y10,x19,y19
if sp(x-1,y)=3 fill rect x0,y10,x19,y19
fill rect x0,y0,x9,y9
setrgb 1,20+c1a,25+c2a,30+c3a:fill rect x10,y0,x19,y9:fi
fi


if s=2 then setrgb 1,80+c1a/3,80+c2a/3,80+c3a/3:fill rect x0,y0,x20-t/60,y20-t/60:setrgb 1,b,b,b:fill triangle x0,y0 to x3,y0 to x0,y3: fill triangle x0,y20 to x3,y20 to x0,y17: fill triangle x20,y0 to x17,y0 to x20,y3: fill triangle x20,y20 to x17,y20 to x20,y17:fi
if s=3 then setrgb 1,c1/3,c2/3,c3/3:fill rect x0,y0,x20,y20:setrgb 1,80+c1a/3,80+c2a/3,80+c3a/3:fill rect x0,y0,x10,y10::setrgb 1,60+c1b/4,60+c2b/4,60+c3b/4:fill rect x10,y10,x20,y20:fi

rem >>>>>>DIBUJAR adornos
ad=a(x,y)

if and(ad,4)=4 then
setrgb 1,20+c1a,50+c1a,0:fill triangle x5,y0 to x6,y7 to x8,y0:fi
if and(ad,8)=8 then
setrgb 1,c1,c2,c3:fill rect x13,y0,x15,y10:fi
if and(ad,16)=16 then
setrgb 1,c1,c2,c3
fill triangle x5,y20 to x14,y11 to x7,y20:fi

if and(ad,1)=1 then
setrgb 1,2,2,2:fill rect x0,y3,x20,y7:fill rect x0,y13,x20,y17:fi
if and(ad,2)=2 then
setrgb 1,2,2,2:fill rect x3,y0,x7,y20:fill rect x13,y0,x17,y20:fi



if b<100 and x>0 and y>0 then
rem >>>>>>DIBUJAR SOMBRAS

 setrgb 1,b,b,b
if b(x,y-1)>0 then if b(x-1,y-1)>0 or b(x-1,y)>0  then fill rect x0,y0,x20,y5 else  fill triangle  x0,y0 to x10,y5 to x10,y0 :fill rect x10,y0,x20,y5:fi:fi
if b(x-1,y)>0 then if b(x-1,y-1)>0 or b(x,y-1)>0 then fill rect x0,y0,x5,y20 else  fill triangle  x0,y0 to x5,y10 to x0,y10:fill rect x0,y10,x5,y20:fi:fi
if b(x-1,y-1)>0 then fill rect x0,y0,x5,y5:fi


fi

rem >>>>>>>DIBUJAR OBJETOS
if ob =1 then setrgb 1,222+b,222+b,222+b:if t>90 fill circle x10,y10,t/14:if t<91 fill rect x9,y9,x11,y11:fi
if ob=2 then setrgb 1,30+b,40+b,60+b
fill circle x10,y11,t/4
fill rect x8,y8,x12,y12
setrgb 1,40+b+bri/5,50+b+bri/25,70+b+bri/25
fill circle x10,y9,t/4
setrgb 1,180+bri+b,bri+b,bri+b:fill circle x10,y9,t/9:fi

if ob>2 and ob<20 then
if ob=3 setrgb 1,30+b,90+b,40+b
if ob>3 setrgb 1,80+b,120+b,150+b

fill circle x10,y9,t/4
fill circle x10,y15,t/4
fill rect x5,y8,x15,y15
fill rect x9,y2,x11,y5
fill rect x7,y0,x13,y2

if ob=3 then setrgb 1,90+b+bri/25,90+b+bri/8,90+b+bri/20
fill circle x10,y10,t/6:fill rect x8,y13,x12,y14:setrgb 1,b,b,b:fill rect x8,y10,x9,y11:fill rect x11,y10,x12,y11:fi
if ob>3 then

if ob=4 setrgb 1,150+b,b,10+b
if ob=5 setrgb 1,b,b,b+ran(20)

fill circle x10,y9,t/6.1
fill circle x10,y15,t/6.1
fill rect x7,y9,x13,y15
fi

fi



if o(x,y)=101 then
for z=1 to 3 setrgb 1,50+ran(205)+b,100+ran(155)+b,255+b
ry=y10-ran(t/5)+.1+ran(t/5)
ry2=y10-ran(t/5)+.1+ran(t/5)
ry3=y10-ran(t/5)+.1+ran(t/5)
cerx=(sx+x*t-t)+ran(t)
line x0,ry,cerx,ry2
line cerx,ry2,x20,ry3:next
fi

if o(x,y)=102 then
for z=1 to 3 setrgb 1,50+ran(205)+b,100+ran(155)+b,255+b
rx=x10-ran(t/5)+.1+ran(t/5)
rx2=x10-ran(t/5)+.1+ran(t/5)
rx3=x10-ran(t/5)+.1+ran(t/5)
cery=(sy+y*t-t)+ran(t)
line rx,y0,rx2,cery
line rx2,cery,rx3,y20:next:
fi




fi:rem dib suelos y obj



if b>0 then

if b<100 then
 setrgb 1,80+c1+b,80+c2+b,80+c3+b
fill rect x0,y0,x20,y20
fi
if b=1 then
setrgb 1,145+c1,90+c2,20+c3
 fill rect x0,y0,x19,y9
if b(x+1,y)=1 fill rect x10,y10,x20,y19
if b(x+1,y)<>1 fill rect x10,y10,x19,y19

' if b(x-1,y)=1  setrgb 1,145+b+c1a(x-1,y)+c1,90+b+c2a(x-1,y)+c2,20+b+c3a(x-1,y)+c3
 fill rect x0,y10,x9,y19
fi

if b=2 then
setrgb 1,155+c1,30+c2,c3
fill rect x0,y0,x9,y4
fill rect x0,y10,x9,y14
fill rect x0,y15,x4,y19
fill rect x15,y5,x20,y9
fill rect x0,y5,x4,y9
fill rect x15,y15,x20,y19



setrgb 1,155+c1b,30+c2b,c3b
fill rect x5,y5,x14,y9
fill rect x10,y0,x19,y4

setrgb 1,155+c1a,30+c2a,c3a
fill rect x10,y10,x19,y14
fill rect x5,y15,x14,y19


 if b(x+1,y)<>2 then setrgb 1,100+c1,100+c2,100+c3: fill rect x19,y0,x20,y20:fi
 fi


if b=3 then
setrgb 1,105+c1a,155+c2a,175+c3b

fill rect x0,y0,x20,y20
setrgb 1,45,55,75

fill rect x2,y2,x3,y3
fill rect x18,y2,x17,y3
fill rect x2,y18,x3,y17
fill rect x18,y18,x17,y17
fi





if v(x,y)<10 and v(x,y)>-1  then  setrgb 1,52+b,22+b,0
if v(x,y)<10  fill rect x17,y10,x16,y8
if v(x,y)<9  fill rect x3,y0,x4,y3
if v(x,y)<8  fill rect x9,y10,x8,y12
if v(x,y)<7  fill rect x10,y11,x13,y12
if v(x,y)<6  fill rect x16,y17,x14,y19
if v(x,y)<5  fill rect x3,y3,x7,y6
if v(x,y)<4  fill rect x8,y8,x11,y15
if v(x,y)<3  fill rect x19,y8,x16,y7
if v(x,y)<2  fill rect x2,y19,x5,y13
fi
fi:rem b>0



' setrgb 1,222,222,222
' if x=vexc(0) and y=veyc(0) rect x2,y2,x18,y18
' setrgb 1,222,2,2

' for z=1 to 4
' if x=vex(0,z) and y=vey(0,z) rect x1,y1,x19,y19
' next

next:next




j=sx+x(0)*t-t
h=sy+y(0)*t-t

ot=t
tx=-t
ty=t

if dx=0 and dy=0 then
odx=-1
dx=ultdx:dy=ultdy
fi

if dx=-1 tx=t
if dy=1 ty=-t
crec=.3
for z=1 to 9
crec=crec*1.5
xx(z)=j-tx/(1.6+crec)
xx(20-z)=j+tx/(1.6+crec)

yy(z)=h-ty/(1.6+crec)
yy(20-z)=h+ty/(1.6+crec)
next

t=ot

rem >>>>>>dib pac


if elec>0 parp=1
if ran(20)<1 parp=1

m= mov(0)


setrgb 1,122,92,2

if dy<>0 then
if m=1 or m=3 fill circle xx(7),yy(6),t/9
if m=2 then
fill circle xx(7),yy(4),t/8
fill circle xx(13),yy(14),t/7
fill rect xx(5),yy(3),xx(9),h
fi
if m=5 or m=7 fill circle xx(13),yy(6),t/9
if m=6 then
fill circle xx(13),yy(4),t/8
fill circle xx(7),yy(14),t/7
fill rect xx(15),yy(3),xx(11),h
fi
if m=10 then
fill circle xx(13),yy(15),t/8
fill circle xx(7),yy(15),t/8
fi
fi:rem dy<>0

if dx<>0 then
if m=1 or m=3 fill circle xx(6),yy(7),t/9
if m=2 then
fill circle xx(4),yy(7),t/8
fill circle xx(14),yy(13),t/7
fill rect xx(3),yy(5),j,yy(9)
fi
if m=5 or m=7 fill circle xx(6),yy(13),t/9
if m=6 then
fill circle xx(4),yy(13),t/8
fill circle xx(14),yy(7),t/7
fill rect xx(3),yy(15),j,yy(11)
fi
if m=10 then
fill circle xx(15),yy(13),t/8
fill circle xx(15),yy(7),t/8
fi
fi:rem dx<>0



setrgb 1,222,222,elec*12
fill circle j,h,t*.3

if dy<>0 then
if com=0 then
setrgb 1,222,222,222
if parp=1 setrgb 1,182,182,elec*12

fill circle xx(8),yy(7),t/8
fill circle xx(12),yy(7),t/8

if parp=0 then setrgb 1,2,2,2
fill circle xx(8),yy(6),t/16
fill circle xx(12),yy(6),t/16:fi

fi:rem com=0

if com=1 then
setrgb 1,2,2,2
fill circle j,yy(9),t/4.6

setrgb 1,255,88,88
fill triangle j-t/10,h to j+t/10,h to sx+comx*t-t,sy+comy*t-t

setrgb 1,222,222,elec*12
fill circle j,yy(11),t/4.5

setrgb 1,222,222,222
fill circle xx(8),h,t/8
fill circle xx(12),h,t/8
setrgb 1,2,2,2
fill circle xx(8),yy(9),t/16
fill circle xx(12),yy(9),t/16
fi:rem com=1


if m=0 or m=4 then
setrgb 1,192,52,2
fill circle xx(3),yy(11),t/11
fill circle xx(17),yy(11),t/11
 setrgb 1,182,182,elec*12
fill triangle xx(6),yy(12) to xx(6),h to xx(3),yy(11) 
fill triangle xx(14),yy(12) to xx(14),h to xx(17),yy(11)
fi
if m=1 or m=3 then
setrgb 1,192,52,2
fill circle xx(16),yy(9),t/10
fill circle xx(3),yy(11),t/12
 setrgb 1,182,182,elec*12
fill triangle xx(6),h to xx(7),yy(12) to xx(3),yy(12)
fill triangle xx(3),yy(12) to xx(3),yy(11) to xx(4),yy(12)


fill triangle xx(13),h to xx(14),yy(12) to xx(17),h 
 fill triangle xx(16),yy(9) to xx(15),h to xx(17),h 
fi

if m=2  then
setrgb 1,192,52,2
fill circle xx(16),yy(8),t/9
fill circle xx(3),yy(13),t/13
 setrgb 1,182,182,elec*12
fill triangle xx(6),h to xx(3),yy(13) to xx(7),yy(12)


fill triangle xx(13),h to xx(14),yy(12) to xx(17),h
 fill triangle xx(16),yy(8) to xx(15),h to xx(17),h
fi



if m=5 or m=7 then
setrgb 1,192,52,2
fill circle xx(4),yy(9),t/10
fill circle xx(17),yy(11),t/12
 setrgb 1,182,182,elec*12
fill triangle xx(3),h to xx(7),h to xx(6),yy(12)
fill triangle xx(4),yy(9) to xx(3),h to xx(5),h

fill triangle xx(14),h to xx(13),yy(12) to xx(17),yy(12) 
 fill triangle xx(17),yy(11) to xx(16),yy(12) to xx(17),yy(12)
fi

if m=6  then
setrgb 1,192,52,2
fill circle xx(4),yy(8),t/9
fill circle xx(17),yy(13),t/13
 setrgb 1,182,182,elec*12
fill triangle xx(4),yy(8) to xx(3),h to xx(4),h


fill triangle xx(3),h to xx(7),h to xx(6),yy(12) 
 fill triangle xx(17),yy(13) to xx(14),h to xx(13),yy(12) 
fi

if m=10  then
setrgb 1,192,52,2
fill circle xx(3),yy(4),t/12
fill circle xx(17),yy(4),t/12
 setrgb 1,182,182,elec*12
fill triangle xx(3),yy(4) to xx(5),h to xx(7),yy(9)
fill triangle xx(17),yy(4) to xx(15),h to xx(13),yy(9)
fi



fi:rem dy<>0




if dx<>0 then
if com=0 then
setrgb 1,222,222,222
if parp=1 setrgb 1,182,182,elec*12

fill circle xx(7),yy(8),t/8
fill circle xx(7),yy(12),t/8

if parp=0 then setrgb 1,2,2,2
fill circle xx(6),yy(8),t/16
fill circle xx(6),yy(12),t/16:fi

fi:rem com=0

if com=1 then
setrgb 1,2,2,2
fill circle xx(9),h,t/4.6

setrgb 1,255,88,88
 fill triangle j,h-t/10 to j,h+t/10 to sx+comx*t-t,sy+comy*t-t

setrgb 1,222,222,elec*12
fill circle xx(11),h,t/4.5

setrgb 1,222,222,222
fill circle j,yy(8),t/8
fill circle j,yy(12),t/8
setrgb 1,2,2,2
fill circle xx(9),yy(8),t/16
fill circle xx(9),yy(12),t/16
fi:rem com=1


if m=0 or m=4 then
setrgb 1,192,52,2
fill circle xx(11),yy(3),t/11
fill circle xx(11),yy(17),t/11
 setrgb 1,182,182,elec*12
fill triangle xx(12),yy(6) to j,yy(6) to xx(11),yy(3) 
fill triangle xx(12),yy(14) to j,yy(14) to xx(11),yy(17)
fi
if m=1 or m=3 then
setrgb 1,192,52,2
fill circle xx(9),yy(16),t/10
fill circle xx(11),yy(3),t/12
 setrgb 1,182,182,elec*12
fill triangle j,yy(6) to xx(12),yy(7) to xx(12),yy(3)
fill triangle xx(12),yy(3) to xx(11),yy(3) to xx(12),yy(4) 


fill triangle j,yy(13) to xx(12),yy(14) to j,yy(17) 
 fill triangle xx(9),yy(16) to j,yy(15) to j,yy(17) 
fi

if m=2  then
setrgb 1,192,52,2
fill circle xx(8),yy(16),t/9
fill circle xx(13),yy(3),t/13
 setrgb 1,182,182,elec*12
fill triangle j,yy(6) to xx(13),yy(3) to xx(12),yy(7)


fill triangle j,yy(13) to xx(12),yy(14) to j,yy(17)
 fill triangle xx(8),yy(16) to j,yy(15) to j,yy(17)
fi



if m=5 or m=7 then
setrgb 1,192,52,2
fill circle xx(9),yy(4),t/10
fill circle xx(11),yy(17),t/12
 setrgb 1,182,182,elec*12
fill triangle j,yy(3) to j,yy(7) to xx(12),yy(6)
fill triangle xx(9),yy(4) to j,yy(3) to j,yy(5)

fill triangle j,yy(14) to xx(12),yy(13) to xx(12),yy(17) 
 fill triangle xx(11),yy(17) to xx(12),yy(16) to xx(12),yy(17)
fi

if m=6  then
setrgb 1,192,52,2
fill circle xx(8),yy(4),t/9
fill circle xx(13),yy(17),t/13
 setrgb 1,182,182,elec*12
fill triangle xx(8),yy(4) to j,yy(3) to j,yy(4)


fill triangle j,yy(3) to j,yy(7) to xx(12),yy(6) 
 fill triangle xx(13),yy(17) to j,yy(14) to xx(12),yy(13) 
fi

if m=10  then
setrgb 1,192,52,2
fill circle xx(4),yy(3),t/12
fill circle xx(4),yy(17),t/12
 setrgb 1,182,182,elec*12
fill triangle xx(4),yy(3) to j,yy(5) to xx(9),yy(7)
fill triangle xx(4),yy(17) to j,yy(15) to xx(9),yy(13)
fi








fi:rem dx<>0







if elec>0 then
pupa=elec
pu(2)=pu(2)+pupa

retumbe=elec
for z=1 to 2+int(elec/8) setrgb 1,50+ran(205)+b,100+ran(155)+b,255+b
rayx1=j-ran(t/2)+ran(t/2)
rayy1=h-ran(t/2)+ran(t/2)
rayx2=rayx1-ran(t/2)+ran(t/2)
rayy2=rayy1-ran(t/2)+ran(t/2)
line j,h,rayx1,rayy1
line rayx1,rayy1,rayx2,rayy2
next:fi

if com=1 then com=0:o(vexc(0),veyc(0))=0
npun=npun+5
pu(1)=pu(1)+5
totpast=totpast-1
fi

parp=0






' if tipocam=0 then
' for z=0 to 20
' line xx(z),yy(1),xx(z),yy(19)
' line xx(1),yy(z),xx(19),yy(z)
' next
' line j,yy(1),j,yy(19)
' line xx(1),h,xx(19),h
' fi



rem >>>>DIB SUDOR
if fatiga>0 then
setrgb 1,100,100,255

for z=1 to int(fatiga*10)
fill circle sx+x(0)*t-t-ran(t/2)+ran(t/2), sy+y(0)*t-t-ran(t/2)+ran(t/2),t/(15+ran(15))
next
fi

fill circle sx+(x(0)-tp(0))*t-t,sy+(y(0)-tp(0))*t-t,t/40
fill circle sx+(x(0)+tp(0))*t-t,sy+(y(0)-tp(0))*t-t,t/40
fill circle sx+(x(0)-tp(0))*t-t,sy+(y(0)+tp(0))*t-t,t/40
fill circle sx+(x(0)+tp(0))*t-t,sy+(y(0)+tp(0))*t-t,t/40

if nuevc1>0 then
nuevc1=0
c1=oc1
fi

if pupa>0 npun=npun-pupa
if npun<>0 then
pun=pun+npun:if pun<0 pun=0
if npun<0 then colpun=-1 else colpun=1:fi

z=abs(npun)
if pupa>0 nuevc1=(pupa*10)

setrgb 1,125,125,125
if colpun<0 setrgb 1,255,55,55
' fill rect 10,5,10+z,506
' fill rect 629,5,629-z,506
' fill rect 10,5,629,5+z
' fill rect 10,506,629,506-z
npun=0
pupa=0
fi

setrgb 1,255,255,255
' text 75,450,"PUNTOS:"
if colpun<0 setrgb 1,255,55,55

' text 130,450,str$(pun),"lc"

' text 320,65,str$(npun)

' text 320,50,str$(odx)
' text 300,65,str$(dx)
' text 340,65,str$(dy)
' text 300,85,str$(ultdx)
' text 340,85,str$(ultdy)






if odx=-1  then dx=0:dy=0:if and(k,16384)=0 odx=0:fi


if pausa=0 then
buf=1-buf
' inkey$
goto 1:fi

rem >>>>pausa
setrgb 1,20,70,0
fill rect 100,100,540,412

' for z=100 to 412 step 2
' line 100,z,540,z
' next

' setrgb 1,2,2,2
' text 318,142,"J U E G O   P A U S A D O."
' text 318,394,"PosT_YouR_LetteR_SoftwarE (R) 2005"

setrgb 1,222,255,255
if menup=1 text 320,140,"O P C I O N E S."
if menup=2 text 320,140,"E S T A D อ S T I C A S."
if menup=0 text 320,140,"J U E G O   P A U S A D O."

'  text 320,400,"Pulsa START para continuar."
setrgb 1,255,255,2
text 320,392,"PosT_YouR_LetteR_SoftwarE (R) 2005"


setrgb 1,102,152,2:rect 100,100,540,412

fill rect 140,200+oppau*50-50,500,200+oppau*50-20
setdispbuf buf:buf=1-buf


setrgb 1,222,255,255
if menup=0 then
text 320,220,"O P C I O N E S."
text 320,270,"E S T A D อ S T I C A S."
text 320,320,"J U G A R."
fi


k=peek("port1")
if k=8 then t(-8):pausa=0:fi
if k=16 then beep:pause .1:oppau=oppau-1:if oppau<1 oppau=3:fi
if k=64 then beep:pause .1:oppau=oppau+1:if oppau>3 oppau=1:fi
if k=16384 then t(-16384)
if menup=0 then
if oppau=3 pausa=0
if oppau=1 menup=1
if oppau=2 menup=2
fi

fi



goto 1

end sub
rem <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
rem <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<




rem >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RESET
rem >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RESET
sub reset()

setrgb 0,20-c1,70-c2,-c3
' clear window

if vercarga=111111111111111 then
xx=-20
for zz=520 to 420 step-2
for z=1 to l-1
setrgb 1,20-c1,70-c2,-c3
fill circle 10+z*600/l,zz+2,3
setrgb 1,222,222,222
fill circle 10+z*600/l,zz,3
next
pause .03
next
fi

for y=1 to l
if vercarga=111111 then
obx=10+y*600/l
repeat
xx=xx+3
setrgb 1,20-c1,70-c2,-c3
fill circle xx-3,420,10
setrgb 1,222,222,2
fill circle xx,420,10
if xx>obx-7 and y<l then
setrgb 1,20-c1,70-c2,-c3
fill triangle xx,420 to xx+9,414 to xx+9,426
fi
pause .04
until((xx>=obx and y<l) or xx>640)
fi
setrgb 0,c1,c2,-c3


for x=1 to l:s(x,y)=is(x,y):a(x,y)=ia(x,y):b(x,y)=ib(x,y):o(x,y)=io(x,y):sp(x,y)=isp(x,y):ap(x,y)=iap(x,y):bp(x,y)=ibp(x,y):op(x,y)=iop(x,y)
v(x,y)=0
if b(x,y)>0 then o(x,y)=0:v(x,y)=100:fi
if b(x,y)=3 v(x,y)=9999

next:next

vercarga=0
cam=0
t=cam0t
fr=0
for z=0 to 9:mov(z)=0:next
for z=0 to 20:pu(z)=0:next
presenta=1

showpunn=0

rem exc pacm>>>>>>
x(0)=casax:y(0)=casay
ultdx=0:ultdy=-1
dx=0:dy=0:odx=0
tipocam=0
fatiga=0:romper=0

finfr=0
if replay=0 fin=0
rem >>>>opcion de eliminar
retumbe=0
end sub
rem <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
rem <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<




3 data 8,"",30, 0,0,0,30,20,10 ,5,10,20

data 61,1,1,29,29,3,1
data 0,1,1,50,50,1,1,2

data 92


data 0,1,1,30,30,2,2,3

 data 70,9.8,2,3,2
 data 70,12.8,2,3,1
 data 70,4.8,2,3,0

data 1001,2, 16,23,0, 17,15,1




1
data 7
data"B I E N V E N I D O  A L  C O M I E N Z O.",15,-20,0,0, 20,0,20 ,20,0,20

' data 61,1,1,14,14,3,1

data 92
data 0,5,4,10,8,1.9,2.7,1

data 1001,2, 13,13,0, 1,1,1
data 61,5,3,4,8,1,2

data 70,10,2,1,0
data 70,10,2,1,3
data 70,8,2,1,2







2 data 15,"A G O B I O",30, 0,5,20, 30,20,10 ,5,10,20

' data 61,1,1,29,29,3,1
data 0,1,1,50,50,1,1,2

data 92


 data 0,1,1,29,29,3.9,2.9,3
 data 0,2,2,27,27,3.9,4.2,2
 data 0,2,2,27,27,1.4,3.8,1

 data 0,5,12,22,8,1.2,2.9,2

 data 70,10,2,1,0

 data 61,8,5,10,5,2,3
 data 61,15,9,6,15,1,3
 data 61,6,21,19,7,2,1
 data 0,8,23,7,5,1.4,2.8,3

 data 70,9.8,2,2,0
 data 70,6,2,1,0
 data 70,15,2,1,3

data 1001,2, 16,23,0, 17,15,1









sub t(d)
if d<0 repeat k=peek("port1"):until(and(k,d)=0)
if d>0 repeat k=peek("port1"):until(and(k,d)>0)

end sub

















' >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
'
'                   ######################
'                   #   2D SCROLL DEMO   #
'                   ######################
'
'            --------------------------------------
'            PRESS <START> In the emulator to BEGIN
'            --------------------------------------
'
'          EMULATOR'S CONFIGURATION TO RUN THIS CODE:
'                 Emu's default configuration.
'                 ------------------------------
'                           CONTROLS:
'      Arrow keys: MOVEMENT. Keep presed to push (If allowed).
'       [Supr]: STOP MOVEMENT. Keep pressed to look forward.
'                      [Ins]: MAKE SPRINT
'     I'ts just a little demo, no enemies, no end of level or
'                    deaths, just walk around.
'                  ------------------------------
'
'                       Sergio Ba๑o soeiro
'
' <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 

18
Hi everybody, ive just been watching the entries for the contest and enjoing it. I guess the vote is secret. Thank you all for taking the time to create something and share with us. Good luck for everybody and greetings 4 all. Cheers! :D

19
Hi! this is precisely what im working in.. but just for Yabasic! :$
So i guess i can't entry.

PS2 yabasic is restrictive because there are a lot of things that it can't do "out of the box".

It can't draw bitmaps
It can't play sounds
All you can draw are triangles, lines, quads, dots, text and Gtriangles..

You can draw things though, and remember that you have the emulator so you are only restricted by the PC's speed - there's absolutely no reason that PS2 Yabasic cannot do a demo effect and then distort it somehow :)

Anyway, even if you don't enter this one Sergio, I hope you enjoy watching the entries!  They are usually very diverse and quite wonderful!


Yes, very restrictive, thats what im using jim's emulator for bitmaps processing, It is easy cos' you can make a little script in javascript to convert a picture into raw data RGB for yabasic, and then copy/paste in a text document. All you have to do then is code the yabasic lines to understand those data lines. The result: Im watching in Yabasic real-color pictures and . This can not be done in ps2yabasic cos' the only way to do it is writing the color info for each pixel one by one, which means 3 numbers (R,G,B) for each pixel and it will take a life to do it. Thats why ps2yabasic is sooo frustrating. Thanks for your comment , sorry if this one is out of place or off-topic, i also have to say that im watching the contest's entrys and enjoing of it before voting. cheers

20
yeahh AVAST claims trojan.. but malware say it's safe. Very nice demo to watch. Classic effects greyscale, inverted colors etc. Nice to see it in real-time. Good theme and music, it looks great. Good work

Pages: [1] 2