游戏邦在:
杂志专栏:
gamerboom.com订阅到鲜果订阅到抓虾google reader订阅到有道订阅到QQ邮箱订阅到帮看

阐述以Game Forge系统创造故事与环境的理念

发布时间:2013-08-19 17:58:48 Tags:,,,

作者:Michael Cook

故事和环境哪个更重要?在一些游戏,尤其是RPG中,这两者几乎难分彼此。环境显示的是游戏发生的地点、时间以及情况。而故事则有自身的需求——事件发生的顺序,以及玩家所经历的内容。有没有可能在不打破二者平衡的情况下植入程序生成内容?本文探讨的就是能够理解故事的世界生成器——它可以同时满足设计师和玩家的选择。

由Ken Hartsook、Alexander Zook、Sauvik Das和Mark Riedl所著的《Toward Supporting Stories with Procedurally Generated Game World》这篇论文,该文描述了Game Forge这一概念。Game Forge可以是一个能够围绕现成叙事结构设计一个RPG世界的系统——甚至还会将玩家所追求的玩法考虑入列。它包括如何生成与故事相匹配的世界,以及适用于所有题材游戏开发者都会感兴趣的工具适配性等观点。

characters(from gamesbyangelina)

characters(from gamesbyangelina)

Game Forge开篇列出了一个故事事件的模版——讲述了参与事件的人物、事件发生地点等关键信息。以下就是摘自该文的一个简单例子:

*杀戮(游侠、巫师、墓地)

*掉落(巫师、宝石、墓地)

*获取(游侠、宝石、墓地)

*获得信任(游侠、国王、宝石、皇宫)

为了围绕这一故事生成一个世界,Game Forge需要两个额外信息:设计师指定的地点模型,这有助于创造有相关游戏世界;用于描述玩家在游戏中需求的模型。设计师模型非常有用,因为它可以为“城堡”等地点添加情境。以下是该论文中的一个例子:

environment transition graph(from gamesbyangelina)

environment transition graph(from gamesbyangelina)

这可以引导世界生成器理解如何在宫殿旁生成一个沼泽。玩家模型则可添加玩家希望在不同地点间穿行时的所需时间(游戏邦注:例如,有些玩家可能会喜欢战斗和探索元素,而其他玩家则喜欢体验故事内容)。像故事设置等则取决于设计师的决定——它可以像问卷调查表一样简单,也可以是根本不同用户群体设计多个版本的游戏。例如“Super Roguelike VI:Casual Edition”这种版本可能就没有那么多与敌人战斗的内容,因为你瞄准的是特定的休闲玩家群体。

游戏世界本身之后也可以使用计算进化生成。这里我想点出关于进化过程的两个部分:Game Forge如何呈现其游戏世界,以及它如何评估游戏世界。

对Game Forge来说,游戏世界是使用“岛屿”和“桥梁”的理念来呈现。岛屿是指游戏事件发生的地点,例如我们上文所举的城堡地点。桥梁则是岛屿之间的游戏空间,玩家要在这些空间穿行,其中会发生许多战斗或支线任务。游戏世界是这些用桥梁连结起来的岛屿集合体。我喜欢这种将固定和可变玩法分开的理念——它让游戏世界布局更易于变化,并为其间的额外程序生成提供了更多空间。以下是由软件生成的一些游戏世界图片,从中你可以看到桥梁部分的长度变化,以及路径的分散和变化情况:

bridge sections(from gamesbyangelina)

bridge sections(from gamesbyangelina)

现在用我们之前提到的玩家和设计模型来评估游戏世界设计。设计模型评估的是哪个桥梁和岛屿类型会彼此相依等情况(游戏邦注:打破这些规则的游戏世界得分要低于哪些未打破的游戏世界),而玩家模型评估的则是游戏世界与玩家选择的匹配度——他们喜欢多少探索环节?如果他们喜欢的东西很多,那么拥有许多分析和旅程的路径得分就会更高。通过评估一系列可行的世界设计方案,再根据这二者的总分来推动设计发展,并选择得分最高者来产生新集合。

