Submission #6418: ktwo, DrD2k9's C64 Pyjamarama in 10:45.96

Commodore 64
baseline
(Submitted: Pyjamarama (1984)(Mikro-Gen).tap unknown)
BizHawk 2.3.1
38645
59.826089499853765
13367
Unknown
Submitted by DrD2k9 on 6/7/2019 3:53 PM
Submission Comments

Pyjamarama

Wally has bad habit of showing up late to work. If it happens again, he'll be fired. Unfortunately Wally has once again gone to bed without winding his alarm clock.
You play as Wally....well more specifically you are Wally's pajama clad consciousness...and you are trapped within one of Wally's own nightmares. In said nightmare, you are stuck wandering around an over-sized house full of over-sized objects which have suddenly become much more threatening than their normal-sized, real-world counterparts.
Of course, the only way to escape a nightmare is to wake up. Fortunately, within this particular nightmare, there is an over-sized counterpart of Wally himself sleeping soundly on his over-sized bed. There is also a MASSIVE alarm clock next to him...perhaps using this could wake Wally and prevent him from losing his job.
Unfortunately, as with Wally's real alarm clock, this one has also not been wound. To further the problem, the winding key is missing.
It's up to you (Wally's consciousness) to find the missing key, use it to wind the alarm clock, and wake Wally; thus getting Wally to work on time and saving yourself from the nightmare.

Game Basics

  • Movement mechanics
    • Wally can only walk or jump; horizontal speeds are equal.
      • Jumps always occur in an arced motion pattern in the direction Wally is facing when the jump starts. It's not possible to change direction mid jump.
      • When jumping off a ledge, the arced pattern will stop when Wally returns to the y-position from which the jump was initiated. From there on until he hits a floor, Wally will fall directly downward.
  • Snooze Energy
    • This is a glass of milk that is effectively Wally's health bar. When it's empty Wally's consciousness loses a life.
    • Contacting almost any moving object in the game will decrease Wally's milk reserves.
    • The milk level will also decrease based on how many steps Wally takes.
    • Milk in the glass can be partially replenished by walking over food items in the game.
      • These include: The Candy Bar, Drink, Hamburger, Apple, Jar of Jam, and Ice cream.
      • These health drops aren't all always available. There are only two active at any time. Whenever one of them is collected, a new set will appear. This happens in a preset order.
  • Enemies/dangerous objects.
    • For moving enemies, sometimes their position resets each time you enter the room. Other times the enemies retain their positions between visits to their room. When they retain their position it affects any room in which that particular enemy is present. This position retention affects route planning/damage abuse.
      • Enemies which retain position: Bowling Ball on Stairways, Ghosts
      • Enemies which reset position: Roasted Chickens, Flying Hooded things, Darts, Axes, Space Invaders, 3-Ton Weight, Falling Bricks, Falling Books, Zombie Hands
      • Non-mobile enemies: Venus Fly Traps - These are only in one room and are neutralized by the water bucket by the first time we visit the room.
    • Boxing Glove Trap - This pops out of certain doors throughout the run as Wally tries to use the door.
      • The Boxing Glove first appears in the elevator/lift and once triggered it moves to a new room/door.
      • The sequence of rooms in which it appears is a set order and not manipulable.
      • When stunned by the boxing glove, Wally does not take damage from other enemies.
  • Switches: There are two switches in the game.
    • "Help" switch: When activated, this adds a 'Tea' box to the room with the balloon so the key on the upper level can be obtained.
    • "Lift" switch: When activated, provides 4 lift rides. After these 4 rides are exhausted, the switch must be reactivated to allow for more lift rides.
  • Useful objects in the game can be picked up and carried/used in other areas.
    • There are many more objects (with their own uses) than are needed to complete the game.
    • We have attempted to use the minimal necessary sequence of items to beat this game.
    • Unlike many modern adventure games that have unlimited inventory space, only 2 objects can be carried at any one time
      • Walking over an item collects the item and drops one of the items already held. To avoid swapping objects, an undesired object must be jumped over.
      • Items are used/swapped in a 'first-in first-out' pattern.
      • This necessitates multiple situations of backtracking and item swapping.
    • As some of the objects uses are unclear when watching this TAS, the following table describes the purpose of each item we carry/use in the game:
