Patch:Viva
Viva is the system used in Keen 6 to allow the palyer to collect extra lives. There are two collectables that can be acquired; the first is Viva, which are tiles that can be collected, 100 giving the player an extra life, the second collectable is the Queen Viva, both a tile and sprite that can be collected to give an extra life directly.
This page covers patches relating to both collectables in three sections, Viva, Queen Viva tiles and Queen Viva sprites. Viva is an item and its patches relate to item patches. It may also pay to check Patch:Jump conditions and Patch:Game stats to assist in using these patches.
Contents
Viva
These are 16x16 foreground tiles with a specific property allowing the player to get them. When 100 are obtained an extra life is gained. The following patches relate to both getting a single Viva and an extra life.
What the Viva give
This is what is increased when the player obtains a Viva. By default the Viva counter is incremented by 1.
Patch: Keen 6 |
|
What is needed to get 1UP
This is what is required to obtain an extra life. By default this is exactly 100 Viva. The game code is set up so that it is impossible for the player to get more than one Viva at a time, but if this happened the player might not get an extra life and continue obtaining more Viva.
Replacing the $75 with $EB will mean the player never gets an extra life (And can accumulate Viva in perpetuity.) Replacing it with $90 $90 will mean the player gets an extra life with every Viva.
Patch: Keen 6 |
|
Can only get a maximum of x Viva, no 1UP
This patch changes the game so that the player can only get a certain number of Viva. After this their Viva counter does not increase anymore. This effectively puts a 'cap' on Viva. (And renders them useless, unless other patches make use of them.)
Patch: Keen 6 |
|
What is changed when 1UP obtained
Two things are changed when an extra life is obtained, firstly the player's life counter is incremented by 1, and secondly the Viva counter is set to zero, requiring them to obtain another 100 Viva.
Patch: Keen 6 |
|
Sounds played
There are two sounds played, one when the Vivalet is got, the other when an extra life is gained.
Patch: Keen 6 |
|
Patch: Keen 6 |
|
Produce 1UP sprite
When the player obtains an extra life a 1UP sprite is produced to indicate this fact. It moves upwards and has no clipping (So it can move through any tiles without getting stuck.) and moves in an upwards direction appearing in front of all tiles (So even hidden items can be seen when they are obtained.)
Patch: Keen 6 |
|
Queen Viva
These are either 16x16 foreground tiles with a specific property allowing the player to get them or item sprites that gives the player an extra life when the player touches them. As items proper, patches relating to Vitalin are covered on the items page.
1UP and viva got sprites
There are four Viva-related sprites. The first is the 1UP produced when a 1UP item sprite is taken, patches relating to that sprite can be found on the items page. The second is the 1UP produced when a 1UP tile is obtained. These too are treated on the items page. The last two relate to Viva tiles; the first is the 'Viva got' that appears when any Viva is taken while the second is the 1UP produced when the 100th Viva is taken.
Sprite Type
Both the 'Viva got' and 1UP sprites are type 1 or 'misc', not affecting anything in particular.
Patch: Keen 6 |
|
Sprite Actions
Actions relating to these sprites are quite simple. Both are produced in only one situation. The 'Viva got' is produced when Viva tiles are obtained and proceeds to a four action sequence that then vanishes. The 1UP is a variation of the standard 'item got' sprite so altering what it becomes will alter other item got sprites.
Actions: $19E2W #Items got $1A00W #Viva got 1 $1A1EW #Viva got 2 $1A3CW #Viva got 3 $1A5AW #Viva got 4
Patch: Keen 6 |
|
Sprite Behavior
None of these sprite actions have any behavior. Changing the 1UP's behavior will also change the behavior of other 'items got' sprites.
Patch: Keen 6 |
|
Speed and Jump Height
Items do not move by default either in their code or animation motion. The got items action rises and this rising speed is controlled by its animation motion.
Patch: Keen 6 |
|
Sprite Collision
Items, and all actions associated with them, are not meant to interact with other sprites. As such they have no sprite interaction at all.
Patch: item sprite collisions -Keen 6 |
|
Animations
The 'Viva got' and 1UP sprites are cached with in-level Keen when he spawns. The 1UP sprite's specific animation is set when it is created, its action itself has no animation of its own. (If one is given then it will change the animations of all other 'item got' sprites.) The 'Viva got' however has its own animations, a different one for each action.
The animation speeds of the 'Viva got' control how long it appears onscreen before vanishing. That of the 1UP controls how long it moves upwards before vanishing. (Changing it will change all other 'item got' sprites.)
Patch: Keen 6 |
|
Sounds
There are two relevant sounds, one played when a drop is obtained and another when 100 Vitalin are obtained. For patches relating to these sounds see the sounds section near the top of this page.
Clipping and foreground
Both the 'Viva got' and 1UP sprites have a foreground value of 3 so that they will appear in front of all other sprites and tiles. (So the player can see what has happened.) and no clipping. (So they are not pushed about by tiles.) These can be altered without affecting the properties of the usual 'item got' sprites.
Patch: Keen 6 |
|
Sprite-tile interaction
All the sprites use the 'draw sprite' tile interaction; this means they do not specifically interact with tiles. Since they have no clipping by default they will not even be stopped by solid tiles. Altering the 1UPs collision will affect other 'item got' sprites.
Patch: Keen 6 |
|
Action type
The 1UP uses type 1 for its action; this allows it to move smoothly. The 'V' by contrast uses type 0 since they do not have to move or use a behavior.
Patch: Keen 6 |
|
Deprotect and stick to ground
These sprites have no need for either of these variables and so have a value of 0 for both in all of their actions.
Patch: Sprite deprotect, stick -Keen 6 |
|