Home
Start a new game
Explore games
Help
Log in or sign up
Log in
Username
Password (
Forgot it?
)
×
New to Playfic?
Full Name
Email
Username
Password
Password (confirm)
Are you sure about this?
Mini Inform (Beta)
by
Nolan
Played 3,102 times
View game source
(spoilers!)
Download the
.z8 file
Source Code
"Mini Inform" Include (- [ KeyPause i; i = VM_KeyChar(); rfalse; ]; [ SPACEPause i; while (i ~= 13 or 31 or 32) { i = VM_KeyChar(); } ]; [ GetKey i; i = VM_KeyChar(); return i; ]; -) To clear the/-- screen: (- VM_ClearScreen(0); -) To clear only the/-- main screen: (- VM_ClearScreen(2); -) To clear only the/-- status line: (- VM_ClearScreen(1); -). To wait for any key: (- KeyPause(); -) To wait for the/-- SPACE key: (- SPACEPause(); -) To decide what number is the chosen letter: (- GetKey() -) To pause the/-- game: say "[paragraph break]Please press SPACE to continue."; wait for the SPACE key; clear the screen. To center (quote - text): (- CenterPrintComplex({quote}); -); To center (quote - text) at the/-- row (depth - a number): (- CenterPrint({quote}, {depth}); -); To stop the/-- game abruptly: (- quit; -) To show the/-- current quotation: (- ClearBoxedText(); -); Include (- #ifndef printed_text; Array printed_text --> 64; #endif; [ CenterPrint str depth i j; font off; i = VM_ScreenWidth(); VM_PrintToBuffer(printed_text, 63, str); j = (i-(printed_text-->0))/2; j = j-1; VM_MoveCursorInStatusLine(depth, j); print (I7_string) str; font on; ]; [ CenterPrintComplex str i j; font off; print "^"; i = VM_ScreenWidth(); VM_PrintToBuffer(printed_text, 63, str); j = (i-(printed_text-->0))/2; spaces j-1; print (I7_string) str; font on; ]; -) To decide what number is screen width: (- VM_ScreenWidth() -); To decide what number is screen height: (- I7ScreenHeight() -); Include (- [ I7ScreenHeight i screen_height; i = 0->32; if (screen_height == 0 or 255) screen_height = 18; screen_height = screen_height - 7; return screen_height; ]; -) To deepen the/-- status line to (depth - a number) rows: (- DeepStatus({depth}); -); To move the/-- cursor to (depth - a number): (- I7VM_MoveCursorInStatusLine({depth}); -) To right align the/-- cursor to (depth - a number): (- RightAlign({depth}); -) Include (- [ DeepStatus depth i screen_width; VM_StatusLineHeight(depth); screen_width = VM_ScreenWidth(); #ifdef TARGET_GLULX; VM_ClearScreen(1); #ifnot; style reverse; for (i=1:i
quit[roman type] BRINGS YOU BACK INTO THE EDITOR.[line break]"; Start room name is an indexed text variable. Start room name is "Untitled Room". Start room description is an indexed text variable. Start room description is "". Understand "CALL STARTING ROOM [text]" as setting the starting room name. Setting the starting room name is an action applying to one topic. Check setting the starting room name (this is the only set the starting room name at programming rule): if at runtime is true: say "That's not a verb I recognise."; now turn count is turn count - 1; stop the action; Carry out setting the starting room name (this is the set the starting room name rule): now start room name is "[the topic understood]"; now the printed name of Runtime Room is "[start room name]"; Report setting the starting room name (this is the report setting the starting room name rule): say "THE STARTING ROOM IS NOW CALLED '[start room name]'."; A thing has some indexed text called the creation name. The creation name of a thing is usually "". Understand the creation name property as describing a thing. Understand "INTRODUCE THING CALLED [text]" or "INTRODUCE A THING CALLED [text]" or "INTRODUCE THE THING CALLED [text]" as introducing a thing. Introducing a thing is an action applying to one topic. Check introducing a thing (this is the only introduce a thing at programming rule): if at runtime is true: say "That's not a verb I recognise."; now turn count is turn count - 1; stop the action; Carry out introducing a thing (this is the introduce a thing rule): let L be a random off-stage non-container non-supporter non-person non-animal thing; if L is a thing: repeat with M running through things: if the creation name of M is the topic understood: say "THERE IS ALREADY SOMETHING OR SOMEONE CALLED '[M]'."; now turn count is turn count - 1; stop the action; now the creation name of L is the topic understood; now the printed name of L is "[the creation name]"; now L is in Runtime Room; say "YOU HAVE INTRODUCED A THING CALLED '[L]' INTO THE STARTING ROOM."; otherwise: say "YOU MAY ONLY INTRODUCE UP TO 5 OF EACH KIND. IF YOU WOULD LIKE TO START OVER, RELOAD THE PAGE."; now turn count is turn count - 1; stop the action; Understand "INTRODUCE CONTAINER CALLED [text]" or "INTRODUCE A CONTAINER CALLED [text]" or "INTRODUCE THE CONTAINER CALLED [text]" as introducing a container. Introducing a container is an action applying to one topic. Check introducing a container (this is the only introduce a container at programming rule): if at runtime is true: say "That's not a verb I recognise."; now turn count is turn count - 1; stop the action; Carry out introducing a container (this is the introduce a container rule): let L be a random off-stage container; if L is a container: repeat with M running through things: if the creation name of M is the topic understood: say "THERE IS ALREADY SOMETHING OR SOMEONE CALLED '[M]'."; now turn count is turn count - 1; stop the action; now the creation name of L is the topic understood; now the printed name of L is "[the creation name]"; now L is in Runtime Room; say "YOU HAVE INTRODUCED A CONTAINER CALLED '[L]' INTO THE STARTING ROOM."; otherwise: say "YOU MAY ONLY INTRODUCE UP TO 5 OF EACH KIND. IF YOU WOULD LIKE TO START OVER, RELOAD THE PAGE."; now turn count is turn count - 1; stop the action; Understand "INTRODUCE SUPPORTER CALLED [text]" or "INTRODUCE A SUPPORTER CALLED [text]" or "INTRODUCE THE SUPPORTER CALLED [text]" as introducing a supporter. Introducing a supporter is an action applying to one topic. Check introducing a supporter (this is the only introduce a supporter at programming rule): if at runtime is true: say "That's not a verb I recognise."; now turn count is turn count - 1; stop the action; Carry out introducing a supporter (this is the introduce a supporter rule): let L be a random off-stage supporter; if L is a supporter: repeat with M running through things: if the creation name of M is the topic understood: say "THERE IS ALREADY SOMETHING OR SOMEONE CALLED '[M]'."; now turn count is turn count - 1; stop the action; now the creation name of L is the topic understood; now the printed name of L is "[the creation name]"; now L is in Runtime Room; say "YOU HAVE INTRODUCED A SUPPORTER CALLED '[L]' INTO THE STARTING ROOM."; otherwise: say "YOU MAY ONLY INTRODUCE UP TO 5 OF EACH KIND. IF YOU WOULD LIKE TO START OVER, RELOAD THE PAGE."; now turn count is turn count - 1; stop the action; Understand "INTRODUCE MAN CALLED [text]" or "INTRODUCE A MAN CALLED [text]" or "INTRODUCE THE MAN CALLED [text]" as introducing a man. Introducing a man is an action applying to one topic. Check introducing a man (this is the only introduce a man at programming rule): if at runtime is true: say "That's not a verb I recognise."; now turn count is turn count - 1; stop the action; Carry out introducing a man (this is the introduce a man rule): let L be a random off-stage man; if L is a man: repeat with M running through things: if the creation name of M is the topic understood: say "THERE IS ALREADY SOMETHING OR SOMEONE CALLED '[M]'."; now turn count is turn count - 1; stop the action; now the creation name of L is the topic understood; now the printed name of L is "[the creation name]"; now L is in Runtime Room; say "YOU HAVE INTRODUCED A MAN CALLED '[L]' INTO THE STARTING ROOM."; otherwise: say "YOU MAY ONLY INTRODUCE UP TO 5 OF EACH KIND. IF YOU WOULD LIKE TO START OVER, RELOAD THE PAGE."; now turn count is turn count - 1; stop the action; Understand "INTRODUCE WOMAN CALLED [text]" or "INTRODUCE A WOMAN CALLED [text]" or "INTRODUCE THE WOMAN CALLED [text]" as introducing a woman. Introducing a woman is an action applying to one topic. Check introducing a woman (this is the only introduce a woman at programming rule): if at runtime is true: say "That's not a verb I recognise."; now turn count is turn count - 1; stop the action; Carry out introducing a woman (this is the introduce a woman rule): let L be a random off-stage woman; if L is a woman: repeat with M running through things: if the creation name of M is the topic understood: say "THERE IS ALREADY SOMETHING OR SOMEONE CALLED '[M]'."; now turn count is turn count - 1; stop the action; now the creation name of L is the topic understood; now the printed name of L is "[the creation name]"; now L is in Runtime Room; say "YOU HAVE INTRODUCED A WOMAN CALLED '[L]' INTO THE STARTING ROOM."; otherwise: say "YOU MAY ONLY INTRODUCE UP TO 5 OF EACH KIND. IF YOU WOULD LIKE TO START OVER, RELOAD THE PAGE."; now turn count is turn count - 1; stop the action; Understand "INTRODUCE ANIMAL CALLED [text]" or "INTRODUCE AN ANIMAL CALLED [text]" or "INTRODUCE THE ANIMAL CALLED [text]" as introducing an animal. Introducing an animal is an action applying to one topic. Check introducing an animal (this is the only introduce an animal at programming rule): if at runtime is true: say "That's not a verb I recognise."; now turn count is turn count - 1; stop the action; Carry out introducing an animal (this is the introduce an animal rule): let L be a random off-stage animal; if L is an animal: repeat with M running through things: if the creation name of M is the topic understood: say "THERE IS ALREADY SOMETHING OR SOMEONE CALLED '[M]'."; now turn count is turn count - 1; stop the action; now the creation name of L is the topic understood; now the printed name of L is "[the creation name]"; now L is in Runtime Room; say "YOU HAVE INTRODUCED AN ANIMAL CALLED '[L]' INTO THE STARTING ROOM."; otherwise: say "YOU MAY ONLY INTRODUCE UP TO 5 OF EACH KIND. IF YOU WOULD LIKE TO START OVER, RELOAD THE PAGE."; now turn count is turn count - 1; stop the action; Understand "PLAY" as playing. Playing is an action applying to nothing. Check playing (this is the only play at programming rule): if at runtime is true: say "That's not a verb I recognise."; now turn count is turn count - 1; stop the action; Carry out playing (this is the play rule): now at runtime is true; now the turn count is 0; now the command prompt is ">"; now the left hand status line is "[location]"; now the right hand status line is "[score]/[turn count]"; now the player is in Runtime Room; First check quitting the game: say "WELCOME BACK TO MINI_INFORM EDITOR."; now at runtime is false; now the command prompt is ":: "; now the left hand status line is ""; now the right hand status line is ""; now at programming startup is true; now the player is in MINI_INFORM; stop the action;