ItemUseNotes
RadioStarting ItemSwapped for Pound Coin
Round KeyStarting ItemSwapped for Empty Water Bucket
Pound CoinExchanged for Penny in the change machine
Water BucketWhen full of water, neutralizes Venus fly trap enemiesFilled in the bathroom at the spigot
PennyExchanged for the Hammer in the BathroomNot sure why Wally is buying a hammer from a bathroom, but hey... it's a dream.
Fuel CanWhen full, allows Wally to ride the rocket to the moonFilled at the fuel pump; must be done twice
HammerUsed to smash the glass to obtain the fire extinguisher
Driver's LicenseExchanged for Ignition Keys
Fire ExtinguisherIf carried there, eliminates fire in chimney
Ignition Keys Exchanged for Crash Helmet
Library TicketExchanged for Library Book
Crash HelmetProtects Wally from Falling Library Books
Library BookExchanged for Scissors
Square KeyAllows entry to billiard room to obtain Laser Gun
Triangle KeyAllows entry to room with the Power Pack (Battery)
Power PackFills/Charges Laser Gun Only seems to do so in the room where it's collected
Laser GunWhen carried/left on the moon, causes the Space invaders to move to the top of the screen out of Wally's Way
Moon CrystalNot used for an in-game purpose in this TASOnly used as an inventory place-holder to make item swapping more convenient
Scissors Cut string on balloon to allow Wally to reach the upper floor of this room
Box KeyUnlocks the box to obtain the magnet
MagnetUnlocks the magnetic lock to obtain the Clock Key
Clock KeyActivates the Alarm Clock to wake Wally from the nightmareThis is the game winning event

  • The following are the uses of some items that aren't necessary for game completion. We include them here as there is always a possibility that someone else may see a way to utilize these and find a faster solution.
ItemUse
Remote ControllerStops the conveyor belt floor
TowelProtects against the boxing glove
Door HandleAllows moving from the lift switch room to the room with the magnet

