scx = double(double(double(ginfo_dispy)-double(ginfo_dispy)/3.)*(5./3.)) scy = ginfo_dispy-ginfo_dispy/3. scxb = 600 scyb = 450 scid = 1 fps = 1000/30 fon="MSゴシック" buffer 0 screen scid,scx,scy,,ginfo_dispx/2-scx/2,(ginfo_dispy/2-scy/2)-25 buffer 3 ;マップテクスチャァン color 120,120,120 :boxf 0,0,30,30 color 255,100,100 :boxf 30,0,60,30 color 0,255,0:boxf 0,30,30,90 dim mapd,21,16 repeat 19 mapd(cnt,10)=1 loop mapd(4,9)=1 mx = 120. my = 0. bspeedy = 2. mxsize =30. mysize =60. mxp = 0. myp = bspeedy jumpp=0. uy=30. ftime=0.05 jumptime=0. repeat redraw 0 buffer 2,scxb,scyb ;入力 getkey zj,90 getkey right,39 getkey left,37 if left=0:if right=0{ if mxp!0:if mxp>0:mxp-=0.25 if mxp!0:if mxp<0:mxp+=0.25 } if left = 1 :mxp=-2. if right = 1 :mxp=2. if zj=0:jumptime=0 if zj=1:if jumptime<5:jumpp=12.:jumptime+ ;作画 ;myp=bspeedy x = 0. repeat 21 y = 0. repeat 16 if mapd(int(x),int(y))=0{ pos x*(double(scxb)/20.),y*(double(scyb)/15.) gmode 0,30,30 gcopy 3,0,0,30,30 } if mapd(int(x),int(y))=1{ pos x*(double(scxb)/20.),y*(double(scyb)/15.) gmode 0,30,30 gcopy 3,30,0,30,30 ftime+=0.01 if mx>x*(double(scxb)/20.)+1:if mx<x*(double(scxb)/20.)+31:if my+mysize+1>y*(double(scyb)/15.):if my+mysize+1<y*(double(scyb)/15.)+uy:ftime=0.{ my-=int((my+mysize)-int(y*(double(scyb)/15.))) };左下下 if mx+mxsize-1>x*(double(scxb)/20.)+1:if mx+mxsize-1<x*(double(scxb)/20.)+31:if my+mysize+1>y*(double(scyb)/15.):if my+mysize+1<y*(double(scyb)/15.)+uy:ftime=0.{ my-=int((my+mysize)-int(y*(double(scyb)/15.))) };右下下 if mx-1>x*(double(scxb)/20.)-1:if mx-1<x*(double(scxb)/20.)+29:if my>y*(double(scyb)/15.):if my<y*(double(scyb)/15.)+uy:ftime=0.{ mx+=int(int(x*(double(scxb)/20.)+29)-(mx-1))+1 };左上左 if mx-1>x*(double(scxb)/20.)-1:if mx-1<x*(double(scxb)/20.)+29:if my+(mysize/2)>y*(double(scyb)/15.):if my+(mysize/2)<y*(double(scyb)/15.)+uy:ftime=0.{ mx+=int(int(x*(double(scxb)/20.)+29)-(mx-1))+1 };左中左 if mx-1>x*(double(scxb)/20.)-1:if mx-1<x*(double(scxb)/20.)+29:if my+mysize-1>y*(double(scyb)/15.):if my+mysize-1<y*(double(scyb)/15.)+uy:ftime=0.{ mx+=int(int(x*(double(scxb)/20.)+29)-(mx-1))+1 };左下左 } y+ loop x+ loop ;ME pos mx,my gmode 0 gcopy 3,0,30,mxsize,mysize if myp>uy:myp=uy ;ある程度のスピードが出ると制限 mx+=mxp my+=myp myp=ftime*1.08 jumpp*=0.7 my-=jumpp ;判定 /* y = 0. repeat 15 color 0,0,0 line 0.,y*(double(scyb)/15.),double(scxb),y*(double(scyb)/15.) y+ loop y = 0. repeat 30 color 0,0,0 line y*(double(scxb)/30.),0,y*(double(scxb)/30.),scyb y+ loop */ pos 10,10 color 0,0,0 mes mx mes my mes mxp mes myp mes int((mx-1)-int(x*(double(scxb)/20.))) mes jumpp mes ftime color 255,255,255 pset mx-1,my+mysize-1 gosub*copy_screen redraw 1 await fps loop *copy_screen gsel scid scxbefore = scx scybefore = scy scx = ginfo_winx scy = ginfo_winy if scxbefore!scx : width scx,double(scx)*(3./5.):return if scybefore!scy : width double(scy)*(5./3.),scy:return pos 0,0 gmode 0,scxb,scyb gzoom scx,scy,2,,,scxb,scyb,1 return