Patch:Paddle war

From KeenWiki
Jump to navigation Jump to search

This page covers patches relating to the in-menu minigame Paddle War in Keen Galaxy. Related patches are Patch:Main menu. Paddle War can be accessed at any time from the main menu by selecting its option and can be played as long as the player wishes.


Disable

This patch disables Paddle War entirely; if the menu option is selected nothing happens.

Keen 4

#Disable Paddle War
%patch $1C241 $CB


Matches needed to win

By default the player must lose 21 matches to lose the game. Or they can win 21 matches to win the game. These two criteria are unrelated so it is possible to patch things so that the computer needs to win less matches than the player to triumph if desired.(Or vice versa.)

Keen 4

#Number of matches player must...
%patch $1C480 $15 #Lose to lose game
%patch $1C4D6 $15 #Win to win game

Keen 5

#Number of matches player must...
%patch $1D41E $15 #Lose to lose game
%patch $1D474 $15 #Win to win game

Keen 6

#Number of matches player must...
%patch $1C0F0 $15 #Lose to lose game
%patch $1C146 $15 #Win to win game


Screen Setup

These patches relate to how the screen is set up to play Paddle War. The screen used is the main menu screen with a few additions. There are three things to consider, the sprites used to play, the text displayed and other things of note.


Game background

Paddle War is unusual in that when it is started it redraws the Computerwrist background image onscreen. This can in fact be a different background if desired, but that bitmap will need to be cached in the Main Menu cache.

Paddle War background bitmap

#Paddle War background bitmap -Keen 4
%patch $1C6D2 [$0067W]

#Paddle War background bitmap -Keen 5
%patch $1D670 [$0052W]


Menu bitmap

The Paddle War screen contains a bitmap at the top center of the Computerwrist screen.

Keen 4

#Paddle War menu bitmap
%patch $1C6E2 $0064W #Image
%patch $1C6E6 $0030W #Vertical position
%patch $1C6EA $0082W #Horizontal position

Keen 5

#Paddle War menu bitmap
%patch $1D680 $004FW #Image
%patch $1D684 $0030W #Vertical position
%patch $1D688 $0082W #Horizontal position

Keen 6

#Paddle War menu bitmap
%patch $1C352 $0017W #Image
%patch $1C356 $0030W #Vertical position
%patch $1C35A $0082W #Horizontal position


Don't show bitmap

These patches stop the paddle War menu bitmap from appearing at all.

No Paddle War menu bitmap

#No Paddle War menu bitmap -Keen 4
%patch $1C6E1 $EB $12

#No Paddle War menu bitmap -Keen 5
%patch $1D67F $EB $12

#No Paddle War menu bitmap -Keen 6
%patch $1C351 $EB $12


Sprites

Sprites are cached along with everything else when the Main Menu is loaded. This also caches the 'DEMO' sign for when demos play.

There are three sprites used in Paddle war, each of them is a sprite int he same sense the player of the main game is a sprite, complete with hitbox. The sprites are the player and computer paddle and the b all.

The player and computer paddles do not have to appear at the same place as their hitbox; there are two variables that set where on the screen the sprite appears as opposed to its hitbox. (Currently the location of the hitbox cannot be moved.)

The sprites are drawn over the main menu image and must erase their tracks with a 'background box' Thus if the main menu image is changed, it will be necessary to change the color of the background box. If the sprites are changed in size, it will also be necessary to change the BB's size, a too-small box will leave bits of the sprite trailing behind.

The ball's hitbox is square, changing its width will also change its height. The second values for its color and height+width are used when the ball is erased (When a point is scored.) and should match the first values.

Keen 4

#Paddle War sprites\DEMO cache
%patch $1CC08 [$007CW] #Start
%patch $1CC1D [$0080W] #End

#Ball
%patch $1C620 $007EW #Ball sprite 1
%patch $1C625 $007DW #Ball sprite 2
%patch $1C5FA $0008W #B background color
%patch $1C5FE $0005W #B BG box height AND width
%patch $1C350 $0008W #B background color 2
%patch $1C354 $0005W #B BG box height AND width 2

#Computer paddle
%patch $1C65A $007CW #Computer Paddle sprite
%patch $1C635 $0008W #CP background color
%patch $1C639 $0003W #CP BG box height
%patch $1C63D $0010W #CP BG box width
%patch $1C641 $0042W #CP sprite v location 1
%patch $1C65E $0042W #CP sprite v location 2

#Player Paddle
%patch $1C692 $007CW #Player Paddle sprite
%patch $1C66D $0008W #PP background color
%patch $1C671 $0003W #PP BG box height
%patch $1C675 $0010W #PP BG box width
%patch $1C679 $0087W #CP sprite v location 1
%patch $1C696 $0087W #CP sprite v location 2

