Patch:High Scores (Dreams)
This page deals with patches involving the High Scores in Keen Dreams and any messages related to them or acquiring them. Related patches are Patch:Main menu and Patch:Game over. Patches involving Keen's score itself can be found in Patch:Score.
Keen encounters the scores in two different situations; firstly in the 'demo loop' displayed when the game is first started. (Also including the title screen.) and secondly when he experiences a Game Over and can possibly enter a new high score. These two situations are actually two different screens that share code.
- 1 Disable
- 2 Time before table appears in title loop
- 3 Table screen background color
- 4 Table size and setup
- 5 Table column texts
- 6 Table columns
- 7 Score entries
- 8 Entering a new High Score
- 9 Time score table is visible
This patch disables the High Score table. The first line disables the table itself, preventing it appearing at all. The second line only disables entering a new high score or seeing the table at Game Over. Using only the second line allows the High Score table to be used in the title sequence, possibly as a message to players.
|Patch: Disable High Scores|
No High Scores in title sequence
This patch removes the High Score table in the title sequence only. While the player can enter a new high score and see the table at a Game Over they will not see the table when first starting the game and waiting.
|Patch: No High Scores in title sequence|
This patch causes the game to go to the main menu after the high scores are displayed, even if the player doesn't press a key. By default the game continuously 'loops' between high scores and the title screen.
|Patch: Go to main menu after High Score table displays|
Time before table appears in title loop
By default the 'title sequence' loops between the titlescreen and the high score table. The first appearance of the title, when the game first loads, is especially long, while later appearances are shorter.
As such there are two times involved, the first for the special initial appearance and the second for the 'looping appearances'. Note that the first, longer, time is the sum of both times rather than a standalone value.
|Patch: Titlescreen display time|
Table screen background color
The High scores are displayed on a blue background by default. This is done by drawing a blue square 320x200 in size over the previous screen. There are two situations this occurs in, the demo loop and Game Over sequences. The color by default is $01, dark blue.
Making the square smaller will leave parts of the previous screen visible under the High Scores table. Changing the color of the background can also cause small 'flashes' or dark blue to appear sometimes. This is because the 'clear screen' code paints the screen blue after the table is removed. (It also provides the background for the Main Menu.)
|Patch: High Score background color|
Table and 'clear screen' color
As noted above, the 'clear screen' code fills the screen with dark blue. This code is run when the Main Menu is loaded, before the Title Screen is displayed and when the High Scores is cleared from the screen. While it is possible to alter the screen clear color this can make other things look odd.
This patch allows the screen clear color to be temporarily changed and allow the two different high score tables (Game Over and Title Sequence) to have different background colors. In this case the second color is 'dark red', set in the first paragraph of the patch.
The second paragraph sets the initial screen fade color when the game starts. The third makes the screen fade code use whatever color is set and the final paragraph 'resets' the screen fade color whenever the Title Screen is loaded. In this patch the 'default' color is 'dark blue'.
|Patch: High Score background color|
Different table background color on Game Over\Winning game
This patch is a modification of the one above. It alters things so that when the player receives a Game Over the high score table's background is red ($0004W) but when they beat the game it is green ($0002W). This change can apply just to the game ending table or also to the one appearing in the titlescreen cycle.
The patch works by checking Keen's life variable; if it is less than zero (as it will be if he has died and lost the game) then it sets red as the background color. Otherwise (if the player gets a Game Over while still having lives -that is, beating the game) then green is set.
|Patch: High Score background color|
High Scores appear over Titlescreen\levels
This patch prevents the High Scores recoloring the screen so that the High Score table appears over the previous screen. For the title sequence this is the title screen, for the Game over sequence this is the level Keen was in (Including the ending sequence text windows.)
|Patch: High Scores appear over Titlescreen\levels|
Table size and setup
The high score table's size is a simple enough matter, having a height and width in 8x8 blocks.
The window also contains a 'bar' going across the top to separate the scores from the table texts. This bar has a specific vertical location, as well as a tile it consists of. There are also two tiles on the left and right side of the window at the same height as the bar that allow the bar to 'merge' with the window sides. These have their own tiles and vertical positions, but only the left tile's horizontal position can be patched. (The right tile just appears on the right edge of the window.) It is possible to eliminate the bar entirely.
|Patch: High Score window bar|
|Patch: Don't show High Score window bar|
Table column texts
There are three pieces of text used in the Keen Dreams High Score screen. Notice the last line moves the text down three lines. As with most text patches they consist of a 'text call' and a string of text.
Interestingly the 'done' and 'score' texts are positioned horizontally relative to the middle of the table. The values for this position come in two parts. The first, $05 by default, means 'position right' Changing this to $2D will cause the text to be positions left. The second part (Marked in blue) is the actual position, in pixels.
|Patch: High Score table texts|
The High Score table contains three columns, Name, Score and levels Done. The Score column is the centerpiece of the table around which everything else is built. The Name column starts at the window's left edge and has a specific width. The Done column is a certain number of pixels right of the Score column.
The Name and Done columns can be removed if desired.
|Patch: High Score table columns|
By default the score entries are highlighted black, (unless a new name is being entered.) but this can be changed. Although hard to see, a single blank space appears before each entry. This text can be changed to something of any length, but the default space is also used elsewhere in the game.
If a name is blank or the number of levels completed is zero, then that column will contain a '-'. This character too can be changed and it is possible to prevent the 'Done' column from using it (By changing the 'trigger value' to an unreachably large value like $40.)
|Patch: High Score table entries|
Number of score entries
By default 10 score entries are visible on the table.
|Patch: Number of score entries|
Default High Score entries
By default there are ten scores whose data is stored in the executable and extracted if no configuration file can be found. By default each has no name, a 20'000 score and no levels done. Names can be up to twenty characters long. Score entries are actually 64 characters total but for simplicity the game just dumps a chunk of memory into the config file instead of maximizing efficiency.
|Patch: Default High Scores\Names|
Entering a new High Score
When a new high score entry is being named the row will be highlighted in light red. This can be changed; the name and score\done part of the row can even be different colors.
As with all other entries a single blank space appears before the edited name, this text string can be changed.
The length of name that can be entered has two possible limitations. The first is the number of characters it can consist of, which is limited by the game's memory and is relatively straightforward to understand. It will likely not need to be modified as there is essentially no situation where this generous limit will be reached.
The second limit is how wide the letter string is, limited by screen space. It is also a bit odd, it is defined by how many pixels can remain between the end of the entry name and the start of the Scores column. By default the name cannot get any longer if an extra character will move the string closer than 8 pixels from the left edge of the scores column. As such making this value bigger will make the possible name length smaller.
|Patch: Entering a new High Score|
Time score table is visible
These patches control how long the High Scores table is visible before the title screen appears. There are two different situations, Game Over and title sequence, with different times.
|Patch: High Score display time|