TAS Notes/Techniques

  • Nearly constant jumping: As the snooze energy/milk decreases based on steps taken, jumping minimizes the "steps" taken; thus delaying how long it takes this step counter to count down.
  • Boxing Glove mechanics: How far the Boxing glove knocks Wally around in the room depends on what direction he is facing. We therefore control our position when triggering the glove:
    • Facing away to be knocked farther into the room if the next action is a need to cross the room
    • Facing the door if the next action is leaving the room.
  • Health Pickups/Damage Abuse: A huge part of routing/TASing this game was determining where the ideal locations to take damage in order to save time.
    • Some enemies can cause massive amounts of damage in a very short time frame.
    • We offset the damage we do take by collecting the food items to regain health. In one instance we actually detour slightly off path to pick up the Hamburger. While this detour takes time, it also adds additional health drops into the remaining path. These additional drops allow us to take more damage through the remaining path. The time lost to the detour more than compensates for time that would otherwise be spent waiting for enemies to move so we wouldn't take damage.
  • Stairways:
    • As any vertical fall occurs straight down, the total vertical fall distance for descending a staircase is equal regardless of which step Wally leaves the staircase (it's possible to walk off the back of stairs).
    • However, each fall from a step and each landing adds a lag frame of no horizontal movement. Therefore each staircase descent has to be planned based on where wally needs to end up.
      • If Wally needs to be to the far right of the room, the fastest method of descent is jumping down the stairs. The reason this is faster than simply walking down them is due to the lag introduced by each fall/landing. As the horizontal distance a jump makes is farther than the width of one step, jumping halves the number of falls/landings necessary to reach the bottom of the staircase thus halving the extra lag frames from falls/landings.
      • If Wally needs to leave the left side of the room, the fastest descent is to walk off the top step then immediately off the back of the next step. This actually lands him on the door handle trigger to move to the next room.
      • In an instance where Wally needs an item under the stairs, the fastest way to reach the item is again to walk off the top step then immediately off the back of the next step. In this room there is no left hand door, so Wally falls all the way to the floor. Then he can move right to the needed item. If Wally were to move farther down the stairs before walking backwards off any other step, additional fall/landing lag would be introduced; thus going backwards off the first step is the least lag.
  • Minor RNG manipulation is done on the falling bricks in the chimney to control their speed.
  • This TAS only collects/utilizes the items necessary to beat the game. Many other items are present and have purposes, but aren't necessary to win. A completion percentage is given when the game ends, so theoretically a 100% run could also be made of this game.

Route discussion

In order to beat the game, it's required to visit the moon twice. On a high level, the game solution can be divided into two parts, consisting of the two moon trips and the necessary events leading up to them. The images below illustrate what needs to be done. When returning from the second moon visit, there is just a short trip to trigger the ending and has therefore been left out.
While the strict requirements for beating the game are straight-forward enough, in particular the item-carry limitation and the way the items are spread out in the house create many different possibilities when looking for the fastest route.

Start => Bedroom area

This section is fairly obvious. The pound coin is found near the starting point. Continuing on to the right, the lift switch is activated and we then warp to the room with the bucket. The bedroom area is then just up the stairs, where the bucket is filled and the coin is exchanged for the penny.

=> 1st floor 1 visit

The options for what to do next are limited. The S key and the driver's license are both on the 1st floor and effectively blocking other sensible options than heading for floor 1. On the way, we collect the hammer, the fuel can and then exchange the hammer for the fire extinguisher. Floor 1 has two branches. The first door leads to the first branch. However, it can not be completed before the second branch. We still fill up the fuel can in here to save a few x-pixels from door transitions. The right door leads to the second branch and the roof and finally inside the chimney, where we get the S key.
Note about the health: It would have been possible to collect the drink for a small detour when filling up the fuel can. This would have cost ~160 frames. However, another health drop, the burger, would then have spawned in the green ghost room. Getting two health drops this close together and this early on in the run didn't prove that useful though since there weren't enough time-saving damage abuse possibilities up to this point.

=> Leave the scissors at the rocket

This part offers a few routing options.
  1. Getting ready for the first moon trip asap by getting the laser gun, then head back to floor 1 for powering it up, recollect the fuel can and finally off to the moon.
  2. Thinking ahead and start completing tasks of part 2. One idea would be to get the library ticket outside the pool room (the room with the laser gun) and from there basically the same as option '1'. The advantage would be that the ticket could be left in the rocket room, making the route after the first return from the moon faster by having it nearby.
  3. Do two steps more than '2' to collect the scissors and leave them in the rocket room, before heading for floor 1.
While '1' is the fastest to complete part 1, '2' saves roughly 300 frames overall by eliminating some detours in part 2. However, '3' turned out to be the fastest by far, saving around 1800 frames over '1'. Most of this comes from being able to walk directly to the balloon room after returning from the moon, which cuts out a pretty significant detour in part 2.

=> 2nd floor 1 visit

With the laser gun and the T key, we're set up for completing the first branch of floor 1. On the way back, the fuel can is recollected and it's time for the first trip to the moon!
Note about the health: A detour of 142 frames were spent on collecting the burger in the green ghost room. This resulted in two more health items to be along the route. While it's slightly faster for a while to avoid this detour and push on, the health situation will soon become critical without the additional drops and result in big time losses later on. There are two reasons for making the health drop detour here instead of during the first floor 1 visit. The first is that the ghost movements favor this option. Some of the detour would have been replaced by waiting time. The second reason is that this offers a better spacing between the health drops, allowing for better damage abuse options.

=> 1st moon trip

With the full fuel can and the full laser gun in the inventory, we're set to complete the first part of the game by leaving the laser gun on the moon (this scares off the space invader enemies).

=> Getting the magnet

With the scissors strategically placed next to the rocket, it's just a short trip to the balloon room, where the box key is collected. After teleportation out of the balloon room, the only thing that can be done is to get the magnet. The room with the magnet can be reached either by going right and walking through the house or by going left, via a lift ride to floor 3. Time-wise, both routes are very similar, with the former being slightly faster. However, the latter is chosen for two reasons. The first reason is that we need to spend another lift ride or the lift switch won't be possible to flip after getting the magnet. The second is that the fuel can was left in the rocket room before (this was optional, but the alternative would have been a much more costly item swap in the balloon room) and will now be on the way. As a result, going left via the lift ride to floor 3 is both necessary and overall faster.

=> 3rd floor 1 visit

All that's left before returning to the moon is to refill the fuel can. The lift switch also needs to be flipped at this point, which only leaves one route option (teleportation out of the balloon room and getting to the lift through the library).

=> 2nd moon trip

Holding the magnet and a full fuel can means that we're set up for returning to the moon, where the clock key now can be collected.

=> End

Taking the lift to floor 4 and then walk to Wally's bedroom is straight-forward without any alternatives to consider.

Important RAM addresses

AddressStored Information
0013Wally's X Position
0014Wally's Y Position
001CRoom #
51B6Snooze Energy Step Counter (Counts down. When zero, snooze energy is lost)
8160Current room containing the Boxing Glove trap
8A72Lift Rides Remaining
8A7ASnooze Energy (counts up as Wally takes damage)

Memory Map

http://www.luny.co.uk/pyjamarama/maps/all.html This is a memory map for the ZX Spectrum version of this game. Although it is for a different port, it was still beneficial in understanding the mechanics of the game.

slamo: Replaced movie file with a run using the NTSC version.
slamo: Good work on this one. Thank you for explaining your route, it's clear a lot of testing was put into it. I also don't see anything wrong with the optimization.
Feedback was really limited, but mildly positive. The gameplay is basic and somewhat slow, and the reality is that C64 games like this just don't get a lot of love ratings-wise. Accepting to Vault.
Dacicus: Processing...
Last Edited by ktwo on 7/5/2019 11:29 AM
Page History Latest diff List referrers