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

举例分析游戏制作、测试和发布过程

作者:Paul Firth

本文主要探讨游戏制作、测试和发行过程,主要针对新手开发者,但中等水平读者也能够从中发现些许有趣信息。这里我主要着眼于Adobe Flash游戏的制作,但其中的共通技术适合任何平台。

什么是游戏?

维基百科给出的定义是:

“……有组织的体验内容,通常旨在创造乐趣,有时也能够充当教育工具”

在我们看来,游戏应该包含如下3个要素:

* 互动元素

* 挑战

* 目标

显然游戏需要有一定程度的互动性,应包含挑战元素,多数游戏还预先设定需要玩家达成的目标。

PacMan from sodahead.com

PacMan from sodahead.com

例如《吃豆人》,这是款众所周知的游戏:

Pac-man from wildbunny.co.uk

Pac-man from wildbunny.co.uk

《吃豆人》的互动元素在于,玩家能够控制吃豆人,将其上下左右移动。游戏目标是吃掉所有药丸,涉及的挑战是幽灵会追逐吃豆人,能够通过触碰将他杀死。吃豆人同迷宫空间互动的方式也构成挑战的组成要素,迷宫要求玩家预先找到正确路线,抢在幽灵前面。

吃豆人还融入巧妙转折元素,在我看来,这是游戏沉浸性的关键;当你吃掉一颗大药丸时,所有幽灵就会变成蓝色,然后匆忙逃走,因为吃豆人可以通过触碰将它们吃掉。此规则的逆转同常规玩法形成鲜明对比;吃掉幽灵会令玩家颇有满足感,此转折有效平衡玩法,呈现公平感觉。

Pac-Man about to eat a ghost from wildbunny.co.uk

Pac-Man about to eat a ghost from wildbunny.co.uk

《吃豆人》不仅让我们清楚何谓游戏,而且还弄清究竟什么是优质作品:公平性,吃掉幽灵的满足感,清除所有药丸的成就感。

此清除和满足感机制最近在《Katamari Damacy》中得到体现,这款游戏非常有趣。

游戏组成要素

在把握如何制作游戏前,我们需把握构成游戏的基本要素。

* 游戏规则

* 图像

* 声音

游戏规则

游戏最重要的元素是规则。规则定义游戏运作方式。下面是《吃豆人》包含的若干高级游戏规则:

* 当吃豆人触到药丸时,他会将其收集起来,然后获得一个积分。

* 吃豆人必须收集关卡中的所有药丸,方能够进入下个关卡。

* 当吃豆人碰到幽灵时,他会丧失一个生命值,除非他吃下一个大药丸,此时幽灵就会被他吃掉。

* 幽灵会追逐吃豆人,除非吃豆人吃下大药丸,若是这种情况,它会尽量远离吃豆人。

* 吃豆人无法穿越墙壁,墙壁会促使吃豆人停下脚步。

诸如此类。

缺少规则,游戏就无法形成游戏;缺少互动元素,游戏内容就无法串联起来,就会只是随机出现的系列图像和声音。

图像

游戏中的第二重要元素是图像。在《吃豆人》中,这些由两类元素构成:

* 精灵

* 区块

精灵由能够移动的元素组成,就像吃豆人和幽灵:

Sprites from wildbunny.co.uk

Sprites from wildbunny.co.uk

区块有余下画面组成,可以将其想像成字形,所有字符都有固定的宽度和高度(8×8像数):

Tiles in Pac-Man from wildbunny.co.uk

Tiles in Pac-Man from wildbunny.co.uk

上图8×8方格是源自《吃豆人》的区块组合,此区块组合包含用于呈现分数的字形。

Reduced tile-set from wildbunny.co.uk

Reduced tile-set from wildbunny.co.uk

上面是《吃豆人》完整区块组合的一块。基于此元素,我就能够重新制作类似于《吃豆人》的关卡:

Level reconstructed from reduced tile-set from wildbunny.co.uk

Level reconstructed from reduced tile-set from wildbunny.co.uk

注意关卡内容只由缩减区块组合中的区块组成。通过创造少量创构建模块(游戏邦注:它们能够像七巧板那样进行组合),我们得以定义生成各种各样的关卡。即便到今天,此缩减和重组过程依然是游戏的根本所在。例如,《杀戮地带》系列(PS2、PSP和PS3)就充分运用此技巧,只是在现今第3版内容中,他们将这些区块称作“构建模块”。

Level from Google's 30th anniversary version from wildbunny.co.uk

Level from Google's 30th anniversary version from wildbunny.co.uk

上述是重新构想的《吃豆人》关卡,其由相同区块组合构成,谷歌特别制作此内容庆祝游戏诞生30周年。

你也许很好奇为什么游戏开发者要这样想方设法缩减原有内容,然后进行重新制作。原因在于存储空间。基于少量构建模块重新制作关卡耗费较少存储空间;在此情况中,《吃豆人》所耗存储空间减少了13倍。

假设各区块定义消耗8字节(8×8字节),《吃豆人》关卡是28×31区块——28×31×8=6944字节,而区块组合则是32×2,32×2×8=512字节,最后6944/512=13.56倍。

声音

游戏的最后一个要素是声音,其重要性低于前两个元素,但依然不可或缺。声音在游戏中通常以音乐和音效形式呈现。

例如,游戏通过汽笛式呼呼声响凸显紧张感觉——只要大药丸被吃掉后,音效就会转而强化玩法转折,让其变成更引人注目。随着玩法的前进及关卡接近尾声,背景汽笛声响的音高就会逐渐强化,创造紧张感——这是非常杰出的声音设计;声音不仅能够辅助玩法,还能够改变玩家对游戏的认知,令游戏呈现更狂乱的感觉,从而突出趣味性。

Waveform from the SID chip (C64) from wildbunny.co.uk

Waveform from the SID chip (C64) from wildbunny.co.uk

在《吃豆人》中,游戏的所有声音都是程序化波形模式。音乐的制作方式和关卡类似;每种乐器都用于生成特定音符,然后这些音符会以一定方式进行组合,从而形成音乐(游戏邦注:每次只有音乐音高会出现变化)。

如今音频样本被用于制作音效,而mp3内容则被用于充当配乐。音效样本只是较小声音元素,通常在发生某事件时播放(游戏邦注:例如,玩家获得补充能量或丧失一个生命值)。

如何制作游戏

现在我们已经把握游戏的组成要素,随之而来的问题是:如何制作自己的游戏?答案取决于各位是否掌握编程知识。无论如何,我们都能够制作出自己的作品,只是方式存在差异。

落实游戏规则

游戏核心元素——规则的落实方式取决于开发者是否掌握编程知识,因为这些规则通常以系列逻辑运算和条件呈现,此内容最适合以编程语言落实。这并不表示,不懂编程,我们就无法制作游戏,只是说其构建方式会存在差异。

目标平台的选择

在真正谈论如何制作游戏前,选择合适的目标平台非常重要。在我看来,此选择背后的主要驱动力是曝光度;若我制作游戏,我定希望会有尽可能多的用户玩这款游戏,给予我反馈信息。获得较高曝光度还能够创造其他机会,例如从中获得营收。

Many choices from wildbunny.co.uk

Many choices from wildbunny.co.uk

基于相同原则,本文中我选择的目标平台是Adobe Flash:有95%的连网电脑都安装此软件,这是相当庞大的数据。Adobe Flash是个相当稳固的成熟平台,提供众多在线知识和支持。最重要的是,它还包含众多门户网站,例如Newgrounds和Kongregate,平台免费展示游戏,将作品推向无数用户。通过其他渠道创造类似曝光度(游戏邦注:即Adobe Flash免费创造的曝光度)的成本很高,即便这是款非常优秀的作品;这是目前HTML5存在的一大局限因素,因为各大门户网站尚未广泛支持此技术。

注意你无需掏钱购买Adobe Flash,然后基于此平台制作游戏,因为该平台已提供不少免费工具。

基本技术原理

此时我们有必要简单谈谈游戏运作的若干基本原理。游戏渲染中最重要的元素是构图。我们可以将构图想像成系列影视画面中的单个图像。以此类推,我们可以将呈现游戏内容的监视器或电视机想像成投影仪和屏幕。游戏负责快速呈现各构图,这样监视器就不会缺少影片——这体现在某些游戏作品中,其中游戏的忙碌画面会出现明显的滞后现象。通常,游戏开发者会极力避免此滞后现象,因为这破坏玩家沉浸性。

由于这需要抽出所有游戏画面,所以游戏通常会和监视器同步,这样游戏就会准确知晓何时需要运行自己的逻辑,呈现构图。

metallic film border roll from wildbunny.co.uk

metallic film border roll from wildbunny.co.uk

监视器通常以60Hz(即每秒60次)的速度更新内容,但游戏速度是30Hz(即或每秒30次),除非这是款需要对玩家输入内容做出快速反应的游戏,例如赛车或战斗游戏。

因此每次呈现构成都要运用游戏逻辑。

玩家输入操作是推动游戏发展的元素;几乎所有游戏逻辑处理的内容都和玩家输入内容相呼应。输入内容可以以鼠标移动或键盘点击形式呈现。通常,游戏主角都是由这些输入内容带动。因为游戏体验的触觉感受直接来自于输入内容,给予这些输入内容“正确”反应非常重要。这需要进行大量试验和调整,但所获结果绝对值得。

