Giter Site home page Giter Site logo

viola's Introduction

VIOLA 0.8.1

Written by David Fillmore.

Viola is a Z-Machine Interpreter. That is, it interprets programs written for the virtual
machine known as the Z-Machine. There's a brief history of the Z-Machine at the bottom of
this file, for some reason.

The latest code for Viola is available at https://github.com/DFillmore/viola.

FEATURES

* Z-Machine Versions 1-8 support
* Z-Machine Standards Document 1.1 compliance
* Blorb Resource Format 2.0 compliance
* Quetzal Saved Game Format 1.4 compliance
* Support (via Blorb) for sounds and, in Version 6, images.


INSTALLATION

Some brief notes on getting the program up and running.

You will need Python 3 (I use version 3.3.5), which you can get at http://www.python.org, and
pygame (I use version 1.9.2), which you can get at http://www.pygame.org/. I genuinely don't
know if the setup.py file does anything useful.

BRIEF HISTORY OF THE Z-MACHINE FOR SOME REASON

The Z-Machine was created in the early Eighties by Infocom in order to run 
text adventures.

Infocom evolved the design of the Z-Machine gradually, and created six distinct versions,
each with more capabilites than the previous. Versions 1, 2 and 3 are almost identical,
with slight changes to certain parts of the design that make them incompatible. Most of
Infocom's games were released for version 3. Version 3 was a fairly simple design, but a
seperate upper window was introduced for one game, and support for sound effects (which
was really part of the Version 5 design, but a scaled down version was stuck into Version
3).
Version 4 introduced text styles, better upper window support and a few other features, 
as well as allowing games to be larger. Version 5 allowed even larger games, with several
new features including better sound support. Version 6 allowed for graphics,  up to eight
windows which could be moved and resized, bigger games, and other less obvious features. 

Then Infocom went out of business, more or less.

Several years later, Graham Nelson created Inform, which allowed anyone to create 
Z-Machine games. Two new Versions were created, numbered 7 and 8. These have none of the 
extra features of z6, but instead are identical to the z5 model, except that they both 
allow larger games. z7 was never really used.

Most games created for the Z-Machine since Infocom stopped business are z5 games.

viola's People

Contributors

dfillmore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

mseyne zenpan

viola's Issues

Saving crashes the interpreter

Some old code from back when Viola used wxPython is called to make a file dialog, but this does not make sense to pygame.

Sound interrupt routines circumvent quit

If the interpreter is at the 'press any key to quit' prompt, and a sound is still playing, when the sound finishes it can call the interrupt routine, which will start the game running again.

z6 operation to get pixel colour does not work properly

It should be possible to get the colour of the pixel under the cursor. If this is one of the basic colours that the Z-Machine understand, the colour data for the current window should be set to the value of that basic colour. If it is not a basic colour, a higher value number should be stored, but the interpreter should internally keep track of the real number so that it can be used elsewhere.

Viola does not correctly store the value of the basic colour in the window's colour data. This doesn't seem to affect the appearance of any games.

Viola is slow

Especially when running Inform 7 games, it seems.

All text is buffered

Under various circumstances, text output is not supposed to be buffered, but instead printed immediately to the screen. Viola buffers all text output.

With the speed of modern computers, this is barely, if at all, noticeable.

Freefall.z5 does not work

The blocks do not fall, which indicates that timed input is not actually working correctly. Very likely to affect other games.

Pay attention to @buffer_screen

@buffer_screen allows the game to hint that the interpreter should use a backing store for all screen updates, until the game is finished whatever complicated drawing it's doing. It is legal to ignore the opcode completely, but it might be worthwhile using.

Slight text positioning problem.

In Zork Zero, as soon as the game starts, the location 'Flatheadia' in the status window at the top of the screen slightly overlays the curve on the banner image the text is printed on. Below that, the 'Score' text should have a ':', but this is missing. Probably the same issue.

z6 menus not recognized

Version 6 of the Z-Machine allows the game to add menus to the interpreter's menu bar. This is an optional feature, which Viola does not support primarily because Viola does not currently have a menu bar.

Illegal characters can be input

The interpreter should only allow input for characters the game defines for input. Currently it allows undefined characters to be passed to the game.

z6 tab character

The z6 tab character is supposed to behave differently depending on whether it is printed at the beginning of a line, or in the middle of one. Viola does not do this, instead printing 3 spaces at all times.

Coordinates are wrong

The Z-Machine screen and window positions start from 1,1. Currently, Viola assumes they start from 0,0, because that's how pygame works. Some simple conversion of coordinates is needed.

Pixel colour picking returning incorrect colour

In Zork Zero, in the banner at the top, the background colour for some of the text is a lighter shade than the banner it's printed on.

Leaving this alone for now, because it helps highlight the text positioning bug, and might help fix it.

z6 redraw flag

When the interpreter thinks it has messed up the game display, and wants the game to redraw it, it can set a flag in the header. The main time to do this would be when the interpreter window is resized. Viola does not do this at all.

Strict Z-Machine feature availability

Some Z-Machine features are requested by games using flags in the header, and the interpreter is not expected to provide the feature if the game does not ask for it. An option to turn off any features not explicitly requested might prove mildly useful.

Timed Input breaks the game

Timed input seems to work correctly, but when the game quits, or the window is closed, the interpreter doesn't quit at all, but keeps reading random opcodes.

Input abbreviations support for early games

Later Infocom games and most modern games support abbreviations such as 'x' for 'examine', but some early games do not do this. It should be possible to convert these abbreviations before handing the text over to the game for parsing.

Z-Machine Standard support selection

The ability to select which version of the Z-Machine Standard the game should support, and fail on any later Standard features the way an interpreter that knew nothing about them would, would be helpful in debugging complex games.

Z-Machine feature support options

It should be possible to turn off support for non-basic Z-Machine features like colour or sound, or even italics. This may be useful in testing games for support on interpreters that do not have those features.

[MORE] prompt not erased

The [MORE] prompt is not actually erased when the user presses space, it just generally disappears because text is printed over it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.