用于写交互式小说的 Inform 7 编程语言正式开源

开源
Inform 7 是一种使用自然语言语法创建交互式小说的编程语言,曾多次跻身 TIOBE 指数编程语言前 100 之列。目前,Inform 7 编程语言及其组件已正式宣布在 GitHub 上基于 Artistic License 开源。

Inform 7 是一种使用自然语言语法创建交互式小说的编程语言,曾多次跻身 TIOBE 指数编程语言前 100 之列。目前,Inform 7 编程语言及其组件已正式宣布在 GitHub 上基于 Artistic License 开源。

Inform 本身是一种用于制作交互式小说的编程语言和设计系统,最初由 Graham Nelson 于 1993 年创建。 而 Inform 7 诞生于 2006 年 4 月 , 基于基础的 Inform 作了进一步抽象,使编译器能进一步推断句子的含义。

Inform 7 由三个主要部分组成:专门用于测试交互式小说的开发工具 Inform 7 IDE 、用于编译语言的 Inform 7 编译器,以及构成 Inform 7 核心库的“标准规则”。

Inform 7 被广泛用于文学写作、游戏行业原型制作工具等场景,它使用自然语言,并借鉴语言学和文学编程的思想,而代码语句则采用完整句子的形式,在结构上注重空行和缩进。下面是一段代码示例:

"Hello Deductible" by "I.F. Author"

The story headline is "An Interactive Example".

The Living Room is a room. "A comfortably furnished living room."
The Kitchen is north of the Living Room.
The Front Door is south of the Living Room.
The Front Door is a door. The Front Door is closed and locked.

The insurance salesman is a man in the Living Room. The description is "An insurance salesman in a tacky polyester suit. He seems eager to speak to you." Understand "man" as the insurance salesman.

A briefcase is carried by the insurance salesman. The description is "A slightly worn, black briefcase." Understand "case" as the briefcase.

The insurance paperwork is in the briefcase. The description is "Page after page of small legalese." Understand "papers" or "documents" or "forms" as the paperwork.

Instead of listening to the insurance salesman:
say "The salesman bores you with a discussion of life insurance policies. From his briefcase he pulls some paperwork which he hands to you.";
move the insurance paperwork to the player.

Inform 本身是一个软件,但开源的并不是单个程序,而是程序和资源的集合,目前 Inform 7 的 GitHub 仓库包含大量基础组件、资源文档、代码示例,感兴趣的朋友可以前去了解。

本文转自OSCHINA

本文标题:用于写交互式小说的 Inform 7 编程语言正式开源

本文地址:https://www.oschina.net/news/193544/inform-7-open-source

责任编辑:未丽燕 来源: 开源中国
相关推荐

2020-12-18 08:00:00

Python开发Web

2022-07-14 14:37:05

Linux软件开发工具

2013-12-11 10:41:00

jQuery插件

2011-06-13 18:54:12

2013-09-22 16:22:21

2010-02-24 09:39:25

Python交互式

2018-05-21 14:44:33

LinuxshellPython

2020-04-06 20:47:42

FishShellLinux

2023-05-29 12:13:58

模型AI

2011-12-27 20:12:56

平板

2016-03-08 10:33:20

谷歌VR交互

2012-04-10 08:47:38

iPad

2011-11-10 09:19:24

虚拟化云计算VMware

2016-11-29 12:25:56

Python大数据数据可视化

2023-10-16 16:14:32

数据中心

2024-07-25 08:58:16

GradioPython数据应用

2011-04-28 13:09:46

交互式智能白板投影机

2010-12-09 21:46:26

Scapy

2017-12-11 10:00:00

LinuxshellFish

2023-07-28 14:13:15

Streamlit开源Python库
点赞
收藏

51CTO技术栈公众号