Keen 5

#Paddle War sprites\DEMO cache
%patch $1DBA6 [$0066W] #Start
%patch $1DBBB [$6A]    #End

#Ball
%patch $1D5BE $0068W #Ball sprite 1
%patch $1D5C3 $0067W #Ball sprite 2
%patch $1D598 $0008W #B background color
%patch $1D59C $0005W #B BG box height AND width
%patch $1D2EE $0008W #B background color 2
%patch $1D2F2 $0005W #B BG box height AND width 2

#Computer paddle
%patch $1D5F8 $0066W #Computer Paddle sprite
%patch $1D5D3 $0008W #CP background color
%patch $1D5D7 $0003W #CP BG box height
%patch $1D5DB $0010W #CP BG box width
%patch $1D5DF $0042W #CP sprite v location 1
%patch $1D5FC $0042W #CP sprite v location 2

#Player Paddle
%patch $1D630 $0066W #Player Paddle sprite
%patch $1D60B $0008W #PP background color
%patch $1D60F $0003W #PP BG box height
%patch $1D613 $0010W #PP BG box width
%patch $1D617 $0087W #CP sprite v location 1
%patch $1D634 $0087W #CP sprite v location 2


Keen 6

#Paddle War sprites\DEMO cache
%patch $1C878 [$002EW] #Start
%patch $1C88D [$32]    #End

#Ball
%patch $1C290 $0030W #Ball sprite 1
%patch $1C295 $002FW #Ball sprite 2
%patch $1C26A $0008W #B background color
%patch $1C26E $0005W #B BG box height AND width
%patch $1BFC0 $0008W #B background color 2
%patch $1BFC4 $0005W #B BG box height AND width 2

#Computer paddle
%patch $1C2CA $002EW #Computer Paddle sprite
%patch $1C2A5 $0008W #CP background color
%patch $1C2A9 $0003W #CP BG box height
%patch $1C2AD $0010W #CP BG box width
%patch $1C2B1 $0042W #CP sprite v location 1
%patch $1C2CE $0042W #CP sprite v location 2

#Player Paddle
%patch $1C302 $002EW #Player Paddle sprite
%patch $1C2DD $0008W #PP background color
%patch $1C2E1 $0003W #PP BG box height
%patch $1C2E5 $0010W #PP BG box width
%patch $1C2E9 $0087W #CP sprite v location 1
%patch $1C306 $0087W #CP sprite v location 2


Text

There are three types of text relating to Paddle War, the first is the Main Menu's option. The second is the score bar; it contains two entries that keep score of Keen and the computer's score. Each entry is in its own box of specified height, width and color. (Changing the background color will change the text color.) While the boxes' h locations can be changed independently, they are always on the same vertical position.

The third set of text is contained in the winning\losing boxes and is currently mostly unalterable.


Main Menu text

Main Menu text

#Paddle War option text -Keen 4
%patch $3375F "PADDLE WAR" $00

#Paddle War option text -Keen 5
%patch $34222 "PADDLE WAR" $00

#Paddle War option text -Keen 6
%patch $35099 "PADDLE WAR" $00


Score texts

Keen 4

#Score bar vertical position:
%patch $1C1B3 $0034W

#Keen:
%patch $1C1BF $0050W #H location
%patch $1C1C2 $0008W #Background color
%patch $1C1C6 $0006W #Height
%patch $1C1CA $002AW #Width
%patch $1C1DF $4DCEW #Text called from
%patch $33C3E "KEEN:" $00

#Computer
%patch $1C201 $00B6W #H location
%patch $1C204 $0008W #Background color
%patch $1C208 $0006W #Height
%patch $1C20C $0032W #Width
%patch $1C221 $4DD4W #Text called from
%patch $34640 "COMP:" $00

Keen 5

#Score bar vertical position:
%patch $1D151 $0034W

#Keen:
%patch $1D15D $0050W #H location
%patch $1D160 $0008W #Background color
%patch $1D164 $0006W #Height
%patch $1D168 $002AW #Width
%patch $1D17D $42FAW #Text called from
%patch $3463A "KEEN:" $00

#Computer
%patch $1D19F $00B6W #H location
%patch $1D1A2 $0008W #Background color
%patch $1D1A6 $0006W #Height
%patch $1D1AA $0032W #Width
%patch $1D1BF $4300W #Text called from
%patch $34640 "COMP:" $00

Keen 6

#Score bar vertical position:
%patch $1BE23 $0034W

#Keen:
%patch $1BE2F $0050W #H location
%patch $1BE32 $0008W #Background color
%patch $1BE36 $0006W #Height
%patch $1BE3A $002AW #Width
%patch $1BE4F $4848W #Text called from
%patch $35578 "KEEN:" $00

