Things are plodding along at the one week mark.
All of the audio and visuals elements are finished.
Attached is the media folder needed to make this source code happy.
Rem ***** SUPRAMAN Demo 0.015 July 5, 2007 *****
Rem ************* DarkBASIC Classic ************
Rem *********** July 5, 2007 Version ***********
Sync On
Set Display Mode 640,480,16
Set Gamma 0,0,0
Hide Mouse
Randomize Timer()
BLANK= 32
GREY= Rgb(142,142,141)
RED= Rgb(196,48,48)
SHOWTITLE= 1
RESET= 0
FREEZE= 0
DISPINC= 33
Dim CROOKS(5)
Dim WAYOUT(25,4)
Restore WODAT_
For JND= 0 To 4
For IND= 0 To 25
Read WOV
WAYOUT(IND,JND)= WOV
Next IND
Next JND
Load Sound "media\flying.wav",1
Load Sound "media\transray.wav",2
Load Sound "media\bridgeblow.wav",3
Load Sound "media\helipack.wav",4
Load Sound "media\helicopter.wav",5
Load Sound "media\satellite.wav",6
Load Sound "media\argohit.wav",7
Load Sound "media\tarastouch.wav",8
Load Sound "media\pickup.wav",9
Load Sound "media\intojail.wav",10
Load Sound "media\bridgeback.wav",11
Load Sound "media\gameover.wav",12
Load Bitmap "media\bitmaps.png",1
For IND= 0 To 5
For JND= 0 To 3
Get Image (IND*4)+JND+101,(JND*160),(IND*105),(JND*160)+160,(IND*105)+105
Next JND
Next IND
Set Current Bitmap 0
For IND= 1 To 24
Ink 0,0
Box 0,0,639,419
Sync
Sprite 1,0,0,IND+100
If IND = 1 Then Scale Sprite 1,400
Paste Sprite 1,0,0
Sync
If IND < 22
INSCAN()
Get Image IND,0,0,640,420
Else
If IND= 22
Gosub GETIMS_
Else
If IND = 23
Get Image 27,0,0,640,420
Else
Get Image 28,0,0,640,250
Get Image 29,0,255,640,300
Get Image 30,0,304,640,357
Get Image 31,0,359,640,417
Endif
Endif
Endif
Sync
Delete Image IND+100
Next IND
Scale Sprite 1,100
Sprite 1,0,0,BLANK
MAKEROOM(Rgb(101,111,227),GREY)
Get Image 22,0,0,640,420
MAKEROOM(Rgb(111,209,110),GREY)
Get Image 23,0,0,640,420
MAKEROOM(Rgb(210,209,63),GREY)
Get Image 24,0,0,640,420
MAKEROOM(Rgb(228,111,110),GREY)
Get Image 25,0,0,640,420
MAKEROOM(Rgb(101,160,224),Rgb(214,213,213))
Get Image 26,0,0,640,420
RESET_:
BLANKPMG()
Cls 0
Sync
Cls 0
Sync
Wait 2
Ink 0,0
If SHOWTITLE
Paste Image 27,0,0
Paste Image 34,172,424
Set Gamma 255,255,255
Sync
Wait 2000
Box 0,0,639,419
Paste Image 28,0,100
Sync
Wait 2000
Box 0,420,639,479
SHOWTITLE= 0
Endif
Paste Image 1,0,0
CURSCR= 0
DRWSCR= 0
Sprite 16,188,316,35
DISPTIME(0)
HPOS= 192
VPOS= 90
BASIM= 53
If RESET Then GETOFFBUTT(HPOS,VPOS,BASIM) : RESET = 0
Paste Image 38,0,420
FIND= 0
FAST= 0
TOGFIND= 0
TOGFAST= 0
Rem Phase 1 - Game Options Selection until joystick pull
Do
Sprite 1,192,VPOS,Rnd(1)+BASIM
Sync
Gosub GETUSERIN_
If RESET Then Goto RESET_
If PULL > -1 Then Goto START_
If TOGFIND
FIND= 1- FIND
If FIND
Paste Image 50,324,420
Else
Paste Image 39,324,420
Endif
GETOFFBUTT(HPOS,VPOS,BASIM)
TOGFIND= 0
Else
If TOGFAST
FAST= 1- FAST
If FAST
Paste Image 52,296,452
Else
Paste Image 51,296,452
Endif
GETOFFBUTT(HPOS,VPOS,BASIM)
TOGFAST= 0
Endif
Endif
Loop
START_:
Rem Phase 2 - Fly Supraman down into booth
Box 0,420,639,479
Sync
Box 0,420,639,479
Paste Image 33,0,424
Sync
STIME= Timer()
Loop Sound 1
LASTIME= 0
TRANS= 0
FREEZE= 0
INTACT= 1
Repeat
If Timer() > (LASTIME+DISPINC)
LASTIME= Timer()
Gosub GETUSERIN_
If RESET Then Goto RESET_
If FREEZE
STPIC= 1
Gosub INFREEZE_
Endif
If HPULL = 2
BASIM= 53
Else
If HPULL= 6 Then BASIM= 55
Endif
If BUTT > 0
If TRANS = 0
Stop Sound 1
Loop Sound 2
TRANS= 1
Endif
If PULL = -1 And DRWSCR <> 0
DRAWSCREEN(0)
DRWSCR= 0
Else
If PULL > -1
NEWSCR= WAYOUT(0,PULL/2)
If NEWSCR <> DRWSCR
DRAWSCREEN(NEWSCR)
DRWSCR= NEWSCR
Endif
Endif
Endif
Else
If TRANS
Stop Sound 2
Loop Sound 1
TRANS= 0
Endif
If DRWSCR <> CURSCR
DRAWSCREEN(0)
DRWSCR= 0
Endif
Endif
DISPTIME(Timer()-STIME)
If DRWSCR = 0
Sprite 1,HPOS,VPOS,Rnd(1)+BASIM
Else
Endif
Sync
If BUTT = 0 Then VPOS= VPOS+ 16
Endif
Until VPOS > 318
VPOS= 318
HPOS= 188
BASIM= BASIM+ 8
Stop Sound 1
Ink RED,0
Rem Phase 3 - Walk KC into bridge screen
Rem Phase 4 - Start bridge explosion, crook escape and KC back to booth
Rem Phase 5 - Main game loop
Rem Phase 6 - Walk KC into World Daily
Rem Phase 7 - EOG
LASSCR= -1
Do
DISPTIME(Timer()-STIME)
If CURSCR <> LASSCR
DRAWSCREEN(CURSCR)
Sprite 1,HPOS,VPOS,BASIM
LASSCR= CURSCR
For IND= 0 To 5
CROOKS(IND)= Rnd(1)
Next IND
DISPGANGBARS()
Endif
If Upkey() Then CURSCR= WAYOUT(CURSCR,0)
If Rightkey() Then CURSCR= WAYOUT(CURSCR,1)
If Downkey() Then CURSCR= WAYOUT(CURSCR,2)
If Leftkey() Then CURSCR= WAYOUT(CURSCR,3)
If Spacekey() And WAYOUT(CURSCR,4) > 0 Then CURSCR= WAYOUT(CURSCR,4)
If Scancode() = 59 Then RESET= 1 : STOPSOUNDS() : Goto RESET_
If CURSCR <> LASSCR
Wait 100
Else
Wait 2
Endif
Sync
Loop
End
GETIMS_:
Get Image BLANK,612,76,636,116
Get Image 33,0,240,640,292
Get Image 34,0,329,296,360
Get Image 35,408,144,440,212
Get Image 36,608,124,640,184
Get Image 37,608,24,640,120
Get Image 38,0,360,640,420
Get Image 39,324,360,640,388
For JND= 0 To 9
Get Image 40+JND,16+(JND*64),0,64+(JND*64),20
Next JND
Get Image 50,324,296,640,324
Get Image 51,296,392,500,420
Get Image 52,296,328,500,356
Get Image 53,0,144,64,184
Get Image 54,68,144,132,184
Get Image 55,0,188,64,228
Get Image 56,68,188,132,228
Get Image 57,0,28,32,84
Get Image 58,32,28,64,84
Get Image 59,0,88,32,144
Get Image 60,32,88,64,144
Get Image 61,64,24,96,84
Get Image 62,96,24,128,84
Get Image 63,64,84,96,144
Get Image 64,96,84,128,144
Get Image 65,128,28,152,84
Get Image 66,160,28,192,84
Get Image 67,128,88,152,144
Get Image 68,160,88,192,144
Get Image 69,192,28,224,84
Get Image 70,192,88,224,144
Get Image 71,224,28,256,84
Get Image 72,256,28,288,84
Get Image 73,224,88,256,144
Get Image 74,256,88,288,144
Get Image 75,288,28,320,84
Get Image 76,320,28,352,84
Get Image 77,288,88,320,144
Get Image 78,320,88,352,144
Get Image 79,352,28,384,84
Get Image 80,384,28,416,84
Get Image 81,352,88,384,144
Get Image 82,384,88,416,144
Get Image 83,416,28,448,84
Get Image 84,448,28,480,84
Get Image 85,416,88,448,144
Get Image 86,448,88,480,144
Get Image 87,480,28,512,84
Get Image 88,512,28,544,84
Get Image 89,480,88,512,144
Get Image 90,512,88,544,144
Get Image 91,544,24,576,88
Get Image 92,576,24,608,88
Get Image 93,544,88,576,152
Get Image 94,576,88,608,152
Get Image 95,136,144,200,188
Get Image 96,204,144,268,188
Get Image 97,136,192,200,236
Get Image 98,204,192,268,236
Get Image 99,272,144,336,188
Get Image 100,340,144,404,164
Get Image 101,340,168,404,188
Get Image 102,340,192,404,212
Get Image 103,444,144,476,176
Get Image 104,444,180,476,212
Get Image 105,480,144,512,176
Get Image 106,480,180,512,212
Get Image 107,516,144,548,176
Get Image 108,516,180,548,212
Get Image 109,552,156,580,216
Return
GETUSERIN_:
PULL= -1
KEY= Scancode()
If KEY > 58 And KEY < 63
If KEY < 61
STOPSOUNDS()
If KEY = 59
RESET= 1
Else
FREEZE= 1
Endif
Else
If KEY = 61
TOGFIND= 1
Else
TOGFAST= 1
Endif
Endif
Else
BUTT= Spacekey() + Joystick Fire A() + Joystick Fire B()
JX= Joystick X()
JY= Joystick Y()
HPULL= -1
VPULL= -1
If JX > 250 Or Rightkey() Or KEY = 32
HPULL= 2
Else
If JX < -250 Or Leftkey() Or KEY = 30
HPULL= 6
Endif
Endif
If JY > 250 Or Upkey() Or KEY = 17
VPULL= 0
Else
If JY < -250 Or Downkey() Or KEY = 31
VPULL= 4
Endif
Endif
If HPULL = -1 Or VPULL = -1
PULL= HPULL+ VPULL+ 1
Else
If VPULL= 0 And HPULL= 6
PULL= 7
Else
PULL= (VPULL+HPULL)/2
Endif
Endif
Endif
Return
INFREEZE_:
FRZTIM= Timer()-STIME
STOPSOUNDS()
STPIC= CURSCR+1
If STPIC = 26 Then STPIC= 0
DRAWSCREEN(STPIC)
GETOFFBUTT(HPOS,VPOS,BASIM)
Repeat
For IND= STPIC To 25
DRAWSCREEN(IND)
SCRTIM= Timer()
Repeat
Sprite 1,HPOS,VPOS,Rnd(1)+BASIM
Sync
Gosub GETUSERIN_
If RESET Then Goto RESET_
If PULL > -1
STIME= Timer()-FRZTIM
DRAWSCREEN(CURSCR)
FREEZE= 0
Loop Sound 1
Goto FINFREEZE_
Endif
Until Timer() > (SCRTIM+2800)
Next IND
STPIC= 0
Until STPIC
FINFREEZE_:
Return
WODAT_:
Data 19,11,5,6,7,9,10,11,12,3,14,15,16,17
Data 4,18,19,20,8,13,2,22,23,24,21,22
Data 1,2,3,4,5,6,7,8,9,10,11,12,13
Data 14,15,16,17,18,19,20,0,4,17,11,19,21
Data 11,19,20,9,14,2,3,4,18,5,6,7,8
Data 19,10,11,12,13,15,16,17,20,6,8,12,23
Data 20,0,1,2,3,4,5,6,7,8,9,10,11
Data 12,13,14,15,16,17,18,19,9,14,13,5,24
Data 0,0,23,0,0,0,0,0,0,0,24,0,0
Data 25,0,0,21,0,22,0,0,0,0,0,0,0
Function BLANKPMG()
For IND = 1 To 16
Sprite IND,0,0,BLANK
Next IND
Endfunction
Function DISPGANGBARS()
If CROOKS(0) Then Box 64,12,79,31
If CROOKS(1) Then Box 96,12,111,31
If CROOKS(2) Then Box 128,12,143,31
If CROOKS(3) Then Box 160,12,175,31
If CROOKS(4) Then Box 192,12,207,31
If CROOKS(5) Then Box 224,12,255,31
Endfunction
Function DISPTIME(TIME)
If TIME > 5999999 Then TIME= 5999999
SECS= TIME/1000
MINS= (SECS/60)
SECS= (SECS-(MINS*60))+ 10000
If MINS < 10
DIG= 0
Else
DIG= Val(Left$(Right$(Str$(MINS),2),1))
Endif
Sprite 17,320,12,DIG+40
Sprite 18,384,12,(Val(Right$(Str$(MINS),1)))+40
Sprite 19,448,12,(Val(Left$(Right$(Str$(SECS),2),1)))+40
Sprite 20,512,12,(Val(Right$(Str$(SECS),1)))+40
Endfunction
Function DRAWSCREEN(CURSCR)
Paste Image CURSCR+1,0,0
BLANKPMG()
If CURSCR= 0
Sprite 16,188,316,35
Else
If CURSCR = 5
Sprite 16,304,224,109
Else
If CURSCR= 13
Sprite 16,304,184,37
Else
If WAYOUT(CURSCR,4) > 0
Sprite 16,220,252,36
Else
If CURSCR = 1
If INTACT Then Sprite 10,288,284,99
Endif
Endif
Endif
Endif
Endif
Endfunction
Function GETOFFBUTT(HPOS,VPOS,BASIM)
GOB_:
If BASIM < 57
Sprite 1,HPOS,VPOS,Rnd(1)+BASIM
Else
Sprite 1,HPOS,VPOS,BASIM
Endif
Sync
If Scancode() <> 0 Then Goto GOB_
Endfunction
Function INSCAN()
Ink Rgb(16,16,16),0
Box 0,52,31,53
Ink Rgb(196,48,48),0
Box 32,52,639,53
Sync
Endfunction
Function MAKEROOM(BKH,SQH)
Ink BKH,0
Box 0,0,639,419
Sync
Ink SQH,0
Box 0,0,639,91
Box 48,156,288,284
Box 352,156,592,284
INSCAN()
Endfunction
Function STOPSOUNDS()
For IND= 1 To 12
Stop Sound IND
Next IND
Endfunction
I can't disassemble the 6502 machine code to figure out the original AI, as I do not have good knowledge of the details of special processors used in the Atari 2600.
The best that I can do is analyze based on observation and make a good guess.
I will start the game objects off the same way, in the same places as the original, but my AI will be different, unless I can figure out every detail of the algorithms.
One thing for sure, with only 4,096 bytes total to work with,
the AI can't be too complex.
The genius of those ATARI programmers just makes it feel that way.
I won't bother recreating the original program player/missile (sprite) flicker, or its attract mode color changes, or the 2 major bugs that I've found so far.
Otherwise I intend to make the gamelook and gameplay faithful to the original.
Except I was compelled to change a few of the original sprite colors.
I'm unique, just like everybody else.