New games every week!
JSE - Link Test
26th May 2021  
SpikeDislike v1.5 in JSE!

And.. A Test Link!


Codeboxes now include a "Open in JSE" link.
It *should* open the code directly into JSE.
Please give it a go, and let me know whether it worked or not, including what System and Browser you're using.

// SpikeDislike v1.5 // by Jayenkai // Created 2021/4/13 Symbol 0,"0__20!203044030,30030,404404004044040,30030,304403020!2"; Symbol 1,"0__00A,B0,A9AB,0A9AB.CAAB?CAAB?CB!CD0B.CD0,C,D"; Symbol 2,"2__0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0/y0_0_0_0_0_0_0_;0_0_0_0y0;0;0y0_0_0_0;0_0_0_0_0_0_0_y"; Graphics 1024,720,2; AA Off SetFont "Cabaret" Dim Spike(20) Dim SpikePos(20) Dim BallGhost(60) Highscore=0 if FileExists==1 LoadFile Highscore=ReadFile(1) endif Gosub Restart Repeat Button=Gamepad(ButtonA) or Gamepad(ButtonB) or Gamepad(ButtonRight)>0 or MouseDown() if Button==0 then bdis=0 If Ingame==0 then Gosub Menu If Ingame==1 then Gosub Game Flip Forever @Menu if Score>Highscore then Highscore=Score:WriteFile 1,Highscore:SaveFile ResetDraw SetCol 255,100,100 SetFontSize 24 Text ScreenWidth*0.5-64,(ScreenHeight*0.4)+128,"Spike",1 Text ScreenWidth*0.5+64,(ScreenHeight*0.4)+160,"Dislike",1 SetCol 255,255,255 Text ScreenWidth*0.5,(ScreenHeight*0.4)+192,"Highscore : "+Highscore,1 SetSize 6,6 DrawImg ScreenWidth*0.5,ScreenHeight*0.4,0,0 if Button==1 and bdis==0 then Gosub Restart Return @Restart Passed=0 Score=0 ScoreShow=0 Combo=0 ComboTick=0 SuperCombo=0 Gap=360 Speed=0.6 Bounce=3.5 BounceRot=0 SpikesMade=0 BNoise=0 Delta=1 SpikeScroll=640 Ingame=1 bdis=1 For n=0 to 10 SeedRnd SpikesMade Spike(n)=Rand(0,7) SpikesMade=SpikesMade+1 SpikePos(n)=SpikesMade next return @Game CLS;ResetDraw ScoreShow=ScoreShow-((ScoreShow-Score)/5) if Abs(ScoreShow-Score)<1 then ScoreShow=Score if Button<0.5 then SuperCombo=0 dx=0 if Button>0.5 and bdis==0 then dx=Neg(-16) Starfield dx*0.5,0,2 SpikeScroll=SpikeScroll+dx SetRot 0 was=Abs(Sin(BounceRot) * (32*8)) BounceRot=BounceRot+(Bounce*Delta) is=Abs(Sin(BounceRot) * (32*8)) if is<was then BNoise=0 if is>was and BNoise==0 then PlaySFX("Beeper_Jingle_Up",1):BNoise=1 dead=0 SetFontSize 32 SetCol 180,255,180 Text ScreenWidth/2,32,Right("000000000000"+Floor(ScoreShow),12),1 SetFontSize 16 SetCol 180,220,255 Text ScreenWidth-32,32,Right("000000000000"+Floor(Highscore),12),2 ComboTick=ComboTick-2.5 if ComboTick<0 and Combo>0 then PlaySFX("Beeper_2tone_Down"):Combo=0:SuperCombo=0 endif endif SetAlpha 0.5 if ComboTick>0 then Rect ScreenWidth/2,48,ComboTick*2,16,1 SetAlpha 1 SetCol 0,96,0 Rect 0,((ScreenHeight()-64)+32),ScreenWidth(),8 SetCol 80,40,0 Rect 0,((ScreenHeight()-64)+40),ScreenWidth(),100 SetCol 255,180,96 SetSize 2 for n=0 to 18 BallGhost(n)=BallGhost(n+1)+dx BallGhost(n+30)=BallGhost(n+31) if n % 2==0 SetAlpha n/30 DrawImg BallGhost(n),BallGhost(n+30),1,0; endif next SetAlpha 1 DrawImg 100,((ScreenHeight()-64)-is),1,0; px=100;py=((ScreenHeight()-64)-is); BallGhost(19)=px:BallGhost(49)=py; if SpikeScroll<0-Gap For n=0 to 10 h=Spike(n+1) Spike(n)=h h=SpikePos(n+1) SpikePos(n)=h Next SeedRnd SpikesMade Spike(10)=Rand(0,7) SpikesMade=SpikesMade+1 SpikePos(10)=SpikesMade SpikeScroll=SpikeScroll+Gap endif // Draw Spikes For n=0 to 10 x=(Gap*n)+SpikeScroll h=Spike(n) y=(ScreenHeight()-64)-(h*32) DrawImg(x,y,0,h) h=SpikePos(n);SetFontSize 8 Text(x,ScreenHeight()-16,h,1) d=Pyth(x,y,px,py) if d<32 then dead=1 d=Pyth(x-32,y-32,px,py) if d<31 then dead=1 d=Pyth(x+32,y-32,px,py) if d<31 then dead=1 d=Pyth(x-32,y+32,px,py) if d<31 then dead=1 d=Pyth(x+32,y+32,px,py) if d<31 then dead=1 if x<68 and h>Passed then Passed=h Combo=Combo+1 ComboTick=160 SuperCombo=SuperCombo+1 Score=Score+(Combo*SuperCombo) pitch=((Combo)/20)+1 if SuperCombo<2 then PlaySFX("beeper_2tone_up",pitch) if SuperCombo>1 then PlaySFX("beeper_4tone_up",pitch) endif Next If dead==1 then bdis=1:Ingame=0:PlaySFX("Explode_Low_1"):PlaySFX("Explode_Low_2"):PlaySFX("Beeper_Fall",1.2,1):PlaySFX("Beeper_Fall",0.7,1) Return

Views 79, Upvotes 1
Jse , Test
New games every week!
Site credits : Jayenkai
(c) Jayenkai 2017 and onwards, site design Rychan. RSS feed
Blog - JSE - Link Test - AGameAWeek