dfillmore / viola Goto Github PK
View Code? Open in Web Editor NEWViola is a Z-Machine Interpreter written in Python.
Viola is a Z-Machine Interpreter written in Python.
From the Standard: The routine is permitted to print to the screen even if it returns false to signal "carry on": the interpreter should notice and redraw the input line so far, before input continues.
Viola does not do this.
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.
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.
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.
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.
The [MORE] prompt is not actually erased when the user presses space, it just generally disappears because text is printed over it.
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.
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.
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.
Where there should be newlines, there are none. The text just prints at the bottom of the description box, in one long line, running off the end of the screen.
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.
When trying to restore the file, Frotz crashes with a 'Umem chunk wrong size' error.
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.
Games should be able to print as many Unicode characters as possible
@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.
Some old code from back when Viola used wxPython is called to make a file dialog, but this does not make sense to pygame.
The interpreter should only allow input for characters the game defines for input. Currently it allows undefined characters to be passed to the game.
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.
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.
The blocks do not fall, which indicates that timed input is not actually working correctly. Very likely to affect other games.
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.
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.
When the interpreter is supposed to prompt for a filename for an external file, it ignores this and provides a default name instead.
I think the alphabet table for z1 and z2 is wrong.
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.
Especially when running Inform 7 games, it seems.
A command line option should be added to start transcription to a specified file immediately.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.