A downloadable game

I used DeepL and Google Translate.

The creator is Japanese, and we would appreciate your understanding.


----- Double Jump Bugzy -----

 -- Overview

I had never made a game with 10 lines. This is my first challenge.

I decided to take on this challenge myself, as the "10 lines hero" has become a very popular topic in Japan in 2021.

It's a simple game, but I hope you enjoy it.


 -- Entry Sheet

Entry to

"12th Edition of BASIC 10 Liner Contest"

 https://www.homeputerium.de/

- Category

 EXTREME-256

- System requirement

 All national MSX systems.

 For PAL system users, replace "TIME/60" with "TIME/50" in line 190.

- Files

 DJB.dsk

 Disk images that can be used with openMSX / blueMSX / webMSX.

 DJB.cas

 Tape images that can be used with openMSX / blueMSX / webMSX.

 DJB.bas

 A program file in ASCII format.

 ReadMe_DJB-jp.txt

 ReadMe in Japanese.

 ReadMe_DJB-en.txt

 Translation into English was done using DeepL and Google Translate.


 ScreenShot_DJB.gif

 Screen capture image.



 -- Story

I'm DJ-Bugzy the rabbit.

I don't know why, but I've been being chased by ghosts for a while!

I barely boarded the raft, but he's still chasing me!

Anyway, I must escape from the ghosts!

 -- How to Play

- Cursor keys / Joystick

 Move DJ-Bugzy left or right.

 He cannot stop suddenly. Watch your speed!

- Spacebar / Joystick 1 button

 The rabbit can jump, which is its specialty.

 He can double jump, just like his name says DJ. Amazing!

Control DJ-Bugzy to avoid falling off the raft.

Every 100 points, the raft is broken and shortened.

After 600 points, the ghosts get tired. ...Are ghosts tired?

After 1000 points, a boat landing will appear on the far right. Jump on it and you're clear!

 -- Aim for the high score!

- Scratch Bonus

 He's a DJ so he's good at scratching too!

 You will receive a scratch bonus if you graze the ghost. High score if it continues to be grazed in succession.

- Burst Bonus

 If you continue the scratch bonus 10 times, you will receive a burst bonus of 50 points, which will make the ghosts pop.

 Bursts can follow. Punish the ghosts!

- Wall Kick Bonus

 When it touches the wall on either side, it bounces back and 50 points are awarded.

 If you're cornered by a ghost, kick the wall to avoid it!

 -- Play style

- Time Attack

 Aim for the fastest time to clear. First of all, let's cut 60 seconds.

- High-score Attack

 When you arrive at the boat landing, don't clear the boat and keep teasing the ghost.

 How many points can you get?

 -- Source code

