Skip to content

Instantly share code, notes, and snippets.

# Draw a map window
global MAPSIZE:number = 5;
global ExitSymbols:list = { "\\" "|" "/" "-" "X" "-" "/" "|" "\\" };
macro draw (direction:number) at (x:number) (y:number) {
var _x = x + (direction % 3);
var _y = y + [floor (direction / 3)];
"RedditExample" by Blecki
The bland enclosure is a room. "You are in a small, bland enclosure. The walls are pure white. There is naught but a small, white door and a dresser (also white). It's as if someone stopped describing the room halfway.."
The dresser is a scenery supporter in the bland enclosure with description "This is really just a sketch of a dresser. Upon closer examination, the lines aren't even straight. It does, however, have a very nice drawer."
The drawer is a closed openable container. The drawer is part of the dresser. The description is "The qualities that an item must have to be considered a drawer, that is, the ability to open, close, and contain small items, are exactly the qualities this drawer has."
The vast expanse is a room. "This infinite expanse is so infinite that you go instantly insane."
The small white door is a locked lockable door with description "This is a rather ordinary, rather white, little door.[if the small white door is locked] It seems to be locked, but there is
Rule perform spawn when actor.TemplateName == "knight" {
Let actor.Properties.Health = 1;
}
Rule abort die { # Prevent the die activity from being interrupted.
If actor.TemplateName == "knight" {
Return rule-fail;
}
Return rule-pass;
{
"player" :
{
"Type" : "AnimatedSprite",
"Height" : 2,
"Width" : 2,
"RenderWidth" : 512,
"Tilt" : 0.3,
"Sprite" : "oscar/Oscar_Knight3a",
"SpriterEntity" : "Knight",
perform temporary_state state
let actor.State = state
wait 10
let actor.State = "idle"
before follow_path
let actor.State = "run"
perform follow_path path
foreach step in [path.QuantizePath 0.25]
//Setup memory and registers
byte[] MEM = new byte[0xFFFF];
byte A, B, C, D, E, H, L = 0;
ushort IP, SP = 0;
byte O = 0;
uint CLOCK = 0;
byte[] PORT = new byte[0xFF];
@Blecki
Blecki / gist:7145711
Created October 24, 2013 21:53
Code-generating code for an IN8 Emulator
<<(nop
(set @globals "instruction-table" (record))
(defun fittab ((arg string) (arg tab-size))
(if (> (strlen string) tab-size)
(substr string 0 tab-size)
(strcat string $(array (- tab-size (strlen string)) (" ")))
)
)
Specification of the IN8 (inate) 8-bit CPU
Registers
{ Named registers implemented by the IN8 CPU.
A, B - Accumulator
C, D, E - Scratch
H, L - Scratch, and memory access
IP - Special 16-bit instruction pointer
SP - Special 16-bit stack pointer
Version 1 of Generated Hyperlinks (for Glulx only) by Anthony Casteel begins here.
"based on Basic Hyperlinks by Emily Short and Inline Hyperlinks by Erik Temple"
Include Glulx Entry Points by Emily Short.
Include Text Capture by Eric Eve.
Section - Glulx Interaction
When play begins:
Version 1 of Generated Hyperlinks (for Glulx only) by Anthony Casteel begins here.
"based on Basic Hyperlinks by Emily Short"
Include Glulx Entry Points by Emily Short.
Section - Glulx Interaction
When play begins:
start looking for hyperlinks.