Jump to content

Xuel's Blog

  • entries
    12
  • comments
    31
  • views
    31,131

Jump!


Xuel

3,776 views

Jump!!!

 

An entry into the NOMAM 2014 BASIC Ten-Liners Contest

 

Download

 

Jump.atr

 

Screenshots and Video

 

blogentry-21021-0-47254300-1393048715.pngblogentry-21021-0-63419200-1393049120.pngblogentry-21021-0-97876900-1393049120.png

 

 

Objective

 

Avoid falling off the bottom of the screen or getting crushed at the top. Move left and right with the joystick. Press trigger to start.

 

Features

  • Smooth scrolling at 44 FPS
  • In-game music
  • Physics simulation
  • Hiscore and splash screen :)
  • All in Nine lines of Turbo Basic

Limitations

 

Unfortunately it runs much slower on an NTSC machine.

 

Code

 

Note that special ATASCII characters are not shown.

 

Line 0

 

0 PL=ADR("U U          *U*U*     ***** *     U U U U   y`Q< y`HQ@5(-5@QH<-#(5@Q[H5-(5@Q"):GOSUB 8:POKE 752,1

PL - Level and music data. Call screen initialization routine. Turn off cursor.

 

Line 1

 

1 ? "SCORE:",S;:IF S>H:H=S:? " GREAT!";:ENDIF  :? "HISCORE:",H:? "":? "              ";:WHILE STRIG(0):WEND

Score and splash screen.

 

Line 2

 

2 SP=$E2A0:PM=$A200:HP=$D000:SC=$BE70:S2=SC+10:CC=200:SB=SC+190:VS=$D405:POKE $D01D,2:C=1.4:Y=20:A=0.2:G=0.2:GOSUB 8

Tell GTIA to fetch player data from ANTIC via GRACTL, $D01D. Call screen initialization routine.

 

SP - Pointer to circle in character set ROM.

PM - Pointer to Player/Missle data. Not properly allocated. :)

HP - HPOSP0 Player 0 X position register

SC - Start of screen data. Blindly assume OS always puts it here.

S2 - Pointer to second line of screen

CC - Size of screen in bytes

SB - Bottom of screen where new lines will be drawn

VS - VSCROL fine vertical scrolling register

C - Unused

Y - Y position

A - horizontal acceleration

G - gravity

 

Line 3

 

3 POKE 559,$2E:CO=$D004:HC=$D01E:X=100:N=%0:M=%0:S=%0:SOUND 0,0,10,10:P=$D200:POKE 752,1:T=PL+52:R=$FE46:E=R+$FF

Set DMACTL. Initialize velocity. Set score to 0. Prepare sound channel. Turn off cursor.

 

CO - P0PF collision register.

HC - HITCLR collision clear.

P - AUDF1 POKEY channel 1 period register.

T - Pointer to music period data.

R - Pointer to ROM lookup tables used as level data.

E - End of level data.

 

Line 4

 

4 POKE 77,0:DO :J=STICK(%0):IF J<8:IF M<%1 THEN M=M+A:ELSE :IF J<13 AND M>-%1 THEN M=M-A:ENDIF

Start game loop. Check joystick. Set X velocity accordingly.

 

Line 5

 

5 IF PEEK(CO):N=-0.6:POKE HC,%0:ELSE :IF N<1.5:N=N+G:ENDIF :ENDIF =X+M:Y=Y+N:MOVE SP,PM+Y,9:POKE HP,X

Check collision. Set Y velocity accordingly. Add velocity to position. Plot ball.

 

Line 6

 

6 IF Y>130 OR Y<9 OR X>250 OR X<5:SOUND:GOTO 1:ENDIF :F=F+%1:PAUSE %0:IF F>7:POKE VS,%0:MOVE S2,SC,CC:IF (S&7)=%0

Check for death. Wait for VSYNC with PAUSE 0. Fine scrolling. Coarse scrolling.

 

Line 7

 

7 MOVE PL+PEEK(R)&31,SB,10:R=R+8:IF R>E:R=R-$FF:ENDIF :ENDIF :F=%0:MOVE T+(S&31),P,%1:S=S+%1:ENDIF :POKE VS,F:LOOP

Draw new platforms. Use OS ROM tables as level data. Play music. Add points to score. Set VSCROL. Loop.

 

Line 8

 

8 GRAPHICS 3:D=$BE54:POKE D-3,$68:POKE D,$28:MOVE D,D+1,17:POKE 623,1:POKE 704,$38:POKE $D407,PM/256:MOVE SC,PM,128:RETURN

Screen configuration routine. Modifies OS display list in-place to include VSCROL attributes. Incidentally sets GPRIOR, COLPM0, PMBASE and clears PMG bitmap.

 

Thanks

 

This game was inspired by two great games, Man Goes Down and Downfall.

  • Like 5

7 Comments


Recommended Comments

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...