100 DEFINTA-Y:SCREEN1,1,0:COLOR15,5,3:WIDTH32:KEYOFF:VPOKE760,248:VPOKE8203,105:FORI=0TO47:VPOKE14336+I,VAL("&H"+MID$("387CAEAEFE7C391E1C3E75757F3E9C788CD078ACAEFFFF6C42663C5A5AFFFF66310B1E3575FFFF360066FFFF5A5E3CE7",I*2+1,2)):NEXT:H=RND(-TIME):ZH=99.99
110 DEFFNS(P)=STICK(0)+STICK(1):DEFFNT(P)=-STRIG(0)-STRIG(1):DEFFNV(P)=VPEEK(6753+P/8):ZT=0:SB=0:SC=-1:SN=0:S=0:T=0:X=120:Y=96:XX=0:YY=4:C=15:F=2:EX=RND(1)*240:EY=60:SX=0:SY=0:EM=6:EC=11:TX=8:TN=0:B=16:PUT SPRITE0,(X,Y),C,3:PUT SPRITE1,(0,208)
120 FOR I=0 TO 1:I=-(FNT(0)=0):NEXT:CLS:PRINT USING" HIGH##### / TIME###.##s";H;ZH:PRINT " ====  Double Jump Buggzy  ====":PRINT:FOR I=0 TO 1:I=FNT(0):PRINT SPC(9);"Press trigger!";CHR$(13);SPC(31);CHR$(13);:NEXT:TIME=0
130 SC=SC+1:IF SC>=SN THEN SN=SN+100:LOCATE12,5:PRINT"LEVEL";INT(SN/100);:PLAY"T255V13O7L32EDCB":B=B+(SN<1001):TX=TX+1:T$=" "+STRING$(B,95)+" ":EC=11+2*(SN>500)+(SN>1001):EM=EM+(SN>500):IF EM<1 THEN EM=8:LOCATE28,18:PRINT"I";:LOCATE28,19:PRINT"####";
140 SX=SX+SGN(X-EX)+(ABS(SX)>=EM)*SGN(SX):EX=EX+SX:SY=SY+SGN(Y-EY)+(ABS(SY)>=EM)*SGN(SY):EY=EY+SY:PUT SPRITE1,(EX,EY),EC,-(SX>0):LOCATETX/2,19:PRINT T$;:TX=TX-SGN(TX-TN):IF TX=TN THEN TN=RND(1)*34
150 IF (ABS(X-EX)<13 AND ABS(Y-EY)<13) THEN SB=SB-(SB<10):SY=-(SY*(SB<10))+SGN(Y-EY)*(10*(SB=10)):C=7+(SB=10):SC=SC+SB*2-50*(SB=10):SOUND4,0:SOUND5,3+(SB=10):SOUND10,14 ELSE SB=SB+(SB>0):C=15:SOUND10,0
160 S=FNS(0):T=FNT(0)*(T=0):XX=XX+((S=7)-(S=3))*2-SGN(XX):X=X+XX*2:IF T AND F<2 THEN F=F+1:YY=-7:SOUND2,0:SOUND3,1:SOUND9,16:SOUND13,1
170 LOCATE0,22:IF (X<0) OR (X>239) THEN XX=-SGN(XX)*12:X=-(X>128)*239:SC=SC+50:SOUND2,0:SOUND3,2:SOUND9,16:SOUND13,1 ELSE IF F THEN Y=Y+YY:YY=YY+1:IF Y>134 THEN Y=134:F=0:SOUND11,0:SOUND12,24:SOUND2,0:SOUND3,6:SOUND9,16:SOUND13,1
180 PUT SPRITE0,(X,Y),C,SGN(XX)+3:ZT=TIME/60:IF(ABS(X-EX)<6 AND ABS(Y-EY)<6) OR (F=0 AND (FNV(X)=32)) THEN SOUND10,0:PUT SPRITE0,(X,Y),14,5:PRINT STRING$(14,10)+STRING$(32,94)+STRING$(2,10):LOCATE11,9:PRINT"GAME OVER":FOR I=0 TO 1:I=FNT(0):NEXT:GOTO110
190 H=-(H<=SC)*SC-(H>SC)*H:PRINT USING"SCORE#####  SB##  Time###.##s";SC;SB;ZT;:IF F=0 AND (FNV(X)=35) THEN FOR I=0 TO 1:LOCATE0,9:PRINT SPC(31);CHR$(13);" Congratulations! You escaped!";:I=FNT(0):NEXT:ZH=-(ZH<=ZT)*ZH-(ZH>ZT)*ZT:GOTO 110 ELSE 130

 

-- Description

There is nothing difficult about it.

It makes heavy use of logic operations, but if you have ever programmed on MSX, you should be able to understand it without difficulty.

Under these conditions, we have no choice but to prioritize keeping it to 10 lines rather than efficiency and readability.

No forced omission of characters, such as omitting the semicolon in PRINT, is used. Spaces are also inserted whenever possible.

I don't think we use variables without initializing them (assuming 0), but only T$ is done in the main loop.

- Variable

 I Generic Loop Index

 H high score

 ZH record time

 ZT Time Calculation Work

 SB Scratch Count

 SC score

 SN 次のレベルアップスコア

 S,T Next Level Up Score

 X,Y DJ-Bugzy Position

 XX,YY DJ-Bugzy Movement

 C DJ-Bugzy display color

 F Number of jumps

 EX,EY ghost Position

 SX,SY ghost Movement

 EM Maximum speed of ghost

 EC Ghost display color

 T$ Raft String

 TX Raft position

 TN Target position of the raft

 B Raft Size

- Line 100

 DEFINTA-Y:

  A-Y numeric variables to be integer type.

 SCREEN1,1,0:COLOR15,5,3:WIDTH32:KEYOFF:

  Screen initialization.

 VPOKE760,248:VPOKE8203,105:

  Set the character of the raft.

 FORI=0TO47:VPOKE14336+I,VAL("&H"+MID$("387CAEAEFE7C391E1C3E75757F3E9C788CD078ACAEFFFF6C42663C5A5AFFFF66310B1E3575FFFF360066FFFF5A5E3CE7",I*2+1,2)):NEXT:

  Sprite defined.

  0 - ghost Left

  1 -       Right

  2 - DJ-Bugzy Left

  3 -          Center

  4 -          Right

  5 - Miss

 H=RND(-TIME):

  High score is used for random value initialization.

  The "H" can be 0 or 1. Since the score cannot be less than 1, well, it doesn't matter, does it?

 ZH=99.99

  Initialize the fastest time.

