我正在Inform7中进行我的第一次文本冒险,它让我发疯。
我定义三个房间如下:
The house is a region.
The bedroom and the bathroom and the kitchen are in the house.
The bathroom is north of the bedroom.
The kitchen is west of the bedroom.
The bed is a supporter in the bedroom.
Bedroom is a room. It is neuter. "It is pretty cold in here"
因为很多人不熟悉玩这些游戏,所以他们对床和浴室一无所知,因为游戏是从这个开始的:
Bedroom
It is pretty cold in here.
You see a bed.
我不想使用门,所以我需要让玩家看到连接的房间。我应该怎么做?
通常的解决方案是在房间描述中描述出口,就像Foon在评论中提到的那样。这样,您还可以为散文添加一些颜色和变化,而不仅仅是直接列出内容。
一个简单的自动化解决方案是在房间描述之后打印房间出口列表(改编自文档中的示例 102(:
Definition: a direction (called thataway) is viable if the room
thataway from the location is a room.
After looking:
say "You can go [list of viable directions] from here."
一种更精细的方法是安装并包含 Gavin Lambert 的扩展 Exit Lister(位于 IDE 的"扩展"窗格的公共库中(。它负责记住玩家知道哪些房间,所以当游戏开始时,你会看到类似"你可以从这里向北和向西走"的内容,稍后当玩家访问其他房间时,"你可以从这里向北去洗手间,向西去厨房。