Dale's Home Page

Dale’s Atari 800 Games › Stan Ockers

Double Bounce

By Stan Ockers, in the ACE newsletter of July/August 1984.

Play Double Bounce

Stan’s write-up

Double Bounce is a game for two players. The object for each is to bounce on top of a floating cloud and climb down the ladder on the left of the screen. Ten points are gained each time you do this. Choose some reasonable point goal before you start.

Joysticks in ports 1 & 2 control trampolines whch bounce the players. Pushing up when contact is made causes the player to go higher — down decreases the height. You needn't push up or down to maintain a constant height. The fire button releases the player for the first bounce. Miss a trampoline and you fall in the quicksand below. You will then have to wait for the other player to suffer the same fate. When this happens, two new bouncers will appear on screen.

The difficulty for each player can be selected at any time. Pushing ‘OPTION’ changes the difficulty for the player on the left, while ‘SELECT’ changes that of the right hand player. Higher difficulty means the players move horizontally faster. The ‘START’ key will restart the game. Oh yes, beware of the big green bird!

—Stan Ockers

Stan Ockers' Double Bounce write-up in the July/August 1984 ACE newsletter
As printed: page 4 of the July/August 1984 issue.

The program

The listing, “DOUBLE BOUNCE by Stan Ockers”, is on pages 8, 9, 10 of the issue. Stan wrote it in Action!, the compiled language from Optimized Systems Software, and readers needed the Action! cartridge to type it in and compile it. There is no Action! compiler here, so the game page runs a hand translation of the listing into JavaScript: one function for each of Stan’s procedures, with his variable names, sizes and memory addresses, driving the same emulated Atari 800 (its screen, player-missile graphics, collisions and sound) that runs the BASIC games.

Where this copy came from: Written in Action!. The listing was transcribed by hand from the scan (pages 8-10; there is no typed-in copy), and its picture and sound data checked byte for byte against a compiled copy of the game from the Atari archives, which turned out to be a slightly later version of Stan's (it adds a title and a SELECT key for the number of players). The game page runs a hand translation of the printed listing into JavaScript.

Show the listing
; DOUBLE BOUNCE
; Stan Ockers 6-84
; Written in Action (c) 1983 ACS
; ACE Newsletter, 3662 Vine Maple Dr.
; Eugene, OR 97405 July 84 $12 year
;
MODULE
BYTE accnt0,accel0,rtlim,ltlim,toplim,
 accnt1,accel1,hpos1m,j,k,audf1=$D200,
 botlim,pmpage,vcount=$D40B,hdly0,dif0,
 hslo0,hpos0m,byt,tflg,hdly1,dif1,
 m0pl=$D008,m1pl=$D009,m2pl=$D00A,flip,
 m3pl=$D00B,hitclr=$D01E,hitflg0,hslo1,
 p2pl=$D00E,p3pl=$D00F,stk0,stk1,flip0,
 status0=[0],status1=[0],scnt0,scnt1,
 hposp0=$D000,hposp1=$D001,hposp2=$D002
 hposp3=$D003,hposm0=$D004,hpos0,hpos1,
 hposm1=$D005,hposm2=$D006,hpos2,hpos3,
 hposm3=$D007,hitflg1,hitflg2,clk=20,
 audf2=$D202,aflg0=[0],aflg1=[0],auf0,
 audc1=$D201,audc2=$D203,auf1,auc0,
 consol=$D01F,auc1,flip1,ficnt0,ficnt1,
 vpos3
INT vdir0,vpos0,delv0,hdir0,delh0,
  vdir1,vpos1,delv1,hdir1,delh1,birdir,
  vdir3
CARD source,dest,pmbase,cnt,score0,
 score1
BYTE ARRAY manbou=[8 28 42 20 8 28 42
  8 28 20 54],walk1=[24 28 25 62 88
  152 24 28 36 36 54],carry=[12 31 125
  235 138 136 0 0 0 0 0],falling=[8 28
  42 20 73 62 8 28 54 65 0],man0(11),
  tramp=[$F0 $F0 $F0 0 0 $0F $0F $0F],
  bird1=[0 196 107 60 122 16 40 0],
  cloud=[16 56 108 214 191 126 60],
  climb1=[8 28 62 28 72 62 9 28 20 52
   6],climb2=[8 28 62 28 9 62 72 28 20
   22 48],walk2=[24 28 26 60 88 24 24
   120 72 72 12],bird2=[0 35 214 60 94
   8 20 0],man1(11)

PROC Setdif0() ; difficulty plyr 0
 dif0==+1 IF dif0=4 THEN dif0=1 FI
 hdly0=5-dif0 Poke(656,2) Poke(657,2)
 Print("DIF=") PrintB(dif0)
RETURN