#Computer
%patch $1BE71 $00B6W #H location
%patch $1BE74 $0008W #Background color
%patch $1BE78 $0006W #Height
%patch $1BE7C $0032W #Width
%patch $1BE91 $484EW #Text called from
%patch $3557E "COMP:" $00


Win\lose texts

Two lines of text are displayed when Keen or the computer wins. The line 'Press any key' is used for both. In Keen 4 and 6 this is two different strings that can be independently edited but in Keen 5 it is stored elsewhere as part of a longer string and used by other things as well, so altering it is not advised.

Paddle war text Keen 4

#Losing
%patch $1C48B [$4DDAW]
%patch $1C487 [$4DE4W]
%patch $33C4A "You lost!" $00
%patch $33C54 "Press any Key" $00

#Winning
%patch $1C4E1 [$4DF2W]
%patch $1C4DD [$4DFBW]
%patch $33C62 "You won!" $00
%patch $33C6B "Press any Key" $00

Paddle war text Keen 5

#Losing
%patch $1D429 [$4306W]
%patch $1D425 [$40E4W]
%patch $34646 "You lost!" $00

#Winning
%patch $1D47F [$4310W]
%patch $1D47B [$40E4W]
%patch $34650 "You won!" $00

Paddle war text Keen 6

#Losing
%patch $1C0FB [$4854W]
%patch $1C0F7 [$485EW]
%patch $35584 "You lost!" $00
%patch $3558E "Press any Key" $00

#Winning
%patch $1C151 [$486CW]
%patch $1C14D [$4875W]
%patch $3559C "You won!" $00
%patch $355A5 "Press any Key" $00


Misc

There are three other things of note in the PW screen. The first two are the top and bottom bars that indicate the size of the playing field; if you change the playing sprites (and especially their background squares to be bigger.) then you will likely need to move the bars further apart. Notice that the lines are identical in format to those of the main menu.

Keen 4

#War bottom line
%patch $1C70E [$000AW] #Color
%patch $1C712 [$008FW] #Vertical location
%patch $1C716 [$00E7W] #H start
%patch $1C71A [$004DW] #H end

#War top line
%patch $1C6F6 [$000AW] #Color
%patch $1C6FA [$003CW] #Vertical location
%patch $1C6FE [$00E7W] #H start
%patch $1C702 [$004DW] #H end


Sounds

These are the sounds played during Paddle War. It is an unusually vocal part of Keen. It is possible to remove all sounds.

Keen 4

#Paddle war sounds
%patch $1C430 [$30] #Ball hits sides paddle war beep
%patch $1C465 [$32] #Player lose paddle war beep
%patch $1C4BB [$33] #Computer loses paddle war beep
%patch $1C542 [$31] #Computer hit ball beep
%patch $1C59C [$2F] #Player hit ball beep

#Don't play Paddle war sounds
%patch $1C42F $EB $0A #Ball hits sides paddle war beep
%patch $1C464 $EB $0A #Player lose paddle war beep
%patch $1C4BA $EB $0A #Computer loses paddle war beep
%patch $1C541 $EB $0A #Computer hit ball beep
%patch $1C59B $EB $0A #Player hit ball beep

Keen 5

#Paddle war sounds
%patch $1D3CE [$2F] #Ball hits sides paddle war beep
%patch $1D403 [$31] #Player lose paddle war beep
%patch $1D459 [$32] #Computer loses paddle war beep
%patch $1D4E0 [$30] #Computer hit ball beep
%patch $1D53A [$2E] #Player hit ball beep

#Don't play Paddle war sounds
%patch $1D3CD $EB $0A #Ball hits sides paddle war beep
%patch $1D402 $EB $0A #Player lose paddle war beep
%patch $1D458 $EB $0A #Computer loses paddle war beep
%patch $1D4DF $EB $0A #Computer hit ball beep
%patch $1D539 $EB $0A #Player hit ball beep

Keen 6

#Paddle war sounds
%patch $1C0A0 [$2F] #Ball hits sides paddle war beep
%patch $1C0D5 [$31] #Player lose paddle war beep
%patch $1C12B [$32] #Computer loses paddle war beep
%patch $1C1B2 [$30] #Computer hit ball beep
%patch $1C20C [$2E] #Player hit ball beep

#Don't play Paddle war sounds
%patch $1C09F $EB $0A #Ball hits sides paddle war beep
%patch $1C0D4 $EB $0A #Player lose paddle war beep
%patch $1C12A $EB $0A #Computer loses paddle war beep
%patch $1C1B1 $EB $0A #Computer hit ball beep
%patch $1C20B $EB $0A #Player hit ball beep