这个过程中的一个关键是如何从你已经拥有的最高分例子中生成新内容。在Game Forge案例中,我们评估了自己的游戏世界设计集合之后,希望了解如何从这些“母”世界设计中生成新集合。Game Forge可以通过随机交换节点的环境类型,或者通过随机从现成设计中添加和删除节点而复制单个世界设计。或者集合两个世界设计,创造一个新的世界设计。可以通过选择一个世界岛屿和桥梁的子图,并将其联结到其他设计的互补子图来实现这一点。

world design(from gamesbyangelina)

world design(from gamesbyangelina)

当世界设计完成时剩下的任务就不多了。首先,Game Forge实际上使用了一些描述游戏元素分配的模版布置了单个世界区域。例如,城堡区域就使用了颇为合理的分配房屋和城堡的模式,而森林则使用了树木和岩石的布局。

最后,Game Forge需要游戏世界中的故事道具和人物,之后再执行游戏脚本。关键道具和NPC布局需要故事作为引导,将它们置于首次出现在故事中的地点。这些NPC以及偶然角色可能适合出现于特定区域(例如,城堡守卫),它们就会执行与Game Forge一开始生成的每个故事线索相关的游戏脚本。Game Forge能够将脚本分配给合适的NPC,甚至根本不同事件重要装饰游戏场所。当你返回城堡时会经历一个“围攻”事件,它看卢来不同于你踏上旅程离开城堡时的情况。这一切都会植入Game Forge,意味着只需要输入故事所描述的各个事件或脚本序列,而不是更多引导。

game world generated for the story(from gamesbyangelina)

game world generated for the story(from gamesbyangelina)

虽然该文关注的是RPG世界,其呈现的节点等关键地点,以及它们之间的连结等理解却适用于更广的范围,例如第一人称射击游戏中的故事,平台游戏中的谜题屋,甚至还有MMO中的主要遭遇战。“我需要这事发生”和“我需要某物出现在这之间”这二者的平衡会频频出现在特定游戏题材中。当这一情况发生时,让游戏随这些中间事件而变化的理念确实很有吸引力。虽然我并非为这种个性化调整的游戏而着迷,但得承认这种可变理念确实很有趣。