PROC Setdif1() ; difficulty plyr 1
 dif1==+1 IF dif1=4 THEN dif1=1 FI
 hdly1=5-dif1 Poke(656,2) Poke(657,33)
 Print("DIF=") PrintB(dif1)
RETURN

PROC Begin0() ; restart plyr 0
 vpos0=180 hdir0=0 delv0=0 hpos0=50
 delh0=1 vdir0=1 accnt0=1 hitclr=0
 hitflg0=0 scnt0=9 status0=0 ficnt0=9
 SetBlock(pmbase+1024,256,0)
RETURN

PROC Begin1() ; restart plyr 1
 vpos1=175 hdir1=0 delv1=0 hpos1=50
 delh1=1 vdir1=1 accnt1=1 hitclr=0
 hitflg1=0 scnt1=9 status1=0 ficnt1=9
 SetBlock(pmbase+1280,256,0)
RETURN

PROC Init() ; restart everything
  accel0=10 rtlim=205 ltlim=45
  toplim=5 botlim=205 Begin0()
  accel1=10 hpos0m=120 Begin1()
  hpos0=50 vdir0=1 hdir0=0 delv0=0
  hitflg0=0 hitflg1=0 score0=0 score1=0
  hpos2=175 hpos3=175 hpos1m=160
  dif0=0 Setdif0() dif1=0 Setdif1()
  flip0=0 flip1=0 birdir=1 vpos3=100
  vdir3=1
RETURN

PROC Pminit() ; Player Missiles
  pmbase=pmpage*256
  Poke(54279,pmpage) Poke(559,62)
  Poke(53277,3) Poke(623,17)
  SetBlock(pmbase+968,1280,0) vpos3=100
  dest=pmbase+964 source=tramp
  MoveBlock(dest,source,8) Poke(711,33)
  dest=pmbase+1620 source=cloud
  MoveBlock(dest,source,7)
  Poke(704,50) Poke($D00C,$FF)
  Poke(705,46) Poke(706,13)
  Poke($D00A,1) Poke($D00B,1)
  Poke(707,192)
RETURN

PROC Parab0() ; bounce plyr 0
 vpos0==+delv0*vdir0 audf1=100+vpos0/2
 IF vpos0 MOD 4=0 THEN audc1==-1
  IF audc1<$A0 THEN audc1=$A0 FI FI
 IF vpos0<toplim THEN vpos0=toplim FI
 IF vpos0>botlim THEN vpos0=botlim
    status0=5 FI
 accnt0==-1
 IF accnt0=0 THEN accnt0=accel0
  IF vdir0<0 THEN delv0==-1
   IF delv0<0 THEN delv0=0 vdir0=1
      hitclr=0 hitflg0=0  FI
  ELSE delv0==+1 FI FI
 hslo0==-1 IF hslo0=0 THEN hslo0=hdly0
  hpos0==+delh0*hdir0
  IF hpos0>rtlim THEN hpos0=rtlim
      hdir0=-1 FI
  IF hpos0<ltlim THEN hpos0=ltlim
      hdir0=1 FI FI
 IF hitflg0=0 THEN
  IF (m0pl&1)=1 THEN hdir0=1
   hitflg0=1 vdir0=-1 FI
  IF (m1pl&1)=1 THEN hdir0=-1
   hitflg0=1 vdir0=-1 FI
  IF hitflg0=1 THEN audc1=$AF
  IF (stk0&1)=0 AND delv0<6 THEN
     delv0==+1 FI
  IF (stk0&2)=0 AND delv0>1 THEN
     delv0==-1 FI FI FI
 IF (p2pl&1)=1 THEN status0=3
   score0==+10 Position(1,1)
   PrintCD(6,score0)
   vpos0=75 hpos0=hpos2+65 FI
 IF (p3pl&1)=1 THEN status0=9
  hpos0=hpos3+5 vpos0=vpos3 FI
RETURN

PROC Parab1() ; bounce player 1
 vpos1==+delv1*vdir1 audf2=100+vpos1/2
 IF vpos1 MOD 4=0 THEN audc2==-1
  IF audc2<$A0 THEN audc2=$A0 FI FI
 IF vpos1<toplim THEN vpos1=toplim FI
 IF vpos1>botlim THEN vpos1=botlim
    status1=5 FI
 accnt1==-1
 IF accnt1=0 THEN accnt1=accel1
  IF vdir1<0 THEN delv1==-1
   IF delv1<0 THEN delv1=0 vdir1=1
      hitclr=0 hitflg1=0  FI
  ELSE delv1==+1 FI FI
 hslo1==-1 IF hslo1=0 THEN hslo1=hdly1
  hpos1==+delh0*hdir1
  IF hpos1>rtlim THEN hpos1=rtlim
      hdir1=-1 FI
  IF hpos1<ltlim THEN hpos1=ltlim
      hdir1=1 FI FI
 IF hitflg1=0 THEN
  IF (m2pl&2)=2 THEN hdir1=1
   hitflg1=1 vdir1=-1 FI
  IF (m3pl&2)=2 THEN hdir1=-1
   hitflg1=1 vdir1=-1 FI
  IF hitflg1=1 THEN audc2=$AF
  IF (stk1&1)=0 AND delv1<6 THEN
     delv1==+1 FI
  IF (stk1&2)=0 AND delv1>1 THEN
     delv1==-1 FI FI FI
 IF (p2pl&2)=2 THEN status1=3
   score1==+10 Position(14,1)
   PrintCD(6,score1)
   vpos1=75 hpos1=hpos2+65 FI
 IF (p3pl&2)=2 THEN status1=9
  hpos1=hpos3+5  vpos1=vpos3 FI
RETURN

PROC Note0(BYTE pitch,ctrl)
 audf1=pitch audc1=ctrl aflg0=1
 auf0=pitch auc0=ctrl
RETURN

PROC Note1(BYTE pitch,ctrl)
 audf2=pitch audc2=ctrl aflg1=1
 auf1=pitch auc1=ctrl
RETURN

PROC Sink0() ; quicksand for 0
 IF scnt0>0 THEN
  Note0(100+10*(10-scnt0),$AC)
  IF Rand(10)=0 THEN scnt0==-1
  FOR j=0 to (10-scnt0)
  DO man0(j)=0 OD k=0
  FOR j=(10-scnt0) TO 10
  DO man0(j)=manbou(k) k==+1 OD FI
 ELSE status0=8 FI
RETURN

PROC Sink1() ; quicksand for 1
 IF scnt1>0 THEN
  Note1(75+10*(10-scnt1),$AC)
  IF Rand(10)=0 THEN scnt1==-1
  FOR j=0 to (10-scnt1)
  DO man1(j)=0 OD k=0
  FOR j=(10-scnt1) TO 10
  DO man1(j)=manbou(k) k==+1 OD FI
 ELSE status1=8 audc2=$A0 FI
RETURN

PROC Fight0() ; bird catches 0
IF Rand(5)=0 THEN ficnt0==-1
 IF ficnt0 MOD 2=0 THEN source=bird1
  ELSE source=bird2 FI byt=30+Rand(50)
  dest=pmbase+1792+vpos3 Note0(byt,$2C)
  MoveBlock(dest,source,6)
 IF ficnt0=0 THEN status0=4
 FOR j=0 to 10 DO man0(j)=carry(j) OD
 FI FI
RETURN

PROC Fight1() ; bird catches 1
IF Rand(5)=0 THEN ficnt1==-1
 IF ficnt1 MOD 2=0 THEN source=bird1
  ELSE source=bird2 FI byt=30+Rand(50)
  dest=pmbase+1792+vpos3 Note1(byt,$2C)
  MoveBlock(dest,source,6)
 IF ficnt1=0 THEN status1=4
 FOR j=0 to 10 DO man1(j)=carry(j) OD
 FI FI
RETURN

PROC Bounce() ; Main routine
byt=Peek(106) pmpage=byt-8 Poke(106,byt-8)
DO
Graphics(1) Poke(710,244) Poke(712,150)
Poke(752,1) Poke(656,3) Poke(657,1)
Poke(708,30)
FOR j=0 TO 37 DO Put(222) OD
FOR j=3 TO 19 DO Position(1,j)
     PutD(6,104) OD
 Pminit() Init()
  DO
   hposp0=hpos0 hposp1=hpos1
   hposp2=hpos2 hposp3=hpos3
   DO UNTIL vcount=128 OD
   SetBlock(pmbase+1024+vpos0,11,0)
   SetBlock(pmbase+1280+vpos1,11,0)
   ; status 0 = walk player
   IF status0=0 AND Rand(3)=0 THEN
    hpos0==+1 IF flip0=0 THEN
    Note0(120,$AC) FOR j=1 TO 10 DO
    man0(j)=walk1(j) OD flip0=1 ELSE
    Note0(150,$AC) FOR j=0 TO 10
    DO man0(j)=walk2(j) OD flip0=0 FI
    IF hpos0=120 THEN
    FOR j=0 TO 10 DO man0(j)=manbou(j)
     OD status0=1 FI FI
   IF status1=0 AND Rand(2)=0 THEN
    hpos1==+1 IF flip1=0 THEN
    Note1(95,$AC) FOR j=1 TO 10 DO
    man1(j)=walk1(j) OD flip1=1 ELSE
    Note1(125,$AC) FOR j=0 TO 10
    DO man1(j)=walk2(j) OD flip1=0 FI
    IF hpos1=160 THEN
    FOR j=0 TO 10 DO man1(j)=manbou(j)
     OD status1=1 FI FI
   ; status 1 = wait to jump
   IF status0=1 AND Strig(0)=0 THEN
      status0=2 FI
   IF status1=1 AND Strig(1)=0 THEN
      status1=2 FI
   ; status 2 = bounce
   IF status0=2 THEN Parab0() FI
   IF status1=2 THEN Parab1() FI
   ; status 3 = cloud
   IF status0=3 THEN hpos0=hpos2
     IF hpos0=56 THEN status0=6 FI FI
   IF status1=3 THEN hpos1=hpos2+5
     IF hpos1=56 THEN status1=6 FI FI
   ; status 4 = bird carry
   IF status0=4 THEN hpos0=hpos3+5
     vpos0=vpos3+5
     IF hpos0=130 THEN FOR j=0 TO 10
     DO man0(j)=falling(j) OD
     status0=7 audc1=$AC FI FI
  IF status1=4 THEN hpos1=hpos3
     vpos1=vpos3+5
     IF hpos1=130 THEN FOR j=0 TO 10
     DO man1(j)=falling(j) OD
     status1=7 audc2=$AC FI FI
  ; status 5 = quicksand
  IF status0=5 THEN Sink0() FI
  IF status1=5 THEN Sink1() FI
  ; status 6 = climb down ladder
  IF status0=6 THEN vpos0==+1
   IF clk>10 THEN clk=0 IF flip0=0
   THEN Note0(100,$AC) FOR j=1 TO 10
    DO man0(j)=climb1(j) OD flip0=1
   ELSE Note0(50,$AC) FOR j=0 TO 10 DO
   man0(j)=climb2(j) OD flip0=0 FI FI
    IF vpos0=180 THEN
       Begin0() status0=0 FI FI
  IF status1=6 THEN vpos1==+1
   IF clk>10 THEN clk=0 IF flip1=0
   THEN Note1(95,$AC) FOR j=1 TO 10
    DO man1(j)=climb1(j) OD flip1=1
   ELSE Note1(30,$AC) FOR j=0 TO 10 DO
   man1(j)=climb2(j) OD flip1=0 FI FI
   IF vpos1=175 THEN
      Begin1() status1=0 FI FI
  ; status 7 = fall
  IF status0=7 THEN vpos0==+1
    audf1=vpos0
    IF vpos0=botlim THEN status0=5 FI FI
  IF status1=7 THEN vpos1==+1
    audf2=vpos1
    IF vpos1=botlim THEN status1=5 FI FI
  ; status 9 = caught by bird
  IF status0=9 THEN fight0() FI
  IF status1=9 THEN fight1() FI
  source=man0 dest=pmbase+1024+vpos0
  MoveBlock(dest,source,11)
  source=man1 dest=pmbase+1280+vpos1
  Moveblock(dest,source,11)
  stk0=Stick(0) stk1=Stick(1)
  IF (Stk0&4)=0 AND hpos0m>ltlim
    THEN hpos0m==-1 FI
  IF (Stk0&8)=0 AND hpos0m<rtlim
    THEN hpos0m==+1 FI
  IF (Stk1&4)=0 AND hpos1m>ltlim
    THEN hpos1m==-1 FI
  IF (Stk1&8)=0 AND hpos1m<rtlim
    THEN hpos1m==+1 FI
 hposm0=hpos0m-4 hposm2=hpos1m-4
 hposm1=hpos0m+4 hposm3=hpos1m+4
 IF Peek(20) MOD 3=0 THEN hpos2==-1 FI
 IF status0<9 AND status1<9 THEN
 vpos3==+vdir3
 IF vpos3>155 THEN vdir3=-1 FI
 IF vpos3<105 THEN vdir3=1 FI
 IF birdir=1 THEN source=bird1 ELSE
   source=bird2 FI
 dest=pmbase+1792+vpos3
 MoveBlock(dest,source,8)
 hpos3==+birdir FI
 IF Rand(100)=0 THEN birdir=1 FI
 IF Rand(100)=0 THEN birdir=-1 FI
 ; status 8 = dead
 IF status1=8 AND status0=8 THEN
  Begin0() Begin1() FI
 IF aflg0=1 THEN auc0==-1 audc1=auc0
  IF (auc0&$0F)=0 THEN aflg0=0 FI FI
 IF aflg1=1 THEN auc1==-1 audc2=auc1
  IF (auc1&$0F)=0 THEN aflg1=0 FI FI
 IF consol=3 THEN Setdif0()
   DO UNTIL consol<>3 OD FI
 IF consol=5 THEN Setdif1()
   DO UNTIL consol<>5 OD FI
UNTIL consol=6
OD OD
RETURN

Play Double Bounce