碰撞检测是探测物体碰撞的过程。在《吃豆人》中,这体现在阻止吃豆人穿过墙体,同时让幽灵能够在碰到吃豆人的时候抓住他。

AI(人工智能)是操控非玩家角色的元素,就像《吃豆人》中的幽灵。AI不像其名字听起来的那么复杂,只消若干简单规则就足矣,例如:恒速朝玩家靠拢。

摄像镜头与控制屏幕呈现内容的电影镜头相似。此元素必不可少,因为游戏空间通常大于屏幕,若玩家越出屏幕界限,移动摄像头所起的作用就非常突出,这样我们就依然能够看到玩家。其规则也非常简单:只呈现游戏空间中的元素,追随玩家。

把握这些基本原理后,现在开始步入正题。

我不懂编程。

这不是问题。我们将通过StencylWorks工具制作Adobe Flash内容。下载此工具,阅读其网站的相关内容,从中获得灵感,此工具免费。

StencylWorks基于区块组合和游戏角色运作,具有内置关卡编辑器,让你能够通过区块创建自己的关卡,甚至能够设置不涉及编程元素的逻辑规则:

StencylWorks from wildbunny.co.uk

StencylWorks from wildbunny.co.uk

把握StencylWorks的最佳方式是浏览此工具的互动指南,这能够让你掌握丰富基础知识——遵循此简单原则后,屏幕会出现移动的玩家角色,及若干需要避开的敌人。

Drag and drop logic designer from wildbunny.co.uk

Drag and drop logic designer from wildbunny.co.uk

大致掌握制作游戏所需的机制后,现在我们就得开始思考自己想要制作什么类型的游戏,如何让其表现突出。

我懂编程。

太棒了!那么你可以选择StencylWorks,或者你会发现通过编程处理所有逻辑问题更顺手。准备阶段,你会想要下载Adobe Flex Compiler SDK,再来就是Flash Develop或者Visual Studio的Amethyst,这是我所采用的工具。

你需要调整Flash Develop,配合Flex SDK。

Flash Develop from wildbunny.co.uk

Flash Develop from wildbunny.co.uk

注意运用Amethyst的前提是开发者已安装Visual Studio,虽然你可以免费下载shell版visual studio 2010,其中用户可以免费试用Amethyst 60天。

工具的选择取决于你是否熟悉Visual Studio。若你熟悉此工具,我强烈推荐你下载Amethyst,因为这让你能够充分利用所有VS功能(游戏邦注:包括优质调试器)。

Amethyst from wildbunny.co.uk

Amethyst from wildbunny.co.uk

只要你开始着手制作游戏内容,就是时候该学习Flash的运作方式。

现在你已把握游戏基本元素,拥有屏幕上的移动元素,是时候该掌握其他更复杂的内容。

如何决定所要制作的游戏类型?

决策关键是坚持小规模和简单性原则。实际情况是游戏制作是艰辛工作,需要花费很多时间和精力;阻碍你发行游戏的首要因素是内容未完工。这点非常重要。

不妨看看那些成功的小规模作品,例如《Winterbells》或《Totem Destroyer》,从中你可以大致了解自己所应制作的游戏规模。

Winterbells and Totem Destroyer from wildbunny.co.uk

Winterbells and Totem Destroyer from wildbunny.co.uk

在制作出众多完整游戏作品后,,你会发现,完成大型项目变得简单许多,因为你可以借鉴早期作品。

《Winterbells》就是设计紧凑的典范;游戏只包含一个游戏机制,但这足以让游戏变得富有沉浸性。当你开始着手制作游戏时,最好遵循相同模式:只挑选一个游戏机制,然后将其落实到位,确保整款游戏都基于此原则。掌握此窍门后,你就可以开始引入各种机制,将其融合起来构成特定题材的游戏,例如射击或平台游戏。

刚开始,最好不要着眼于基于初期作品创收;相反,应该将它们视作经验投资。

如何构想游戏创意?

挑选几款自己最喜欢的游戏,查看它们所包含的机制,抽取几个你最喜欢的机制,看看自己能否对其进行创造性调整。

想要获得灵感,不妨试着基于Mame体验传统街机游戏;从中我们能够发现许多优质构思。

抵挡住复制既有游戏的诱惑,相反,你应该尽量呈现新鲜内容。原因是,当你复制既有游戏时,你就会开始丧失创造性思维。开发者无论如此都要避免这种情况。借鉴其他游戏的构思没有什么大不了,但你需要保持创造性思维。

制作游戏模型

把握游戏构思后,你就应该试着创建模型,测试内容。若有可能,不妨先在纸上呈现大致想法的模型,然后在尝试制作可玩版本。但记住要保持简单性。

An on-paper prototype from wildbunny.co.uk

An on-paper prototype from wildbunny.co.uk

完成基本纸上模型后,你就要开始着手可玩模型。这应该尽可能保持简单;着眼于游戏核心机制。不要考虑内在屏幕或按键或其他附件,而是应该全心集中在实际玩法上;此时你甚至不需要考虑声音元素,但得确保内容具有挑战性,包含明确目标。

备注:我最近撰正在编写一款简单2D平台游戏,但我发现游戏并不怎么有趣。原因是我没有融入生命或能量概念。融入这些元素后,游戏突然就呈现新面貌;你会死去,重新回到关卡的起点位置,这使得你非常关心自己在关卡中的前进情况,因此游戏变得颇有趣味。

我所存在的问题是,忽略游戏挑战元素。

建模理念是,让你在较短时间内试验游戏核心元素。核心元素富有趣味和粘性非常重要,否则剩余游戏内容就无法获得杰出表现。

只要模型完整且富有趣味,你就可以开始考虑融入剩余游戏内容。我建议你将原型设计暂且搁下,从头着手内容设计和资产。原因是,模型就是旨在方便开发者弃置,不是要让开发者基于此创建完整版游戏。通过重新着手内容,你可以修复自己在建模时遇到的各种小问题,因为我们总是能够在二次应对复杂问题时表现得更好。此技巧为当前各大型游戏公司所采用。

如何制作出优质游戏作品?

这是最困难的部分。把握游戏构思,完成游戏建模,你如何知晓这款游戏是否优秀?只要你已投身游戏制作一段时间,你就很难判断自己所制作的内容是否有趣。原因是在持续接触游戏具体细节的过程中,你很容易就只见树木,不见森林。最好办法就是搁置游戏一晚上,如果你期待着隔天能够玩这款游戏,那么你多半有把握要领。

还有就是让尽量多的玩家体验游戏,了解他们的想法。这些用户最好不要包含家庭成员,因为他们通常会给予正面反馈。

收集他们的反馈,记住一点:每条富有建设性的消极反馈信息都颇具价值。让他们腾出时间告诉你他们不喜欢的游戏部分。

这是很难执行的策略,我们很容易忽略个别反馈信息,因为他们所反馈的问题都很难解决,或者会耗费很长时间。但你必须处理这些问题,否者你所呈现的作品就会不尽人意,此时想要修复问题就太晚。最糟的情况莫过于,游戏发布后的在线评论所反映的问题恰好是被你忽略的反馈信息。

Negative feedback from wildbunny.co.uk

Negative feedback from wildbunny.co.uk

记录常见问题,依照频率进行分类;以此方式处理问题让你能够集中修复游戏存在的主要问题。

若很多用户反馈称游戏缺乏趣味,应立即停止内容制作,着手新游戏构思和模型。这似乎有些浪费,但这是成为优秀游戏设计师的必经之路。其实我们最好能够在初期设计阶段想出众多潜在游戏构思,这样你回过头就还有其他选择。

重新开始不是从头着手游戏设计,因为你可以保留所放弃项目的某些元素, 无论是图像,还是逻辑运算,或是其他元素,这些都是创意过程的组成元素。

漏洞测试

完成游戏制作后,你会希望让尽可能多的人体验游戏,旨在发现所有你所忽略的小漏洞。

bugs from wildbunny.co.uk

bugs from wildbunny.co.uk

无论你觉得自己已进行多么完美的测试,你会发现当你将游戏呈现给他人时,依然会看到先前被忽略的许多糟糕问题。

我这里要给中等/高级程序员的一个建议,那就是安装异常处理程序,其能够覆盖所有未处理的异常情况,然后在屏幕上显示信息,这样玩家就能够看到自己所发现的漏洞,然后向你汇报。记住将消息文本设置成可选项,这样玩家就可以进行复制/粘帖。

更好的情况是,若你的服务器有数据库配置,将此信息直接提交给数据库。

完成这些后,现在你就开始步入测试阶段2,可以注册http://www.flashgamelicense.com,然后提交游戏,让其他开发者评估和测试游戏内容。这表示,只有其他开发者会看到你的游戏,他们会向你提供更多有关游戏漏洞的反馈信息,同时还会发表有关这款游戏的评论。完成这些后,你就要开始收集尽可能多的反馈信息,修复最新漏洞,然后开始着手游戏发行工作。

发布游戏

现在你已准备好向用户呈现你的作品。这很简单,无非就是在大型门户网站创建帐户,然后上传自己的作品。