看看当代游戏行为中一些重量级作品,我们通常会发现它们不是具有大量程序生成元素,就是拥有极为顺畅的故事或背景。找到将这些事物结合来的可靠方法也许能够造福许多游戏题材。Game Forge就是这种设计的可行选择。(本文为游戏邦/gamerboom.com编译,拒绝任何不保留版权的转载,如需转载请联系:游戏邦

The Saturday Paper – A World Just For You

Michael Cook

Which is more important – story or setting? In some games, particularly RPGs, it feels almost impossible to separate one from the other. Setting dictates the where, the when and the how of the game. But the story has demands of its own – the order in which things must happen, and what it is the player will be experiencing. Is it possible to include procedural generation in this process without upsetting the balance? This week on The Saturday Paper, a world generator that understands stories – and can adapt to both the designer’s and the player’s preferences.

We’re reading Toward Supporting Stories with Procedurally Generated Game Worlds by Ken Hartsook, Alexander Zook, Sauvik Das and Mark Riedl. The paper describes Game Forge, a system that can be given a narrative structure and will design an RPG world to suit it – even taking into account what kind of gameplay the player is after. It has some interesting ideas about how to generate worlds that suit stories, and the adaptive nature of the tool is something that developers of all genres, from roguelikes to casual games, will be interested in.

Game Forge starts off with a story template expressed as a list of story events – whether it’s human-authored or autogenerated – that states key information like the people involved in the event and where the event takes place. Here’s a simplified example from the paper:

kill(paladin, witch, graveyard)

drop(witch, jewel, graveyard)

take(paladin, jewel, graveyard)

gain-trust(paladin, king, jewel, palace)

In order to start generating a world for this story, Game Forge needs two other bits of information: a designer-specified location model that helps it create worlds that make some kind of sense; and a player model that describes what this player wants from the game. The designer model is useful because it adds context to location names like ‘castle’. Here’s an example from the paper:

This gives the world generator guidance on how likely a swamp is to occur next to a palace (in this case, not likely at all). The player model, which Game Forge could theoretically work without, adds in information like how much time the player wants to spend travelling between locations (some players might enjoy the combat and exploring, while others just want to experience a narrative, for instance). Like the story layout, how this is gained is up to the designer – it could be as simple as a questionnaire the player gets given, or you could make versions of the game for demographics you define yourself. “Super Roguelike VI: Casual Edition” maybe has less enemy encounters because you fed it a particular player model. There’s more information on exactly what kind of metrics they use in the player model in the paper itself.

The worlds themselves are then generated using computational evolution. If you want to know more about evolution as a process, I wrote a little post about it here and put up some simple sample code on GitHub. I want to mention two parts of the evolutionary process here, though: how Game Forge represents its game worlds, and how it evaluates them.

For Game Forge, worlds are represented using the idea of islands and bridges. Islands are places where game events happen, like the Castle location in our example story above. Bridges are the game spaces between islands, which the player travels between and may encounter battles or side quests within. A game world is a collection of these islands with appropriate bridges connecting them. I like this separation of fixed and variable gameplay – it lets the worlds vary in their layout easily, and gives lots of scope for extra procedural generation to happen in the gaps. Here’s a picture of several worlds generated by the software, where you can see the variation in the length of the bridge sections, or how branching and diverse the paths are:

Evaluating a world design uses the player and design models we talked about earlier. The design model evaluates things like which bridge and island types are placed next to each other (worlds that break those rules score lower than worlds that don’t) while the player model scores the world for how well it suits the player preferences – how much exploration do they like? If they like a lot, then paths with lots of branching and travelling get better evaluations. This combined score is used to drive evolution by evaluating a bunch of possible world designs, and selecting the highest-scoring ones to generate a new set.

Crucial to evolution is how to generate new things from the highest-scoring examples you already have. In the case of Game Forge, once we’ve evaluated our set of game world designs, we want to know how to generate a new set from these ‘parent’ world designs. Game Forge can mutate a single world design by randomly swapping the environment type of a node, or by randomly adding and deleting nodes from a given design. Or, given two world designs, it can breed them together to create a new world design. It does this by selecting a subgraph of one world’s islands and bridges, and connecting it to a complementary subgraph from the other design.

Once the world design is complete there are just a few tasks left. First, Game Forge actually lays out the individual world areas using some template layouts that describe the distribution of game elements. A castle area, for instance, uses a guide for distributing houses and castle towers in a pattern that looks sensible, whereas a forest can afford to be more haphazard in the placement of trees and rocks.

Finally, Game Forge needs to place story items and people in the world, and then execute the game’s script. Placement of key items and NPCs uses the story as a guide, placing them wherever they first appear in the narrative. These NPCs, as well as incidental characters that may be appropriate for a given location (castle guards, for instance), will act out the game’s script that is attached to each line of the generated story we gave to Game Forge at the beginning of the process. Game Forge is able to assign the script to appropriate NPCs, and even able to redecorate game locations according to different events. When you return to the Castle that is experiencing a ‘siege’ event, it looks different to how it was when you left to go out on your adventure. All of this is built into Game Forge, meaning it needs no further guidance than to have each event or scripted sequence described in the input story.

Although this paper focuses on RPG worlds, the idea of representing key location as nodes and having links between them is a nice representation for lots of things: story beats in a first-person shooter, big puzzle rooms in a platform game, or even major encounters in an MMO. The balance between “I need this to happen” and “I need something in-between here” is one that crops up a lot in certain game genres. When it happens, the idea of letting your game vary in those in-between bits is really appealing. While I’m not crazy about the idea of personally adapted games, I do like the idea of variable flavour. It reminds me of a previous post where we talked about procedural generators with personality.

When you look at some of the heaviest hitters in the modern games industry, we often see either an abundance of procedural generation or an incredibly slick story and setting (The Last Of Us has been all my friends could talk about lately). Finding dependable ways to tie these things together could be big for a number of genres. Game Forge offers one possible route to doing so.(source:esbyangelina


上一篇:

下一篇: