I’m releasing the first version of my Bisquixe interpreter and Simple Multimedia Effects extension.
Both can be downloaded here on github:
The interpreter goes in a folder called Templates in your inform directory, while the extension can be installed using the Inform IDE’s ‘install an extension’ button.
A sample game using Inform to model Twine can be found here:
Screenshot:
A sample game that has the appearance of text messages can be found here:
These games were created using Inform 7 code only. No editing of other files is required. If you see it flicker when you load, that’s because it’s executing css during run time. That can be fixed by simply editing the css ahead of time, but I wanted to show what you could do with just Inform.
This is the full code for the fake twine game:
Summary
"FakeTwine" by Mathbrush
Release along with a "Bisquixe" interpreter.
Include Simple Multimedia Effects by Mathbrush.
Include Basic Screen Effects by Emily Short.
Current Room is a room.
When play begins:
css-set-fast ".BufferWindow;background-color;black";
css-set-fast ".BufferWindow;padding;100px 250px 6px 2px";
css-set-fast ".BufferWindow;overflow;auto";
css-set-fast ".GridWindow;background-color;black";
css-set-fast ".BufferLine;font-size;16px";
css-set-fast ".BufferLine;color;white";
css-set-fast ".Input;display;none";
css-set-fast ".coverimage;display;none";
css-set-fast ".interpretercredit;display;none";
css-set-fast ".links;display;none";
css-set-fast ".play;background-color;black";
css-set-fast ".BufferLine;font-family;Verdana, sans serif";
now the command prompt is "";
Report looking for the first time:
[If we used when play begins, the first passage would be lower down.]
clear the screen;
say "Call me Ishmael. Some years ago—never mind how long precisely—having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the [passage world]."
To say passage (nextPassage - a passage):
hyperlink "[nextPassage]" as "zzxvm [nextPassage]"
Passaging is an action applying to one thing. Understand "zzxvm [any passage]" as passaging.
A passage is a kind of thing.
Carry out passaging:
if the noun is a passage listed in the Table of All Passages:
clear the screen;
say "[reply entry]";
Some passages are defined by the table of all passages.
A passage has some text called the reply.
When play begins:
now every passage is held by the player;
Table of All Passages
passage reply
world "'All the world's a [passage stage], and all the men and women are merely [passage players].'"
players "Don't hate the players, hate the game. -[passage Moby Dick]"
stage "At this stage, we're pretty similar to Twine. -[passage Moby Dick]"
moby dick "Call me Ishmael. Some years ago—never mind how long precisely—having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the [passage world]."
Rule for printing the banner text:
do nothing;
The room description heading rule does nothing.
Rule for constructing the status line:
do nothing;
This is the full code for the text message game (with styling borrowed from @malacostraca’s Closure):
Summary
"TextMessaging" by Mathbrush
Release along with a "Bisquixe" interpreter.
Release along with a "Bisquixe" website.
Include Simple Multimedia Effects by Mathbrush.
Current Room is a room.
The room description heading rule does nothing.
Rule for constructing the status line:
do nothing;
When play begins:
css-set-fast ".BufferWindow;padding;100px 250px 6px 2px";
css-set-fast ".GridWindow;background-color;white";
css-set-fast ".coverimage;display;none";
css-set-fast ".interpretercredit;display;none";
css-set-fast ".links;display;none";
css-set-fast ".Style_text;font-family; sans-serif";
css-set-fast ".Style_text;border-radius; 20px 20px 20px 20px";
css-set-fast ".Style_text;margin; 0 15px 10px";
css-set-fast ".Style_text;padding; 15px 20px";
css-set-fast ".Style_text;position; relative";
css-set-fast ".Style_text;display; block";
css-set-fast ".Style_text;width; 400px";
css-set-fast ".Style_text;animation-name; popin";
css-set-fast ".Style_text;animation-duration; 0.2s";
css-set-fast ".Style_text;background-color; #E5E4E9";
css-set-fast ".Style_text;color; #363636";
css-set-fast ".Style_text:before; transform; rotateY(180deg)";
css-set-fast ".Style_text:before; border-color; #E5E4E9";
css-set-fast ".Style_text:before; left; -50px";
css-set-fast ".Style_text:before; border-color; #E5E4E9";
css-set-fast ".Style_text:before; border-radius; 50% 50% 50% 50%";
css-set-fast ".Style_text:before; border-style; solid";
css-set-fast ".Style_text:before; border-width; 0 20px";
css-set-fast ".Style_text:before; bottom; 0";
css-set-fast ".Style_text:before; clip; rect(20px, 35px, 42px, 0px)";
css-set-fast ".Style_text:before; content; ' '";
css-set-fast ".Style_text:before; height; 40px";
css-set-fast ".Style_text:before; position; absolute";
css-set-fast ".Style_text:before;right; -50px";
css-set-fast ".Style_text:before; width; 30px";
[Now for your input]
css-set-fast ".Style_input;font-family; sans-serif";
css-set-fast ".Style_input;border-radius; 20px 20px 20px 20px";
css-set-fast ".Style_input;margin; 0 15px 10px";
css-set-fast ".Style_input;padding; 15px 20px";
css-set-fast ".Style_input;position; relative";
css-set-fast ".Style_input;display; block";
css-set-fast ".Style_input;width; 400px";
css-set-fast ".Style_input;animation-name; popin";
css-set-fast ".Style_input;animation-duration; 0.2s";
css-set-fast ".Style_input;background-color; #2095FE";
css-set-fast ".Style_input;color; #363636";
css-set-fast ".Style_input:before; transform; rotateY(0deg)";
css-set-fast ".Style_input:before; border-color; #2095FE";
css-set-fast ".Style_input:before; left; 420px";
css-set-fast ".Style_input:before; border-color; #2095FE";
css-set-fast ".Style_input:before; border-radius; 50% 50% 50% 50%";
css-set-fast ".Style_input:before; border-style; solid";
css-set-fast ".Style_input:before; border-width; 0 20px";
css-set-fast ".Style_input:before; bottom; 0";
css-set-fast ".Style_input:before; clip; rect(20px, 35px, 42px, 0px)";
css-set-fast ".Style_input:before; content; ' '";
css-set-fast ".Style_input:before; height; 40px";
css-set-fast ".Style_input:before; position; absolute";
css-set-fast ".Style_input:before;right; 420px";
css-set-fast ".Style_input:before; width; 30px";
css-set-fast ".Buffer_input; text-align; right";
now the command prompt is " ";
css-set-fast ".LineInput;border-radius; 20px 20px 20px 20px";
css-set-fast ".LineInput;color; #363636";
css-set-fast ".LineInput;margin; 0 15px 10px";
css-set-fast ".LineInput;padding; 15px 20px";
css-set-fast ".LineInput;position; relative";
css-set-fast ".LineInput;display; block";
css-set-fast ".LineInput;width; 400px";
To say text-style:
set-any-class "text";
Before issuing the response text of a response: say text-style.
Before doing something:
say text-style;
The description of Current Room is "[text-style]You look around.[roman type]"
They work offline, too!
I’d like to add more features in the future. Since many uses of this game omit the quixe link, I’d like to add a Quixe thanks in the default banner text. I haven’t messed around with graphics or sound, since both involve a little bit of editing of the html files themselves, and I’m keeping this simple.
I’d love feedback, and would be interested in improving this.