I know this has been a topic of conversation before but has anyone worked out why a game works on 2.0 but not 1.3?
My Flappy Bird game is the Amiga Addict cover disk and works on an A500+ upwards but fails on an A500. I realised that my startup-sequence didn't work (had assign) but even when I remove this the game just gurus? It does ask for L: on boot so not sure if I should be doing something with this?
Or are some commands not 1.3 compatible? Can't see anything in the manual saying this and does say that on floppy it starts from a minimal 1.3 environment.
Code:
WBStartup
;tiles for pipes
LoadShape 1,"graphics/pipe1"
LoadShape 2,"graphics/pipe2"
LoadShape 3,"graphics/pipe3"
LoadShape 4,"graphics/blank"
;LoadShape 5,"graphics/pipemove"
;flappy bird sprite
LoadShape 8,"graphics/flappy1":GetaSprite 7,8
LoadShape 9,"graphics/flappy2":GetaSprite 8,9
LoadShape 10,"graphics/flappy3":GetaSprite 9,10
LoadShape 11,"graphics/flappyup1":GetaSprite 0,11
LoadShape 12,"graphics/flappyup2":GetaSprite 1,12
LoadShape 13,"graphics/flappyup3":GetaSprite 2,13
LoadShape 14,"graphics/flappydown1":GetaSprite 3,14
LoadShape 15,"graphics/flappydown2":GetaSprite 4,15
LoadShape 16,"graphics/flappydown3":GetaSprite 5,16
LoadShape 17,"graphics/flappydown4":GetaSprite 6,17
LoadShape 18,"graphics/lemming":GetaSprite 20,18
LoadShape 19,"graphics/shot":GetaSprite 21,19
;background elements
LoadShape 20,"graphics/background28"
LoadShape 21,"graphics/background38"
LoadShape 24,"graphics/background8"
LoadShape 25,"graphics/gameover"
LoadShape 26,"graphics/backgroundend"
LoadShape 27 ,"graphics/getready"
LoadShape 28,"graphics/flappywin"
LoadShape 29,"graphics/startscreen"
;numbers
LoadShape 30,"graphics/zero":GetaSprite 10,30
LoadShape 31,"graphics/one":GetaSprite 11,31
LoadShape 32,"graphics/two":GetaSprite 12,32
LoadShape 33,"graphics/three":GetaSprite 13,33
LoadShape 34,"graphics/four":GetaSprite 14,34
LoadShape 35,"graphics/five":GetaSprite 15,35
LoadShape 36,"graphics/six":GetaSprite 16,36
LoadShape 37,"graphics/seven":GetaSprite 17,37
LoadShape 38,"graphics/eight":GetaSprite 18,38
LoadShape 39,"graphics/nine":GetaSprite 19,39
LoadShape 40,"graphics/0"
LoadShape 41,"graphics/1"
LoadShape 42,"graphics/2"
LoadShape 43,"graphics/3"
LoadShape 44,"graphics/4"
LoadShape 45,"graphics/5"
LoadShape 46,"graphics/6"
LoadShape 47,"graphics/7"
LoadShape 48,"graphics/8"
LoadShape 49,"graphics/9"
;medals
LoadShape 50,"graphics/bronze"
LoadShape 51,"graphics/silver"
LoadShape 52,"graphics/gold"
LoadShape 53,"graphics/platinum"
;AA Logo
LoadShape 54,"graphics/AAlogo"
;set up palette
LoadPalette 0,"graphics/pipe3"
LoadPalette 0,"graphics/AAlogo",8
LoadPalette 0,"graphics/flappy1",16
LoadPalette 1,"graphics/pipe3"
LoadPalette 1,"graphics/AAlogo",8
LoadPalette 1,"graphics/lemming",16
LoadPalette 2,"graphics/backgroundend"
LoadPalette 3,"graphics/flappywin"
;load sounds
LoadSound 0,"sounds/flap.iff"
LoadSound 1,"sounds/ping.iff"
LoadSound 2,"sounds/smack.iff"
LoadSound 3,"sounds/shot.iff"
BitMap 0,576,256,3
BitMap 1,576,256,3
BitMap 2,320,256,3
BitMap 3,320,256,5
;dualplayfield $20+$6 (for 6 bitplanes)
;set colours to 32 for sprites
InitCopList 0,44,256,$20+$6,8,32,0
InitCopList 1,44,256,$5,8,32,0
InitCopList 2,44,256,$5,8,32,0
BLITZ
DisplayBitMap 1,3
BlitzKeys On
; load highscore from disk
highold=0
If OpenFile (0,"highscoret.dat")=-1
Fields 0,highold
End If
Get 0,0
CloseFile 0
high=highold
Dim sc(3)
Dim pipex(6)
DisplayAdjust 0, 0,0,0,95,-95; narrow display
DisplayAdjust 1, 0,0,0,95,-95; narrow display
Buffer 0,16384
.restart
score=0
DisplayPalette 0,1
CreateDisplay 0
Use BitMap 2: Block 24,0,0
Use BitMap 0: Cls
UnBuffer 0
DisplayBitMap 0,0,0,0,2,0,0
;set up random map
Dim map(1500): mp=0
Dim r(1500)
Gosub setup_map
;mp=180
SetColl 7,3,1; set colour - bird to collide with pipes
;pipe variables
pipex=0 :pipe_y=0:pipe_count=0:px=48:py=0
Scrollx=16:count=1
;main variables
by=60:lx=40
fx=0:fy=0:fydir=0:fireball=0
fb=30:fb1=1
s$="":p=0
ani=0
control=1
flap=0 :sc1=0
cheat=0; set cheat=0 for no collisions
gravity=0:jump=0 :sp=1 : die=0 : starty=1 :mv=1:mdir=1:speed=1
db=0
vy=0:grav=0.35
mp=0
;reset pipe position counter for new game
For n=0 To 6: pipex(n)=0: Next n
DisplayPalette 0,1
While RawStatus(69)=0
;Poke.w $dff180,$f00
If starty=1 Then VWait(1)
If starty>0 Then UnBuffer 0
Use BitMap db
If mp=1000 Then lemming=1
.debug
;show variables
;BitMapOutput 2:Colour 4,5
; Locate 10,25:Print"by=":Print by:Print" "
; Locate 10,26:Print"vy=":Print vy:Print" "
; Locate 10,27:Print"die=":Print die:Print" "
; Locate 10,28:Print"m=":Print m:Print" ":Print"mp=":Print mp:Print" "
; Locate 10,29:Print"scrollx=":Print scrollx:Print" "
;Locate 10,25:Print"lx=":Print lx
; MouseWait
;slow down game
;VWait (5)
If die=1 Then Goto loop4
If starty>0 Then Goto loop2
If control=1
If RawStatus(64)=0 Then flap=0
If RawStatus(64)=-1 AND jump=0 AND flap=0 Then ani=1:Sound 0,1: flap=1: jump=1 : sp=8:gravity=0
End If
If control=2
If Joyb(0)=0 Then flap=0
If Joyb(0)=1 AND jump=0 AND flap=0 Then ani=1:Sound 0,1: flap=1: jump=1 : sp=8:gravity=0
End If
If control=3
If Joyb(1)=0 Then flap=0
If Joyb(1)=1 AND jump=0 AND flap=0 Then ani=1: Sound 0,1: flap=1: jump=1 : sp=8:gravity=0
End If
;bouncing code
If jump=1 Then vy=4 :jump=0
If cheat=0 Then by=by-vy:vy=vy-grav: If vy<-6 Then vy=-6
.loop
If mp>1021 Then Goto loop4
;Poke.w $dff180,$0f0
.drawpipe
If count>192 Then Goto skip2
;if pipe_count=0 then get number from array and inc pipe_count
If pipe_count=0
m=map(mp)
gap=r(mp)
End If
pipe_count=pipe_count+1
If pipe_count>12 AND pipe_count<17 Then Goto skip2
If pipe_count>28 Then Goto skip2
;blit pipe or space
If m=0 Then Block 4,px,py
If m=1 Then Block 1,px,py
If m=2 AND py>103 Block 1,px,py
If m=2 Then Block 3,px,80
;y+16 to draw next piece of pipe
py=py+16
.skip2
;draw gaps
If m=1
If pipe_count=13 Then Block 2,px,gap
If pipe_count=14 Then Block 4,px,gap+16
If pipe_count=15 Then Block 4,px,gap+32
If pipe_count=16 Then Block 3,px,gap+48: pipex(p)=128:p=p+1:If p=6 Then p=0
If pipe_count=29 Then Block 2,px,gap
If pipe_count=30 Then Block 4,px,gap+16
If pipe_count=31 Then Block 4,px,gap+32
If pipe_count=32 Then Block 3,px,gap+48
End If
;copy pipe to next screen
If pipe_count=16 Then px=px+224-32:py=0
If pipe_count=32 Then px=px-224+32:px=px+32:pipe_count=0:mp=mp+1:py=0
count=count+1
;reset if full screen drawn
If count=224-32 Then px=48:py=0:count=1:pipe_count=0:mp=mp+1:py=0
If cheat=1 Then Goto nodie
DoColl
If PColl(0)=-1 Then Sound 2,1:die=1
.nodie
;decrease pipex variable (if not 0) and check to see
;if this equals bx to increase score
For n=0 To 5
If pipex(n)=0 Then Goto skip3
pipex(n)=pipex(n)-1
If pipex(n)=0 Then score=score+1 :Sound 1,2
.skip3
Next n
.loop4
;die routie
If die=1
by=by+8
If by>184
Use BitMap 0:Cls
DisplaySprite 0,1,320,0,0
For n=1 To 6 Step 2
DisplaySprite 0,1,320,0,n
Next n
CreateDisplay 1
DisplayPalette 1,2
Use BitMap 3
Blit 26,0,0
;Blit 25,95,50
s$=Str$(score) :l=Len(s$)
For n=1 To l
b$=Mid$(s$,n,1)
sc(n)=Val(b$)
Blit sc(n)+40,164+(n*7)-((l-1)*9),98;,n-1
Next n
s$=Str$(high) :l=Len(s$)
For n=1 To l
b$=Mid$(s$,n,1)
sc(n)=Val(b$)
Blit sc(n)+40,170+(n*7)-((l-1)*9),118,n+2
Next n
If score>=10 AND score<20 Then Blit 50,117,112
If score>=20 AND score<30 Then Blit 51,117,112
If score>=50 AND score<100 Then Blit 52,117,112
If score>=100 Then Blit 53,117,112
;VWait
DisplayBitMap 1,3
VWait
If score>high Then high=score
VWait(200): Goto restart
End If
;Goto loop2
End If
If die=1 OR vy<-5.99 Then DisplaySprite 0,6,100,by,0:Goto loop3
If by>184 Then by=184
.skip1
If ani=3 Then ani=0
If jump=0 Then DisplaySprite 0,7+ani,100,by,0
;If jump>2 AND jump<4 Then DisplaySprite 0,7+ani,100,by,0
;If jump>4 Then DisplaySprite 0,1,100,by,0
ami_count=ami_count+1: If ami_count=5 Then ami_count=0:ani=ani+1
;lemming appears
If mp>1020 AND lx>7 Then DisplaySprite 0,20,lx+182,62,4:lx=lx-1
.loop3
;lemming fires
If lx<8
If fx<90 Then fydir=Rnd(4)-2:fx=lx+180:fy=74:fireball=fireball+1:Sound 3,4
If fireball=50 Goto game_finished
DisplaySprite 0,21,fx,fy,2
fx=fx-2:fy=fy+fydir
If RectsHit (100,by,15,11,fx,fy,6,6)=-1 Then Sound 1,2:die=1
End If
; by=by+gravity:gravity=gravity+gr : If gravity>8 Then gravity=8
;don't touch the floor or ceiling
If by>185 Then die=1 : Sound 2,1
If by<6 Then die=1 :Sound 2,1 :by=6
.loop2
;If die=1 AND by>185
;End If
;display score
If mp<1021 AND starty=0
s$=Str$(score) :l=Len(s$)
For n=1 To l
b$=Mid$(s$,n,1)
sc(n)=Val(b$)
DisplaySprite 0,sc(n)+10,140+(n*13)-((l-1)*11),10,n*2
Next n
End If
Use BitMap 2
If starty=1 AND RawStatus(64)<>0 Then starty=2:control=1
If starty=1 AND Joyb(0)<>0 Then starty=2:control=2
If starty=1 AND Joyb(1)<>0 Then starty=2:control=3
If starty=1
Block 29,0,0;:Blit 20,sc1+71,192
DisplaySprite 0,8+ani,100,fb+38,0
End If
If starty>1
If starty=2
Block 24,0,0 :Blit 20,sc1+71,192
; Use BitMap 1:Block 24,0,0 :Blit 20,sc1+71,192
End If
BBlit 0,27,101,50:
starty=starty+1
If starty=50
starty=0:by=80
UnBuffer 0
Block 24,0,0
scrollx=0
EndIf
EndIf
If starty=1
fb=fb+fb1: If fb>40 Then fb1=-2:ani=ani+1
If fb<25 Then fb1=2 :ani=ani+1
If fb=30 Then ani=ani+1
If ani=2 Then ani=0
End If
;Poke.w $dff180,$00f
;Use BitMap 2
If mp<1022 AND starty=0
Blit 20,sc1+71,192 : sc1=sc1-1:If sc1<-11 Then sc1=0
scrollx=scrollx+1: If scrollx=224-33 Then scrollx=0
End If
VWait
If starty=0 Then DisplayBitMap 0,db,scrollx,0,2,0,0
If starty>0 Then DisplayBitMap 0,0,0,0,2,0,0
;db=1-db
;Poke.w $dff180,$0ff
;MouseWait
Wend
End
If high>highold
dummy= OpenFile (0,"highscoret.dat")=-1
Fields 0,high
Put 0,0
CloseFile 0
End If
End
.setup_map
mp=0
;easy pipes
For n= 0 To 50
If mp=1 Then map(n)=1: r(n)=Rnd(100)+8
mp=mp+1: If mp=3 Then mp=0
Next n
mp=0
;harder pipes
For n= 51 To 100
If mp=1 Then map(n)=1: r(n)=Rnd(100)+8
mp=mp+1: If mp=2 Then mp=0
Next n
;25% chance of doubles
mp=0
For n= 110 To 160
If mp=1 Then map(n)=1: r(n)=Rnd(100)+8
If mp=2 AND Rnd(100)>75 Then map(n)=1:r(n)=r(n-1)
mp=mp+1: If mp=3 Then mp=0
Next n
mp=0
;harder pipes
For n= 161 To 210
If mp=1 Then map(n)=1: r(n)=Rnd(100)+8
mp=mp+1: If mp=2 Then mp=0
Next n
;50% chance of doubles
mp=0
For n= 221 To 270
If mp=1 Then map(n)=1: r(n)=Rnd(100)+8
If mp=2 AND Rnd(100)>50 Then map(n)=1:r(n)=r(n-1)
mp=mp+1: If mp=3 Then mp=0
Next n
mp=0
;harder pipes
For n= 271 To 320
If mp=1 Then map(n)=1: r(n)=Rnd(100)+8
mp=mp+1: If mp=2 Then mp=0
Next n
;75% chance of doubles
mp=0
For n= 331 To 380
If mp=1 Then map(n)=1: r(n)=Rnd(100)+8
If mp=2 AND Rnd(100)>25 Then map(n)=1:r(n)=r(n-1)
mp=mp+1: If mp=3 Then mp=0
Next n
mp=0
;harder pipes
For n= 382 To 432
If mp=1 Then map(n)=1: r(n)=Rnd(100)+8
mp=mp+1: If mp=2 Then mp=0
Next n
;tunnels
r=48
For n= 442 To 464 Step 3
r=r+8
For i= 0 To 2
map(n+i)=1: r(n+i)=r
Next i
Next n
;tunnels
r=100
For n= 466 To 490 Step 3
r=r-8
For i= 0 To 2
map(n+i)=1: r(n+i)=r
Next i
Next n
;All doubles
mp=0
For n= 495 To 545
If mp=1 Then map(n)=1: r(n)=Rnd(100)+8
If mp=2 Then map(n)=1:r(n)=r(n-1)
mp=mp+1: If mp=3 Then mp=0
Next n
mp=0
;harder pipes
For n= 550 To 600
If mp=1 Then map(n)=1: r(n)=Rnd(100)+8
mp=mp+1: If mp=2 Then mp=0
Next n
;straight tunnel 1
r=108
For n= 601 To 630 Step 3
For i= 0 To 2
map(n+i)=1: r(n+i)=r
Next i
Next n
;straight tunnel 2
r=16
For n= 635 To 662 Step 3
For i= 0 To 2
map(n+i)=1: r(n+i)=r
Next i
Next n
;straight tunnel 3
r=Rnd(100)+8
For n= 667 To 694 Step 3
For i= 0 To 2
map(n+i)=1: r(n+i)=r
Next i
Next n
mp=0
;harder pipes
For n= 700 To 750
If mp=1 Then map(n)=1: r(n)=Rnd(100)+8
mp=mp+1: If mp=2 Then mp=0
Next n
;diagonal tunnel up and down
r=108
For n= 755 To 766 Step 3
For i= 0 To 2
map(n+i)=1: r(n+i)=r
r=r-8
Next i
Next n
For n= 767 To 778 Step 3
For i= 0 To 2
map(n+i)=1: r(n+i)=r
r=r+8
Next i
Next n
r=108
For n= 779 To 790 Step 3
For i= 0 To 2
map(n+i)=1: r(n+i)=r
r=r-8
Next i
Next n
For n= 791 To 802 Step 3
For i= 0 To 2
map(n+i)=1: r(n+i)=r
r=r+8
Next i
Next n
;All doubles big gaps
mp=0 :rr=0
For n= 805 To 860
If mp=1 OR mp=5 Then map(n)=1: r(n)=108+rr
If mp=2 OR mp=6 Then map(n)=1:r(n)=r(n-1)
mp=mp+1: If mp=7 Then mp=0
If rr=0 AND mp=5 Then rr=-92:Goto loop5
rr=0
.loop5
Next n
;diagonal tunnel up and down
r=108
For n= 862 To 873 Step 3
For i= 0 To 2
map(n+i)=1: r(n+i)=r
r=r-8
Next i
Next n
For n= 874 To 885 Step 3
For i= 0 To 2
map(n+i)=1: r(n+i)=r
r=r+8
Next i
Next n
mp=0
;harder pipes
For n= 886 To 950
If mp=1 Then map(n)=1: r(n)=Rnd(100)+8
mp=mp+1: If mp=2 Then mp=0
Next n
;straight tunnel middle
r=50
For n= 951 To 999 Step 3
For i= 0 To 2
map(n+i)=1: r(n+i)=r
Next i
Next n
;platform for lemming
map(1020)=2
r(1020)=50
Return
.game_finished
CreateDisplay 2
DisplayPalette 2,3
DisplayBitMap 2,3
Block 28,0,0
VWait (250)
For n=0 To 4
DisplaySprite 0,0,0,0,n
Next n
Goto restart