build 135

This commit is contained in:
2022-04-17 16:17:11 -04:00
parent 811db1127c
commit a3fd31be2d
10 changed files with 161 additions and 75 deletions
+16 -18
View File
@@ -26,26 +26,26 @@ Game source code is split into 5+3 parts:
- weapons.asm - general arsenal of tankies
We were trying to use as much macros and pseudo-ops as possible.
They are defined in atari.hea and macro.hea files together with many
atari constants. This way it should be relatively easy to
port this code to e.g. C64
They are defined in atari.hea and macro.hea files together with many atari constants. This way it should be relatively easy to port this code to e.g. C64
After those N years of working on this piece of code
we are sure it would be much wiser to write it in C, Action!
or MadPascal but on the other hand it is so much fun to type 150 chars
where all you want to have y=ax+b :)
After those N years of working on this piece of code we are sure it would be much wiser to write it in C, Action! or MadPascal but on the other hand it is so much fun to type 150 chars where all you want to have y=ax+b :)
Originally most variables were in Polish, comments were sparse
but we wanted to release this piece of code to public
and due to being always short of time/energy (to finish the game)
we decided it must go in 'English' to let other people work on it.
It never happened, but we got some encouraging comments and we are still
trying to do something from time to time.
Originally most variables were in Polish, comments were sparse, but we wanted to release this piece of code to public.
Because of being always short of time/energy (to finish the game) we decided it must go in 'English' to let other people work on it.
It never happened, but we got some encouraging comments and we are still trying to do something from time to time.
With the advent of fujinet (https://fujinet.online/) we are thinking about making the game interplanetary, err, with multiplayer over the net. We'll see.
## Changes:
###### Build 135
2022-04-17
Happy Easter! This is a "premature ejacu.." err... "premature optimization" build. I got into an optimization fewer and got the code messed up, having to revert to the base. One important ticket closed:
- https://github.com/pkali/scorch_src/issues/35 Two morons shooting each other for more than 5 minutes. Added a new option "Seppuku". It causes one of the tanks ashamed with their inefficiency to detonate the weapon on itself. This was quite a difficult addition, requiring me to understand large swaths of the code, always a great challenge. Smoother gameplay with AIs guaranteed or money back.
Other small fixes:
- https://github.com/pkali/scorch_src/issues/23 High flying MIRV leaves traces. Not anymore.
- https://github.com/pkali/scorch_src/issues/12 Make soil fall down faster after soil eating weapons. Soil eating range is OK, it is the soil down routine that is slow (but visually attractive).
###### Build 134
2022-04-10
- https://github.com/pkali/scorch_src/issues/34 - plot pointer visible only when missile is out of the screen
@@ -53,6 +53,7 @@ With the advent of fujinet (https://fujinet.online/) we are thinking about makin
- https://github.com/pkali/scorch_src/issues/32 - Basic is turned off right on the beginning of loading. Dracon reported problems with running the game in Altirra, this was the best idea I had about it. Maybe next will be removing from zero page LZSS routine by @dmsc
- https://github.com/pkali/scorch_src/issues/31 - STA WSYNC removed from missile flight delay
- https://github.com/pkali/scorch_src/issues/30 - player level remembered between rounds, thx @KrzysRog
- https://github.com/pkali/scorch_src/issues/5 - funkybomb smoke stays on the edges of the screen
###### Build 133
2022-04-03
@@ -106,12 +107,10 @@ With the advent of fujinet (https://fujinet.online/) we are thinking about makin
- fixed bug 015 (Only first shoot of FunkyBomb is correct
- fixed bug 016 (No falling soil after leapfrog)
##### Build 125
2022-01-23
- included splash screen by KAZ
##### Build 124
2013-12-21
- removed large chunk of redundant 4x4 print code and table generation code,
@@ -162,7 +161,7 @@ MISSING UPDATE INFORMATION... POSSIBLY NOTHING IMPORTANT HAPPENED HERE.
- fixed bug 001 (lack of explosions on the empty ground)
- fixed bug 003 (wrapping death's head explosions)
- fixed plot (faster explosions)
- fukk, just 6 years and we are back!!! This game is pretty addictive :)
- fokk, just 6 years and we are back!!! This game is pretty addictive :)
TO DO:
- send our wives and kids away much more often :))))
@@ -201,7 +200,6 @@ textproc.s65
SHORTSYS.S65
- new macro PAUSE (waits given number of frames)
##### Build 112
2003-08-15
@@ -238,4 +236,4 @@ variables.s65
grafproc.s65
- shorter delay during Flight
...older history missing...
...transmission error...former history missing...
+1 -1
View File
@@ -45,7 +45,7 @@ THIS IS YOUR BRAIN ON SCORCH.
TAKE THIS!
THIS SCREEN AIN'T BIG ENOUGH FOR THE BOTH OF US.
DIE, ALIEN SWINE!
SAY "ARRGGHHHHH...."
SAY 'ARRGGHHHHH....'
I SHALL OIL MY TURRET WITH YOUR BLOOD.
DIE, TANK-SCUM!
I'M GONNA BREAK YOUR FACE!
+11 -5
View File
@@ -13,7 +13,8 @@ CashOptionH
GravityTable .by 10,20,25,30,40
MaxWindTable .by 5,20,40,60,80
RoundsTable .by 10,20,30,40,50
flyDelayTable .by 255,150,75,35,1
flyDelayTable .by 255,150,75,35,1
seppukuTable .by 255, 45,25,15,9
;------------------------------------------------
LevelNameBeginL ; begins of level names
@@ -30,9 +31,7 @@ TanksWeaponsTableL
TanksWeaponsTableH
.by >TanksWeapon1,>TanksWeapon2,>TanksWeapon3,>TanksWeapon4,>TanksWeapon5,>TanksWeapon6
;-----4x4 texts-----
ResultLineBuffer
dta d" "
.byte $ff
LineTop
dta d"(%%%%%%%%%%%%)"
.byte $ff
@@ -54,6 +53,13 @@ LineHeader2
LineGameOver
dta d"# GAME OVER #"
.byte $ff
seppukuText
dta d"# SEPPUKU! #"
.byte $ff
lineClear
dta d" "
.byte $ff
;-----------
pmtableL ; addressess of the P/M memory for 5 tanks (6th is without P/M background)
@@ -1038,7 +1044,7 @@ joyToKeyTable
.by $ff,$ff,$ff,$ff,$ff,$ff,$ff,$07,$ff,$ff,$ff,$06,$ff,$0f,$0e,$ff
;-----------------------------------
keycodes ;tables for calculating KeyCode to Screen Code (38 -1 characters)
keycodes ;tables for converting KeyCode to Screen Code (38 -1 characters)
.by $3f,$15,$12,$3a,$2a,$38,$3d,$39
.by $0d,$01,$05,$00,$25,$23,$08,$0a
.by $2f,$28,$3e,$2d,$0b,$10,$2e,$16
+10 -9
View File
@@ -30,7 +30,7 @@ OptionsDL
.byte $42
.word OptionsScreen
.byte $30,$02,$02,$70
:maxOptions .by $02,0
:maxOptions .by $02,$10
.byte $41
.word OptionsDL
;------------------------
@@ -60,24 +60,25 @@ dl ; MAIN game display list
.by $0f
.by $4f
.wo display+$0ff0
:97 .byte $0f
:100 .byte $0f ;97
.byte $41
.word dl
;-----------------------------------------------
;Screen displays go first to avoid crossing 4kb barrier
;-----------------------------------------------
OptionsScreen
dta d"Welcome to Scorch ver. 134 (un)2000-2022"
dta d"Welcome to Scorch ver. 135 (un)2000-2022"
dta d" Please select option with cursor keys "
dta d" and press (Return) to proceed "
OptionsHere
; 0123456789012345678901234567890123456789
dta d"Players : 2 3 4 5 6 "
dta d"Cash : none 2K 5K 8K 10K "
dta d"Gravity : 0.2G 0.5G 1G 2G 4G "
dta d"Wind : 1B 3B 5B 7B 9B "
dta d"Rounds : 10 20 30 40 50 "
dta d"Shells : slug slow norm fast hare "
dta d"Players : 2 3 4 5 6 "
dta d"Cash : none 2K 5K 8K 10K "
dta d"Gravity : 0.2G 0.5G 1G 2G 4G "
dta d"Wind : 1B 3B 5B 7B 9B "
dta d"Rounds : 10 20 30 40 50 "
dta d"Missiles : slug slow norm fast hare "
dta d"Seppuku : nevr rare norm oftn alws "
OptionsScreenEnd
; -------------------------------------------------
NameScreen
+1 -3
View File
@@ -1409,8 +1409,6 @@ PutChar4x4FULL .proc;
;but this time all pixels are being drawn
;(empty and not empty)
;--------------------------------------------------
lda plot4x4color
sta color
; calculating address of the first byte
mva #4 LoopCounter4x4
@@ -1461,7 +1459,7 @@ Loop4x4ContinuedFULL
; here we have on screen one line of the char
inw ydraw
sbw xdraw #4
sbw y4x4 #32
sbw y4x4 #32 ; why? possibly because of width of the 4x4 font
dec:lda LoopCounter4x4
bne nextline4x4FULL
+35 -22
View File
@@ -79,7 +79,7 @@ screenwidth = screenBytes*8 ; Max screenwidth = 512!!!
margin = 48 ;mountain drawing Y variable margin
display = $1010 ;screen takes $2K due to clearing routine
MaxPlayers = 6
maxOptions = 6 ;number of all options
maxOptions = 7 ;number of all options
PMOffset = $23 ; P/M to graphics offset
icl 'lib/atari.hea'
@@ -247,7 +247,7 @@ Round .proc ;
; the default shooting angle to 45 degrees
; of course gains an looses are zeroed
jsr DisplayingSymbols
jsr StatusDisplay
lda #0
tax
@
@@ -310,7 +310,7 @@ MainRoundLoop
; here we must check if by a chance there is only one
; tank with energy greater than 0 left
ldy #0 ; number of tanks with energy greater than zero
ldy #0 ; in Y - number of tanks with energy greater than zero
ldx NumberOfPlayers
dex
CheckingIfRoundIsFinished
@@ -337,7 +337,7 @@ WhichTankWonLoop
; somehow I believed program will be never here
; but it was a bad assumption
; god knows when there is such a situation
; (we've got a SITUATION here, it you know what I mean)
; (we've got a SITUATION here, if you know what I mean)
; there are two tanks left.
; one of them is killed by the second tank
; second tank explodes and kills the first one.
@@ -355,8 +355,22 @@ ThisOneWon
rts ; this Round is finished
DoNotFinishTheRound
;ldx TankNr
; Seppuku here
lda noDeathCounter
cmp seppukuVal
bcc @+
mva #0 noDeathCounter
jsr DisplaySeppuku
jmp Seppuku
;ldx TankNr
@
ldx TankSequencePointer
lda TankSequence,x
sta TankNr
@@ -373,10 +387,11 @@ DoNotFinishTheRound
lda SkillTable,x
beq ManualShooting
RoboTanks
; robotanks shoot here
jsr ArtificialIntelligence
jsr MoveBarrelToNewPosition
jsr DisplayingSymbols ;all digital values like force, angle, wind, etc.
jsr StatusDisplay ;all digital values like force, angle, wind, etc.
jsr PutTankNameOnScreen
; let's move the tank's barrel so it points the right
; direction
@@ -388,17 +403,20 @@ ManualShooting
jsr BeforeFire
AfterManualShooting
inc noDeathCounter
jsr DecreaseWeaponBeforeShoot
jsr DisplayingSymbols
jsr StatusDisplay
ldx TankNr
dec Energy,x ; lower energy to eventually let tanks commit suicide
lda ActiveWeapon,x
ShootNow
jsr Shoot
lda HitFlag ;0 if missed
beq missed
Seppuku
lda #0
sta FallDown1
sta FallDown2
@@ -532,13 +550,18 @@ NoPlayerNoDeath
.endp
;---------------------------------
PlayerXdeath .proc
; first we inform that this tank should not explode anymore:
; there is 0 in A, and Tank Number in X, so...
; this tank should not explode anymore:
; there is 0 in A, and Tank Number in X, so...
sta LASTeXistenZ,x
; save x somewhere
stx TankTempY
;clear NoDeathCounter here
sta noDeathCounter
; display defensive text here (well, defensive
; is not the real meaning, it should be pre-death,
; but I am too lazy to change names of variables)
@@ -659,10 +682,7 @@ GetRandomWind .proc
sta Wind
mva #$00 Wind+1
; multiply Wind by 16 and take it as a decimal part (0.Wind)
aslw Wind
aslw Wind
aslw Wind
aslw Wind
:4 aslw Wind
lda random
and #$01
sta WindOrientation
@@ -673,14 +693,7 @@ GetRandomWind .proc
PMoutofScreen .proc
;--------------------------------------------------
lda #$00 ; let all P/M disappear
sta hposp0
sta hposp0+1
sta hposp0+2
sta hposp0+3
sta hposp0+4
sta hposp0+5
sta hposp0+6
sta hposp0+7
:8 sta hposp0+#
rts
.endp
BIN
View File
Binary file not shown.
+72 -7
View File
@@ -108,6 +108,11 @@ OptionsFinished
lda flyDelayTable,y
sta flyDelay
;7th option (Airstrike after how many missess)
ldy OptionsTable+6
lda seppukuTable,y
sta seppukuVal
rts
;--------
; inversing selected option (cursor)
@@ -136,7 +141,7 @@ OptionsSetMainLoop
asl
adc OptionsTable,x ;OptionsTable value * 5
tay
ldx #MaxOptions-1
ldx #6-1 ; width of the highlight bar (6 chars)
OptionSetLoop
lda (temp),y
ora #$80
@@ -170,7 +175,7 @@ OptionSetLoop
;in temp is 40*OptionsY
adw temp #OptionsHere
;now in temp is adres of the line to be inversed
ldy #7 ;8 letters to invers
ldy #8 ;9 letters to invers
OptionsYLoop
lda (temp),y
ora #$80
@@ -1324,6 +1329,64 @@ EndOfTypeLine4x4
rts
.endp
;--------------------------------
.proc DisplaySeppuku
;using 4x4 font
;save vars (messed in TypeLine4x4)
mwa Xdraw xk
mva Ydraw yc
mva #15 fs ; temp, how many times blink the billboard
@
lda fs
and #$01
sta plot4x4color
mva #4 ResultY ; where seppuku text starts Y-wise on the screen
;top frame
mwa #LineTop LineAddress4x4
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
mva ResultY LineYdraw
jsr TypeLine4x4
adb ResultY #4 ;next line
;seppuku
mwa #seppukuText LineAddress4x4
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
mva ResultY LineYdraw
jsr TypeLine4x4
adb ResultY #4 ;next line
;bottom frame
mwa #LineBottom LineAddress4x4
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
mva ResultY LineYdraw
jsr TypeLine4x4
dec fs
bne @-
;clean seppuku
mva #3 fs
mva #4 ResultY
@
mva #1 plot4x4color
mwa #lineClear LineAddress4x4
mwa #((ScreenWidth/2)-(8*4)) LineXdraw ; centering
mva ResultY LineYdraw
jsr TypeLine4x4
adb ResultY #4 ;next line
dec fs
bne @-
;restore vars
mva yc Ydraw
mwa xk Xdraw
rts
.endp
;--------------------------------
.proc DisplayResults ;
;displays results of the round
@@ -1496,9 +1559,14 @@ FinishResultDisplay
.endp
;-------------------------------------------------
.proc DisplayingSymbols
.proc StatusDisplay
;-------------------------------------------------
;lda noDeathCounter
;sta decimal
;mwa #textbuffer+80+37 displayposition
;jsr displaybyte
;---------------------
;displaying symbol of the weapon
;---------------------
@@ -1506,10 +1574,7 @@ FinishResultDisplay
;textbuffer+18 - symbol (1 char)
;textbuffer+20 - quantity left
;textbuffer+23 - name
;ldx TankNr
ldx TankNr
ldy ActiveWeapon,x
lda WeaponSymbols,y
sta TextBuffer+18
+10 -3
View File
@@ -15,17 +15,24 @@ TanksNames ; DO NOT ZERO - ticket #24
:6 dta d" "
;----------------------------
;Options DO NOT ZERO - ticket #27
OptionsTable .by 0,0,2,2,0,1
OptionsTable .by 0,0,2,2,0,1,4
RoundsInTheGame .by 10 ;how many rounds in the current game
seppukuVal .by 75
;--------------------------------------------------
skilltable ; computer controlled players' skills (1-8), 0 - human (no cleaning, ticket #30)
.DS [MaxPlayers]
;-----------------------------------
; 4x4 text buffer
ResultLineBuffer
dta d" "
.byte $ff
variablesStart ; zeroing starts here
;--------------
noDeathCounter .ds 1
;--------------
OptionsY .ds 0 ;vertical position of cursor on Options screen
OptionsY .ds 1 ;vertical position of cursor on Options screen
flyDelay .ds 1
;--------------
NumberOfPlayers .DS 1 ;current number of players (counted from 1)
@@ -307,7 +314,7 @@ mountaintable2 ;table of mountains (size=screenwidth)
.DS 1 ; additional byte for fallout (sometimes 1 pixel)
mountaintable3
.ds [screenwidth]
.ds 0 ; additional byte for fallout (sometimes 1 pixel)
.ds 1 ; additional byte for fallout (sometimes 1 pixel)
MountaintableEnd ;good for table clearing
;----------------------------------------------
TextPositionX .DS 2
+5 -7
View File
@@ -864,7 +864,7 @@ ContinueToCheckMaxForce2
lda MaxEnergyTableL,x
sta EnergyTableL,x
@
jsr DisplayingSymbols ;all digital values like force, angle, wind, etc.
jsr StatusDisplay ;all digital values like force, angle, wind, etc.
jsr PutTankNameOnScreen
jsr DrawTankNr
@@ -1130,8 +1130,6 @@ AfterStrongShoot
sbc #0
sta ytraj+2
ldy #100
jsr Flight
mva #1 color
rts
@@ -1697,8 +1695,7 @@ EndOfFlight
sty SmokeTracerFlag
jmp SecondFlight
EndOfFlight2
lda #0 ; nie wiem czemu
sta tracerflag ;
mva #0 tracerflag ; don't know why
rts
.endp
@@ -1746,8 +1743,9 @@ SecondFlight .proc
sta ytraj+2
ldy #100
lda #1 ; I do not know (I mean I think I know ;) )
sta tracerflag ; 10 years later - I do not know!!!
mva #1 tracerflag ; I do not know (I mean I think I know ;) )
; 10 years later - I do not know!!!
; 20 years later - still do not know :]
jmp Flight.RepeatIfSmokeTracer
.endp