TwinkingdomValley Commodore 64 game

Gameplay Twin Kingdom Valley is a work of interactive fiction where the player enters commands such as "take jug" at a command prompt and is told the outcome of their move ("I have it now"). Each such command takes up one unit of time, during which other non-player characters will also move and take actions.

It was one of the first text adventure games to have active non-player characters.[1] The characters are interactive, and have their own personalities: some are friendly, and will follow and defend the player, while others are hostile. Witches and kings are complex characters, whereas gorillas and trolls are simpler. Battle sequences have additional features including weapons which can be dropped, broken, thrown or taken away by enemies.

Plot The main character of this game, referred to as "you" by the game engine, is a treasure hunter.[2] The player starts the game at the southern edge of the forest kingdom, with few possessions. An early encounter with the innkeeper of The Sword Inn may persuade the player to rent a small log cabin from him. In the cabin are some very meager supplies, such as a plain jug.

To progress through the game, the player must determine which characters to regard as friends, and which as foes. Some characters, such as a gorilla who attacks the player with a wooden club, are clearly presented as foes, while others are ambiguous.

There are two kingdoms - a forest and a desert - separated by a deep canyon. Each kingdom is ruled by a king, and the kings do not get along with one another. The player is told that the situation has got worse recently, and a royal from the forest kingdom is missing, the crime being attributed to the desert king. With two rich kingdoms at war, it is suggested that the player could take advantage of this and loot treasure from both sides. As the game progresses, the player finds it a challenge to transport spoils back to the log cabin, and is forced at times to choose between carrying a treasure and carrying a weapon, both types of object being at risk of theft if left unguarded.

Development

Concept The game was inspired by the original Adventure by Will Crowther.[3] The original game engine was written in 6502 assembly language. The game was then ported to Z80 for the Spectrum. The newer versions (for Commodore 64 and Spectrum) have an extended game. The game set out to add a level of realism through the addition of images, and complex characters.

The beginnings of the game were more of a peer pressure challenge than a commercial venture. At that time, access to the "massive machines" (by the standards of the day) needed to run the original adventure were limited. The thought was: surely this can be done on a home computer, somehow. The slowness of high level language code (Basic) on home systems ruled that out as a path, and there was no access to a FORTRAN compiler at the time. That's why assembly was chosen. Few people had run the original, and (having graduated) those students who had access to university equipment capable of running the game had lost that privileged access. So the elements recalled (teasingly) resembled the original, with a road, a building (containing useful items, such as keys and a lamp) being repeated. The building is in the forest, with a spring nearby. However, beyond this teaser that it is a kind of clone, the similarity ends. The plan changed to "why copy, when you can do better".

Rather than just modelling a cave, the challenge was to model a larger world, with many above ground, underground, inside and outside locations. Twin Kingdom Valley features 175 rooms.[4]

A somewhat medieval era was chosen for the game, allowing elements of mysticism. All combat was designed as basic hand-to-hand style, with the player and other characters taking turns to trade blows, Turns are always initiated by the player's typing, rather than occurring in real time. If the player attempts to flee from combat, the opponent is permitted one attack before the player moves. The player's behavior is modelled in the same manner as the characters. Like similar games, characters have various limits, such as their maximum health and rate of healing, and the carrying capacity.

Graphics A major section of the software is a custom graphics language, which is an early scalable vector graphics format. Hundreds of images of objects and locations are drawn in the game using this custom tool. Perspective of a limited kind is achieved by permitting images to be drawn scaled down within another image. For example, a castle model would be designed for close up view, but could also be drawn as a subroutine for a distant castle in a desert. The graphics speed was about 10 polygons per second, so the game could not afford to write background polygons and over fill. Images are just created by flood fills, such that each screen pixels is filled only once. A modern PC (using an emulator) can paint these pictures instantly, but the original game owners would need to wait three or four seconds for the screen to paint.

The graphics commands had to be heavily compressed, due to the limited memory space budget. Consider a line drawing call, which does a "draw to" from current position, with a color and new x, y coordinates. If you use 6502 to: load register x with the x coordinate, load register y with the y coordinate, load accumulator with a color, and then call "Draw line," you have used up 9 bytes. If there are a total of 1000 such lines in all game images, then that would be 9K gone. The actual memory used for a draw command in the game is 2 bytes.

To draw and fill an outline, 3 basic commands are needed: Move, Draw, Fill. A move (to start of shape) followed by drawing to each point on the outline, until the shape is closed, then filling within the shape. Draw and fill need a color for the line. All of Move Draw and Fill need a coordinate. To decode this efficiently, just 2 bits are needed to resolve "Move, Draw, Fill, "any other instruction" in an assembly language.[5] An extra bit determines if the command has absolute screen coordinates, or a relative position. 3 bits give a choice of 8 colors, and finally 10 bits give two 5 bit x, y coordinates.

The other commands (not needing coordinates) included: Calling a subroutine, ending a subroutine, drawing a circular arc (center at the last moved coordinate) etc. Complex images, such as a cabin made of many logs, use a loop instruction, similar to for loop in C, with a constant loop limit. The assembly language has no concept of variables, and no branching instructions.

Game engine The game has several micro databases of information, representing the locations, objects which can


Game category: Commodore 64 games

Recently played

Comments