- Line 110

 DEFFNS(P)=STICK(0)+STICK(1):DEFFNT(P)=-STRIG(0)-STRIG(1):

  Function definition of control input. Parameter P is dummy.

 DEFFNV(P)=VPEEK(6753+P/8):

  Function to read the character at the feet.

 ZT=0:SB=0:SC=-1:SN=0:S=0:T=0:X=120:Y=96:XX=0:YY=4:C=15:F=2:EX=RND(1)*240:EY=60:SX=0:SY=0:EM=6:EC=11:TX=8:TN=0:B=16:

  Initialize variables.

 PUT SPRITE0,(X,Y),C,3:PUT SPRITE1,(0,208)

  Show sprites on the title screen.

- Line 120

 FOR I=0 TO 1:I=-(FNT(0)=0):NEXT:

  Stops as long as the button is pressed.

  Avoid accidentally skipping the title screen when the game is over or cleared.

 CLS:PRINT USING" HIGH##### / TIME###.##s";H;ZH:PRINT " ====  Double Jump Buggzy  ====":PRINT:

  Displays high score, fastest clear time, and title screen.

 FOR I=0 TO 1:I=FNT(0):PRINT SPC(9);"Press trigger!";CHR$(13);SPC(31);CHR$(13);:NEXT:

  Press trigger!

 TIME=0

  Initialize in-game time.

- Line 130

 SC=SC+1:

  Score +1.

 IF SC>=SN THEN 

  If your score exceeds your level-up score

  SN=SN+100:

   Next level up score +100.

   You will always come here first. This is where the raft's initial settings and levels can be displayed.

  LOCATE12,5:PRINT"LEVEL";INT(SN/100);:

   Displays the current level.

  PLAY"T255V13O7L32EDCB":

   Play the level-up sound effect.

  B=B+(SN<1001):

   Raft length, -1 to level 10.

  TX=TX+1:

   Raft position +1 so that raft garbage is not displayed.

  T$=" "+STRING$(B,95)+" ":

   Create a string of rafts.

  EC=11+2*(SN>500)+(SN>1001):

   Set the color of the ghost.

  EM=EM+(SN>500):

   After level 6, the speed of the ghost is -1.

  IF EM<1 THEN EM=8:LOCATE28,18:PRINT"I";:LOCATE28,19:PRINT"####";

   When the speed of the ghost reaches 0, set the speed back to 8 and display the boat landing.

- Line 140

 SX=SX+SGN(X-EX)+(ABS(SX)>=EM)*SGN(SX):EX=EX+SX:SY=SY+SGN(Y-EY)+(ABS(SY)>=EM)*SGN(SY):EY=EY+SY:

  Calculate the speed at which the ghost moves and its position.

 PUT SPRITE1,(EX,EY),EC,-(SX>0):

  Show ghosts.

 LOCATETX/2,19:PRINT T$;:

  Show rafts.

 TX=TX-SGN(TX-TN):

  Move the raft.

 IF TX=TN THEN TN=RND(1)*34

  When the raft reaches the target position, a new target position is set.

- Line 150

 IF (ABS(X-EX)<13 AND ABS(Y-EY)<13) THEN

  If you graze a ghost

  SB=SB-(SB<10):

   Scratch bonus +1.

  SY=-(SY*(SB<10))+SGN(Y-EY)*(10*(SB=10)):

   After 10 consecutive scratch bonuses, a burst is triggered and the ghost is popped.

  C=7+(SB=10):

   After 10 consecutive scratch bonuses, the burst color is set.

  SC=SC+SB*2-50*(SB=10):

   Scratch and burst bonuses are added.

  SOUND4,0:SOUND5,3+(SB=10):SOUND10,14 

   Scratch and burst bonus sound effects.

 ELSE 

  Unless it was grazed by a ghost.

  SB=SB+(SB>0):C=15:SOUND10,0

   Scratch Bonus to -1, color to normal color, and stop Scratch Bonus sound effect.

- Line 160

 S=FNS(0):T=FNT(0)*(T=0):

  Control Input.

  To make it easier to do double jumps, trigger input should not accept continuous input.

 XX=XX+((S=7)-(S=3))*2-SGN(XX):X=X+XX*2:

  DJ-Bugzy lateral movement calculation.

 IF T AND F<2 THEN 

  If there is a trigger input and the number of jumps is within 2

  F=F+1:YY=-7:

   Set the number of jumps to +1. Set the amount of jump movement.

  SOUND2,0:SOUND3,1:SOUND9,16:SOUND13,1

   Jumping sound effects.

- Line 170

 LOCATE0,22:

  Set the cursor position for the fall direction in line 180 and the score display in line 190.

 IF (X<0) OR (X>239) THEN 

  If you are in contact with a wall on either side

  XX=-SGN(XX)*12:X=-(X>128)*239:

   It bounces in the opposite direction.

  SC=SC+50:

   50 wall kick bonus points.

  SOUND2,0:SOUND3,2:SOUND9,16:SOUND13,1

   Wall kicking sound effect.

 ELSE IF F THEN 

  If you are not in contact with a wall and are jumping

  Y=Y+YY:YY=YY+1:

   DJ-Bugzy's jump-movement calculations.

  IF Y>134 THEN 

   If DJ-Bugzy is positioned at the height of the raft

   Y=134:F=0:

    Set to raft height. Reset the number of jumps.

   SOUND11,0:SOUND12,24:SOUND2,0:SOUND3,6:SOUND9,16:SOUND13,1

    Landing sound effect.

    The envelope is set here. Since it starts in the air, the landing event always comes first.

- Line 180

 PUT SPRITE0,(X,Y),C,SGN(XX)+3:

  Show DJ-Bugzy.

 ZT=TIME/60:

  Calculate the time.

 IF(ABS(X-EX)<6 AND ABS(Y-EY)<6) OR (F=0 AND (FNV(X)=32)) THEN 

  If you are in contact with a ghost or your feet are blank.

  SOUND10,0:

   Stop scratch bonus sound effect.

  PUT SPRITE0,(X,Y),14,5:

   DJ-Bugzy's Missing Character Display.

  PRINT STRING$(14,10)+STRING$(32,94)+STRING$(2,10):

   Falling direction.

  LOCATE11,9:PRINT"GAME OVER":

   Game Over Display.

  FOR I=0 TO 1:I=FNT(0):NEXT:

   Wait until trigger input is received.

  GOTO110

   Return to the title screen.

- Line 190

 H=-(H<=SC)*SC-(H>SC)*H:

  High score updated.

 PRINT USING"SCORE#####  SB##  Time###.##s";SC;SB;ZT;:

  Displays scores, scratch bonuses, and times.

 IF F=0 AND (FNV(X)=35) THEN 

  When you land at the boat landing.

  FOR I=0 TO 1:LOCATE0,9:PRINT SPC(31);CHR$(13);" Congratulations! You escaped!";:I=FNT(0):NEXT:

   Clear screen is displayed and waits until trigger input is received.

  ZH=-(ZH<=ZT)*ZH-(ZH>ZT)*ZT:

   Updated clear time.

  GOTO 110 

   Return to the title screen.

 ELSE 130

  Repeat the main loop.

 -- Afterword

I moved to assembler rather quickly, so this is the first time I have used so many BASIC logic operations.

We feel that the limit of 10 lines is more stringent than the limit of one screen.

I was reminded that the "Program Pochette" and "MSX FAN" single-screen programs were well thought out.

We were particular about having a title, game over, and clear screen, and at least two play styles.

Simply put, we need four loops: title, game-over, clear, game-main.

Make it in 10 lines !? I can do it !...

I thought it was seriously impossible to include the title screen until the last minute, but I managed to do it.

We tried to make it possible to play in two different styles: time attack and score attack.

We didn't want the game to be a monotonous dodging game, so we added a SHMUP flavor of scratch and burst.

To make scratching enjoyable, the ghosts are set to be quite lenient in their hit detection.

I did not have to give up joystick input. For MSX games, you don't want to remove joystick support.

The only thing I wanted to do was to make the game speed a bit faster, but then maybe I should already develop it in assembler.

The letter "Y" on the clear screen is now the same color as the raft.

Only one byte of the underscore is rewritten to make it a raft. It would be covered with the letter Y, but I cannot find any other suitable letter.

There aren't many characters common to MSX in all countries. Well, please excuse me for saying that it is such a production.

If you have any feedback, please visit my video account.

Thank you very much.

(Explanation for non-Japanese)

"Program Pochette" and "MSX FAN"

An amateur computer magazine sold in Japan in the 1980s.

A single-screen program is a program designed to fit into 40x24 characters when a List is displayed.

 -- About me

This application was created by Kaido Kotoni.

Home page

https://kotonikd.ninja-x.jp/

YouTube

https://www.youtube.com/channel/UC5egj_wXPhi8UQgg8xNPNKw

Nico Nico Douga

https://www.nicovideo.jp/user/17343572/

Download

Download
DJB.BAS 2 kB
Download
DJB.cas 1 kB
Download
DJB.dsk 720 kB
Download
ReadMe_DJB-en.txt 27 kB
Download
ReadMe_DJB-jp.txt 19 kB

Install instructions

 -- Startup

- Disk <DJB.dsk>

 LOAD "DJB.BAS"

 RUN

- Tape <DJB.cas>

 CLOAD

 RUN

Both have the same content.

Operation has been confirmed with openMSX / blueMSX / webMSX.

Leave a comment

Log in with itch.io to leave a comment.