publishing from wildbunny.co.uk

publishing from wildbunny.co.uk

挑选好自己的目标门户网站后,你就可以将游戏上传至http://flashgamedistribution.com/,此网站会帮你进行病毒式推广。所谓的病毒式推广就是,门户网站所有者看到自己喜欢的游戏,将其植入自己的网站,然后在互联网进行传播。http://flashgamedistribution.com/的主要功能已经广为人知,所以这些人会定期登陆网站,坦白讲,他们也会浏览大型门户网站,所以此传播效应就会自动生成。

上文谈及游戏制作的各个过程。游戏制作远不止我们现在看到的这么简单;但制作游戏的简单机制模型不是难事,所以不妨大胆进行尝试。

这里我提出的最后一点建议是,一定要持之以恒,不要放弃;和做其他事情一样,制作游戏需要毅力。应该循序渐进,将每一点进步都当作一次成功。(本文为游戏邦/gamerboom.com编译,拒绝任何不保留版权的转载,如需转载请联系:游戏邦

How to make games

by Paul Firth

In this article I’m going to be talking about the process behind actually making, testing and publishing a game. It’s aimed at the absolute beginner but there should be something of interest here for the intermediate level reader as well. I’m going to be concentrating on making game with Adobe Flash, but the general techniques are applicable to any platform.

What is a game?

Wikipedia defines a game as:

“…structured playing, usually undertaken for enjoyment and sometimes used as an educational tool”

I would add that a game should generally contain these three components:

* Interactive element

* Challenge

* Goal

Obviously a game must be interactive, there must be some kind of challenge involved (mental or physical) and in most games there is a predefined goal which the player strives to achieve.

For example, take Pac-Man, one of the most recognisable games there is:

In Pac-man, the interactive component is that you control Pac-Man and can move him left/right/up/down. The goal is to eat all the pills and the challenge is that the ghosts chase Pac-Man and will kill him on touch. The way Pac-Man interacts with the maze-like environment also forms part of the challenge because the maze forces the player to choose the correct route ahead of time in the hopes that a ghost will not head him off at the pass, so to speak.

Pac-Man also contains a nice twist which, in my view, is the key to the game’s addictiveness; when you eat a large pill, all the ghosts turn blue and flee as Pac-Man is able to eat them on touch. This reversal of the game rules provides an excellent contrast to the normal game-play; it feels extremely satisfying to eat a ghost and this reversal has the effect of balancing the game-play so it feels fair.

Within Pac-Man there are lessons in not only what a game is, but also what a great game is: that notion of fairness, the satisfaction of eating a ghost, the pleasure of a good job well done once all the pills are cleaned up.

This cleaning and satisfaction mechanic was explored again recently in a game called Katamari Damacy which is excellent fun.

The components of a game

Before we can understand how to make a game, we need to understand what components make up a game at it’s most basic level.

* The rules of the game

* The graphics

* The sound

The rules of the game

Most important of all are the rules of the game. These define how the game functions. Here are some of the high-level rules for Pac-Man:

* When Pac-Man touches a pill, he collects it and earns a point

* Pac-Man must collect all pills in a level in order to
progress to the next level

* When Pac-Man touches a ghost he loses a life, unless Pac-Man has eaten a large pill in which case the ghost gets eaten

* Ghosts pursue Pac-Man unless he has eaten a large pill, in which case they flee from him

* Walls cannot be passed through, and cause Pac-Man to stop

And so on.

Without rules, a game simply ceases to be a game; with no interactive component and nothing to hold the game together it would just be a bunch of graphics and sounds randomly occuring.

The graphics

Second most important in a game are its graphics. In Pac-Man these are composed of two distinct types:

* Sprites

* Tiles

Sprites consist of anything which can move, like Pac-Man himself and the ghosts:

The tiles makes up the rest of the graphics, and can be thought of as being very much like a font (as in a set of typographic characters), as each character is a fixed width and height (in this case 8×8 pixels):

Each little 8×8 square in the above image comes from the tile-set for Pac-Man, indeed you can see that this tile-set actually does contain the font as used by the game to display the score. If you took every unique tile in the above image and put them into a set, that would be all you needed to re-draw the Pac-Man world:

The above represents a sub-set of what the full Pac-Man tile-set actually looks like. Taking it, I was able to reproduce a Pac-Man like level:

Notice that the everything in the level is composed solely of tiles from the reduced tile set? By creating a small set of building blocks which fit together like a jigsaw puzzle, it becomes possible to create an almost infinite variety of different levels. This process of reduction and re-composition is at the core of all games, even today. The Killzone series (PS2, PSP, PS3) for example makes heavy use of this technique, except it’s now in 3d and they call their equivalent of tiles ‘building blocks’.

Above is a re-imagined Pac-Man level composed of the same tile-set which Google made for the 30th anniversary of Pac-Man.

You might ask why game developers go to all this effort to reduce and then recreate what they already had in the first place. The reason is memory. It takes vastly less memory to recompose a level from a small set of building-blocks that it would without doing that; in the case of Pac-Man around 13 times less memory is taken by doing things this way.

Assuming each tile definition takes 8 bytes (8 bits x 8 bits), the Pac-Man level was 28×31 tiles – 28x31x8 = 6944 bytes to represent each tile individually. Compared to a tile-set of 32×2, 32x2x8 = 512 bytes. 6944/512 = 13.56.

Sound

The last major component of a game is sound, less important than the other two, but still vital to a game. Sound comes in the form of music and sound-effects in games.

The in-game sound effects, particularly the siren like whirring noise, heighten the sense of urgency – once a large pill is eaten, the sound effects change to reinforce the game-play reversal which has occurred, making it even more compelling. As the game-play progresses and the level nears completion, the pitch of the siren noise in the background increases incrementally and with it the sense of urgency – this is great sound design; the sounds not only complement the game-play, they actually alter the player’s perception of the game, making it feel much more frantic and thereby heightening the sense of fun.

Back in the days of Pac-Man, all the sounds were programmed waveforms. The music was made up in much the same way as the level is composed from pieces of the tile-set; each particular instrument type would have been programmed for one particular note, and then these notes would have been sequenced to form the music, with just their pitch changing each time.

In modern times audio samples are used for sound effects and mp3s are used for the music. Sound effect samples are just tiny pieces of audio which are triggered to play in game when an event happens, such as when the player collects a power-up or loses a life.

How to make a game

Ok, so now we understand the component parts of a game, the question then becomes: how do we make our own? The answer to this question hinges on whether or not the reader has an understanding of programming. Either way, it’s still possible to create a game, it’s just that the path will be different.

Implementing the rules of a game

The way the most important component of a game, the rules, are implemented depends on whether the creator has any understanding of programming because these rules are often best expressed as a sequence of logical operations and conditions, which is very well suited to being implemented in a programming language. This doesn’t mean that it’s impossible to make a game without understanding programming, it just means the way in which one is constructed will be different.

The choice of target platform

Before we get into the nitty-gritty of how to actually go and make a game, it’s important to consider the choice of the target-platform. For me, the chief driving force behind this choice is one of exposure; if I make a game, I want as many people as possible to actually get a chance to play it and give me feedback about what they liked/didn’t like. Having a high exposure to your game can also present other opportunities like the chance to actually make some money from your creation.

With this in mind, the target platform I’m going to be using in this article is Adobe Flash: it’s installed on over 95% percent (source: riastats) of all computers connected to the internet, which is a massive number. It’s a solid, mature platform with a lot of on-line knowledge and support available. Crucially, it also has a very large number of Portals such as Newgrounds and Kongregate which will take your game and host it for free, exposing it to millions of players. The cost of getting the same amount of exposure that a portal can provide for free, even for the best game would be prohibitive otherwise; this is currently one of the limiting factors for HTML5, as portals have yet to start supporting it in any great numbers.

Note that you don’t actually need to buy Adobe Flash in order to make games for that platform; there are freely available tools that let you build games which target the virtual machine which actually runs the games – in this case it’s the Flash plugin in the browser you’re reading this webpage with.

Technical fundamentals

At this point it’s worth briefly covering some of the fundamentals of how a game works.

The most important thing in the rendering (i.e. drawing the graphics) of a game are frames. Frames can be thought of like the individual images in a roll of cinema film. Keeping the same analogy, the monitor or TV which the game is being displayed on can be thought of as being both the projector and screen. The game is responsible for drawing each frame quick enough that monitor doesn’t run out of film, so to speak – this is evidenced in some games where you get a visible lag occurring in a busy part of the game. In general, game developers strive to avoid this lagging as it breaks the player’s immersion.

Because of this need to draw every frame of the game, games are often synchronised with the monitor so that the game knows exactly when to run its logic and to draw the frame.

Monitors generally update at 60Hz or 60 times per second, but games are mostly 30Hz or 30 times per second, unless its a game which requires very fast response to player input, like a racing or fighting game.

The baulk of the game logic (reactions to player inputs, collision detection etc) is therefore done once per frame.

Player input is what drives a game; nearly everything which the game logic does is in response to player input in one way or another. Input can come in the form of mouse movements or key-presses. Typically, the main character in a game is driven by such inputs. Because the tactile experience of playing a game comes directly through the inputs, its very important that the response to these inputs feel ‘right’. This can take a lot of experimentation and tweaking but the results are always worth it.

Collision Detection is the process of detecting a collision between objects. In Pac-Man this is what stops Pac-Man from being able to pass through the walls and also enables the ghosts to catch Pac-Man when they touch him.

AI or Artificial Intelligence is the thing which drives non player creatures, like the ghosts in Pac-Man. It doesn’t need to be as complex as the name implies, just some simple rules will suffice, such as: move towards the player at a constant speed.

The Camera is much like a movie camera in that it governs what we see on screen. Its needed because often the game world is larger than the screen (although not in the case of Pac-Man) and if they player goes outside the bounds of the screen, it would be useful if the camera moved so we can still see the player. It too has simple rules like: only show things which are within the game world and follow the player.

With these fundamentals covered its time to get stuck in.

I don’t know how to program

Not a problem. The tool we’re going to be using to make games for Adobe Flash is called StencylWorks. Download this and have a read through their website to inspire yourself, it’s free.

It works using a tile-set and actors (similar to Sprites), has a built-in level editor to allow you to place down the tiles to create your own levels and even has a solution in place for laying down the logical rules of the game without programming:

The best way to get familiar with StencylWorks is to run through their interactive tutorial which should give you a nice knowledge base to build on – after following this simple tutorial you will have a player character moving around on screen and some enemies to avoid.

Once you have a basic understanding of the mechanisms requried to create your own game, it’s time to start thinking about what kind of game you want to make, and how to make it good. Skip the I know how to program section to find out.

I know how to program

Ok, great! You can either choose to use StencylWorks as well, or you might find it more familiar to do all the logic with programming. To get set up, you’ll want to download the Adobe Flex Compiler SDK and then either Flash Develop or Amethyst for Visual Studio, which is what I use.

You’ll need to set Flash Develop up to target the Flex SDK.
Note that Amethyst requires you have Visual Studio already, although you can download a shell version of visual studio 2010 for free which you can then install the 60 day trial of Amethyst on top of.

The choice of which to use depends on whether or not you are already familiar with Visual Studio. If you are, I strongly recommend Amethyst because it lets you take advantage of all the features of VS, including the excellent debugger.

Once you’re up and running it’s time to get stuck in with learning how Flash works.

Now that you’ve understood the basics and have stuff moving around on screen, it’s time to start learning some more complex stuff.

How do you decide what type of game to make?

The key to this choice is to keep it really small and simple. The truth of the matter is that games are hard work to produce and take a lot of time and effort; the number one thing which will stop you from releasing a game is simply not finishing it. This cannot be emphasised enough.

Take a look at some successful, yet small games such as Winterbells or Totem Destroyer to get a rough idea of the size of the game you should be thinking about.

Once you start building up a body of completed games you will find it much easier to complete larger projects because you’ll be able to draw on your earlier work to help you.

Winterbells is a good example of compact game design; the game only has one game mechanic but it does it well enough to make the game addictive. When you’re starting out making games it’s a good idea to follow the same pattern: just pick one game mechanic and implement it very well. Well enough that you could make the whole game just about that. Once you get the hang of that, you can then start to introduce multiple mechanics which work together to form a genre game, such as a shoot-em-up or platformer.

When starting out, it’s best to not even consider trying to make money from your first few games; instead, treat them as an investment in experience.

How do you come up with a game idea?

Take some of your favourite games, look over at the game mechanics they contain (i.e. the mechanisms which enable the game-play, an example would be eating a large pill in Pac-Man and being able to chase the ghosts), pick some that you really like and see if you can put a unique twist on them.

An example would be something like this:

To get inspiration spend some time playing old arcade games in Mame; there are an absolute ton of good ideas just waiting to be re-awakened.

Resist the temptation to copy an existing game, you should instead strive to provide something new and fresh. The reason for this is that when you copy an existing game you start to lose that creative mindset which is so important and will tend to keep falling back on doing things exactly how the game you are copying did them. Avoid this at all costs. It’s fine to use concepts from other games, but you must be free creatively.

Make a prototype

Once you’ve got your game idea, you should try to construct a prototype to test it out. If possible it’s a good idea to prototype the rough ideas for a game on paper first before even attempting to make a playable version. Keep it simple, though.

Once you have the basic paper prototype done its time to move on to the playable prototype. This should be as simple as possible; start out with the core mechanic of the game. Don’t worry about things like intro-screens or buttons or other paraphernalia, just concentrate on the actual game-play itself; you probably wont even need sound at this point, but make sure there is a challenge and there is a goal of some kind.

Side note: I was writing a simple 2d platform game for one of my tutorials just recently when I noticed that the game wasn’t really fun. The reason was that I didn’t have any concept of lives or energy (because I hadn’t implemented them yet). Once they were implemented, the game suddenly took on a new angle; the mere fact that you could die and get sent back to the start of the level made you care about the progress you were making through the level, thereby creating that missing element of fun.

My problem was that I’d missed out the Challenge requirement from what makes a game.

The idea of the prototype is that it lets you try out the core of the game in the smallest amount of time. It’s very important that this core element be fun and engaging otherwise it’s highly unlikely that the rest of the game will be any good.

Once the prototype is complete and is fun, you can start to think about how the rest of the game fits around it. It’s recommended to throw the prototype project away and start again from scratch, keeping the design and assets. The reason for this is that the prototype is designed to be thrown together very quickly, which is generally not something you’d want to build a full blown game on top of. By starting again you will be able to fix all the little problems you noticed when building the prototype, since everyone performs a complex task better the second time around. This technique is used by all the major game companies today.

How do you make a good game?

This is the most difficult part of all. You’ve got your game idea, you’ve made a prototype, but how do you know if it’s any good?

Once you’ve been working on a game for a while it does get rather difficult to tell if what you’ve been making is fun. The reason is that being constantly exposed to every minute detail of the game it becomes very difficult to see the wood for the trees. A good way to tell is to leave the game overnight and if you find yourself thinking about wanting to play it the next day, you’re probably on to something.

The next thing to do is to get as many people as possible to play it and let you know what they think. It’s better if the people aren’t family members because you’ll tend to get a rose-tinted spectacles response that way.

Collect all their feedback and try to remember one thing: every single piece of constructive negative feedback is correct. Everyone who takes time out to tell you want they don’t like is right.

This is a very difficult thing to take on board and it’s so, so easy to just start dismissing individual pieces of feedback because they’re inconvenient to fix or would take too long. But you must address these issues because if you don’t you will end up with a poorer game in the end at which point it will be too late to fix them. Believe me there is nothing worse than seeing a negative review online which mentions one of those bits of feedback that you ignored.

Keep a tally of the most common issues and sort them by frequency; addressing problems in this way allows you to concentrate on fixing the main issues with the game.

If you get a lot of feedback that the game isn’t fun, stop work on it right away and come up with a new game idea and a new prototype. It will seem like a waste, but it’s an essential step towards becoming a good game designer. In fact it’s probably best to come up with a number of potential game ideas at the initial design phase so you have some other work to fall back on.

Starting over is never really starting from scratch in game creation because you’ll be able to save some parts of the work you’re discarding, whether that be the graphics, or some logic or whatever, it’s all part of the creative process.

Bug-testing

Once your game is complete, you’ll want to start getting as many people as possible to play it in order to find all the little bugs that you’ve missed.

No matter how well you think you’ve tested it yourself, you can guarantee that the minute you hand it over to someone else they’ll find a bunch of horrible problems that you’ve missed.

A good tip for the intermediate/advanced level programmer is to install an exception handler to catch all unhandled exceptions and display a message on screen (with a call-stack) so the person playing knows they found a bug and should report it to you. Remember to make the message text selectable so the player can copy/paste it.

Even better, if you have a server with a database configured, submit this message directly into the database.

After you’ve done this it’s time to move into testing stage 2, whereby you should sign-up to http://www.flashgamelicense.com as a developer and submit your game for evaluation and testing by other developers only. That means only other developers can see your game and they should be able to provide you with more feedback on any bugs and also give you a review. Once you’ve done this, gotten as much feedback as possible and fixed any last bugs it’s time to think about releasing your game into the wild!

Publishing your game

Congratulations! You’re now ready to show your game to the world! Doing this is usually as simple as creating an account at the major portals and uploading your game.

Looking through that list you might start to get the impression that you’ve got your work cut out for you. However, once you’ve spot picked a few of your favourite portals, you can then upload your game to http://flashgamedistribution.com/ which will do a lot of the work for you via a method called viral distribution. Viral distribution is the process whereby portal owners will see a game they like the look of and take it for use on their own portal, thereby spreading it around the internet. They know that http://flashgamedistribution.com/ has been specially designed to assist in this process so a lot of portal owners go there on a regular basis. To be honest, they also go to the major portals as well, so this process may well just happen automatically.

Good luck!

I’ve covered every stage of game development from concept to implementation through testing and release. Making a game is not an easy process as you’ve probably gathered by now; it’s much easier to make a few simple game mechanic prototypes though, so don’t be put off just yet.

The best advice I can give you is to be persistent and never give up; much like anything in life, making a game requires a huge amount of perseverance especially if you’re just starting out. Take things step by step and treat every bit of progress as a triumph.(Source:wildbunny


上一篇:

下一篇: