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

举例阐述Unity 3D开发游戏的功能及用法

发布时间:2013-04-16 17:58:57 Tags:,,,,

作者:Ryan Henson Creighton

技术是一种工具。它能帮助我们更快速,更轻松且更高效地创造出惊人的内容。在受蒸汽驱动的捶击机出现前,我们用得是锤子。而在拥有锤子前,我们甚至需要赤手空拳地将钉子敲进木板中。技术是关于让我们的生活变得更美好,更轻松;并拂去痛苦。

Unity 3D的出现

Unity 3D是一种全新的技术,能够带给游戏开发者更大的便利。Unity是一种游戏引擎,或者说是游戏制作工具,能够帮助创造者更好地创造电子游戏。

通过使用Unity,你可以更快速且更轻松地创造电子游戏。在过去,创造游戏总是需要使用大量的打孔卡,一台几乎占据了整个房间的计算机,以及Fortran(公式翻译程式语言)。而今天我们无需再用手掌去钉钉子了,因为我们拥有Unity。这便是你的创造性工具包中的新技术。

Unity占领了世界

我们将把游戏开发梦提炼成一块小小的金砖而不是恢弘磅礴的巨作。即我们想要专注于那些自己能够完成的任务,而非深陷于雄心壮志的作品的泥潭中。当我们完成游戏制作后便能够面向Web,Mac或PC发行了。

Unity 3D背后的团队一直致力于程序包的创造,并为其它平台提供相关选择。在我写这篇文章的时候,开发者们已经可以使用Unity创造出能够运行于iPhone,iPod,iPad,Android设备,Xbox Live Arcade,PS3以及任天堂的WiiWare设备上的游戏了。对于核心Unity程序包而言每种工具都是一种附加功能,并需要得到额外的成本。因为我们可以无需超支地专注于自己所能做的事,所以才能在剩下的文章内容中坚持于核心Unity 3D程序的内容。关键在于先开始创造一些你有能力完成的内容,然后再面向每个新项目去添加小块的功能。任何主导世界的成功计划都是从在自己的后院中划分领土所开始。

基于浏览器的3D?欢迎来到未来

Unity的主要卖点便是它能将完整的3D游戏体验直接整合到你的网页浏览器上。即它是基于Unity Web Player(游戏邦注:能在网页上运行Unity内容的免费插件)而做到这一点。

是时候开始行动了—-安装Unity Web Player

在你深入Unity游戏世界之前,请先下载Unity Web Player。这与Flash Player运行Falsh所创造的内容类似,Unity Web Player是一款在网页浏览器上运行Unity所创造的内容的插件。

前往http://unity3D.com。

立刻点击安装按键。

点击下载!

遵循屏幕上的所有指示而完成Web Player的安装。

欢迎来到Unity 3D!

现在你已经完成了Web Player的安装,你可以在浏览器上观看Unity3D制作工具所创造出来的内容。

我该如何使用Unity?

为了明确这一新技术的作用,让我们着眼于其他人使用Unity所创造出来的项目。尽管现在这些游戏仍处于我们不可触及的高度,但是我们可以从中找到游戏开发者们是如何最大限度地利用这一优秀的工具。

《FusionFall》

FusionFall(from gamedev)

FusionFall(from gamedev)

首先,让我们着眼于大型多人在线角色扮演游戏(MMORPG)《FusionFall》。

这是全球卡通游戏频道Cartoon Network所推出的游戏,即呈现出一个卡通风格的世界,而Cartoon Network中受欢迎的角色都会出现在其中—-包括《飞天小女警》,《小孩大联盟》等动画片中的角色。

《FusionFall》的深度性

《FusionFall》是一款非常高调的游戏,即在游戏发行时能够吸引许多人去关注那时候还不是很有名气的Unity游戏引擎。作为一种技术演示,这是最能表现出新技术作用的展示品。《FusionFall》拥有实时多人网络,聊天,任务,战斗,库存,NPC,基本的AI,名字生成,角色创造以及装扮等机制。而这也只是游戏功能集的一些突出部分。这款游戏具有深度性。

我们是否应该尝试着创造像《FusionFall》这样的游戏?

这时候你可能会想:“既然《FusionFall》便是我想使用Unity所创造的游戏类型,那么这篇文章便需要告诉我该怎么创造这样的游戏!”

不幸的是,创造一款与《FusionFall》类似游戏的按部就班指南就像是要求平板货车自己开动一样荒谬,你还需要让一些好友去翻动每张巨大的页面。如此你将不得不在余生时间里仔细阅读这一教程,并在临终前意识到这其实是个严重的错误。

原因:让我们核查《FusionFall》网页中有关游戏积分的链接:http://www.fusionfal…ame/credits.php.

这一页面罗列出了所有参与游戏创作的人员。Cartoon Network还列出了提供帮助的资深韩国MMO游戏开发商Grigon Entertainment。整个列表中共有超过80多个名字!当然了,只有两种行动方案对你来说是可行的:

创建一台克隆机器并亲自创造79件复制品。将每件复制品带到学校中,去学习各种不同学科,包括市场营销,服务器编程以及3D动画等等。然后花费一年的时间基于你的复制品去创造游戏。研究谁会使用臂章系统。

如果总是不能创造出梦想中的游戏的话就放弃吧。

另外一种选择

在你做出轻率的选择并放弃游戏开发前,让我们换个角度进行审视。《FusionFall》的确非常吸引人,并且也许它就是你梦想着创造出来的游戏。当然了,这篇文章并不是关于如何粉碎你的梦想,而是关于压低你的期望值,帮助你将梦想放在真空罐里,并教会你如何一步一步地将其拿出来。孔子说过:“千里之行始于足下。”而在电子游戏开发中,这便意味着上千种出色的功能都是基于一款简单且不具有多少功能的游戏。

所以让我们将《FusionFall》之梦存进真空罐里,并在真正准备好时再回来找它。接下来我们将着眼于一些有关更小的Unity 3D游戏的例子,并谈论如何创造那样的游戏。

《越野狩猎迅猛龙》

Off-Road Velociraptor Safari(from gamedev)

Off-Road Velociraptor Safari(from gamedev)

如果未来到Blurst.com(游戏邦注:独立游戏开发商Flashbang Studios所运营的游戏门户网站),我们的Unity 3D游戏之旅便不完整了。除了呈现其它独立游戏开发商所创造的游戏外,Flashbang也将自己的游戏带到了这个网站,包括《越野狩猎迅猛龙》。(注:Flashbang Studios一直在使用各种方法去推广他们的游戏。在我写这篇文章的时候,《越野狩猎迅猛龙》仍是一款免费的Facebook游戏。如果你没有Facebook帐号,那就去尝试该团队的其它游戏,如《Minotaur China Shop》或《Time Donkey》。)

在《越野狩猎迅猛龙》中,玩家将扮演戴着遮阳帽和单片眼镜,并驾驶着带有致命球钉的吉普车前进的恐龙(就像在考古学教材中所描写的那样)。而玩家的目标便是在吉普车上做各种绝技,并杀死恐龙同伴。

对于许多独立游戏开发者和评论者来说,是《越野狩猎迅猛龙》将他们带进了Unity。有些评论者表示在看到完整的3D游戏能够运行于浏览器时表示非常惊讶。而其他评论者则对游戏在缓慢的电脑中的糟糕运行表示不满。我们将在之后谈论相关优化,但是你最好能在一开始便牢记性能问题。

功能越少,越有前途

如果你玩过《越野狩猎迅猛龙》或者Blurst网站上的其它游戏,你便会更明确如何使用Unity创造游戏(在没有资深韩国MMO游戏开发商的帮助下)。这些游戏都包含3D模式,物理元素(游戏邦注:能够控制事物更真实移动的代码),碰撞(能够察觉事物之间相撞的代码),音乐和音效。就像《FusionFall》,这款游戏也适用于带有Unity Web Player插件的浏览器。Flashbang Studios同样也出售了这款游戏的可下载版本,即以此证实Unity也能够创造独立可执行的游戏文件。

也许我们能够创造另一款《越野狩猎迅猛龙》?

我们不能创造出像《FusionFall》那样的游戏,但也许我们能创造出像《越野狩猎迅猛龙》这样较小型的游戏?事实上也是不行的。我需要再次强调的是本篇文章并不是关于如何粉碎你的游戏开发梦。《越野狩猎迅猛龙》是5个非常出色且资深的开发者投入了8周全天候时间而创造出来的游戏,并且他们也已经完成了游戏的完善与调整了。尽管比起像《FusionFall》这样成熟的MMO,这款游戏显得较小,但是对于独立开发者而言这却是个不小的挑战。让我们将这种开发梦藏在一个罐子里并放到高架上,然后着眼于如何做才能取得更大的成功。

我更倾向于Wooglie

Wooglie.com是由M2H Game Studio在荷兰所创建的一个Unity游戏门户网站。从网站首页中我们便可以看出它与Blurst.com的显著区别。Wooglie上的许多游戏都较为粗糙,不像Blurst上的游戏那样复杂且专业。但是我们便是在此开始走上Unity的创造。因为在此你需要以新游戏开发者或者刚接触像Unity这样的新技术之人等身份而开始。

在Wooglie上玩一系列游戏。我将列举其中一些可能会让你感兴趣的游戏:

《Big Fun Racing》

《Big Fun Racing》是一款简单但却实在的游戏,玩家将在一辆玩具车中快速收集货币。这突出了许多不同的关卡和可以选择的汽车。游戏设计师花费了几个月的空闲时间并借助了外包设计师的帮忙而创造出了游戏的汽车模式。

《Diceworks》

《Diceworks》是基于Unity 3D而面向iPhone进行设计的一款简单但却非常优化的游戏。我们不能涵盖任何iPhone开发,但却必须知道你的Unity内容能够用于许多其它的设备和平台上,包括苹果的iPhone或iPod Touch以及任天堂Wii。iPhone和Wii的软件版本需要投入额外的费用,但是你也可以通过使用Unity的独立版本将游戏带到网页,Mac和PC上。

《Diceworks》是由一个只包含一名设计师和一名程序员的团队所创造的。我们很难找到任何能够同时拥有编程和设计才能的人;科学家表示,这些学科分别在我们的大脑中占据了不同的领域,而我们只能拥有其中一个领域。而在游戏开发中,设计师与程序员的合体却是很常见的组合。你的大脑会告诉你去做什么?你更倾向于视觉效果还是逻辑?或者是设计还是编程?当你找到这些问题的解决方法后,你最好能够找到其他人去完成另外一部分大脑的工作,从而确保你的游戏能够同时受到这两个领域的控制。

不管怎样,通过《Diceworks》我们可以更加了解如何使用Unity创造属于自己的游戏。

有趣的是,《Diceworks》其实是一款基于3D引擎的2D游戏。3“D”基本上消失了,所有游戏都出现在同一个平面上。在一开始禁止额外的维度是个好主意。在游戏中添加深度将在设计中附加一个全新的难度维度,而如果我们是专注于X和Y轴,并暂且将Z轴封存起来的话,我们便能够更轻松地使用Unity进行创造了。基于一些游戏例子我们可以发现,很快地你便可以对Z轴解封了。我在本篇文章中所提到的游戏都是使用3维模式所创造出来的2维平面。虽然如此,早前也出现了一些利用这一理念的游戏,如《新超级马里奥》。Wii将其3D角色带到2D平面并为玩家呈现出一款非常复杂且能够带来满足感的平台游戏。

在奔跑之前请先学会走路

新游戏开发经常会遇到的一个问题便是欲望过满。不过资深游戏开发者也会在很喜欢一个项目或者面对一种新技术并期望能够通过该技术快速获利时犯这种错误。这里所存在的真正危险便是你将坐下来去创造自己的梦想—-让我们假设这是一款结合了《暗黑破坏神》,《咻咻火箭》以及微软的《Excel》等最佳元素的RPG巨作。当你投入了数天,数周甚至数个月于游戏中,但却发现它仍未变成你所期待的那样,你便选择了放弃。你将会认为因为自己不能创造出梦想中的游戏,所以永远都不可能成为一名游戏开发者。

所以你就应该从小游戏开始!罗马也不是一天就建成的。通过采取一些较小的步骤,你便能够体验创造小游戏所带来的成功。然后你便能够利用你从中所学到的经验教训,并慢慢构建自己的专业技能,直到你有能力去实现自己的梦想游戏。

而现在,让我们暂时将梦想藏在罐子里,并将注意力转向一些更小且更容易到达的目标。一开始你最好先创造一些较简单的游戏,然后随着自己越变越专业而开始挑战更加复杂的内容。

已经有许多一开始是基于简单且有效理念,并在后来逐渐添加复杂且更丰富功能的游戏。要知道,小橡子终都会长成结实的大橡树。

没有所谓的“完成”

有些游戏开发者是面向虚拟硬盘(游戏邦注:如用于创造最终测试版的游戏光盘和暗盒)创造内容。将游戏带向网页的一大乐趣便是永远都不会出现“完成”的情况。你可以继续调整并完善网页游戏,直到它们变得比一开始更有趣且更完美。

如果你熟悉Flashbang Studios,你便会清楚他们经常在修改并完善自己的游戏,即使是在游戏“完成”后的好几年。在我写这篇文章的时候,《越野狩猎迅猛龙》已经诞生2年了,而该工作室也表示他们仍在修改这款游戏。

同样地,一开始我们也许会先尝试一些较粗糙的半成品。但是当我们进一步了解如何添加一些重要代码到更多游戏上时,我们便会不断去修改早前的游戏,添加更多内容并完善它们。

下载Unity

到现在你应该已经了解了Unity的一些作用了吧,所以我们是时候下载程序并进行检验了!从Unity 3D网页上我们可以免费下载到Unity的独立版本(至少是在我写这篇文章的时候)。

探索岛屿演示版本

当你最初打开Unity时,你会看到一个罗列出了不同教程资源和语言向导的启动画面。多有帮助啊!

因为你选择下载简单的项目,所以当你首次运行Unity时它便会自动加载。让我们导航到Window | Layouts | 2 by 3,这时候会看到我们所需要的不同面板。

demo(from gamedev)

demo(from gamedev)

为了尝试我们的演示版本,请点击屏幕中上方的“播放”按键。

我们可以使用键盘上的方向键在岛屿演示版本中四处走动。按压空格键跳跃。并在完成探索时再次点击“播放”按键结束演示。

island demo(from gamedev)

island demo(from gamedev)

技术的奇迹

Unity包含了所有能够帮助你创造出与演示版本中类似的岛屿的工具。它拥有地形工具能够帮助你将合适的模式和关卡整合到软件中。它包含了第一人称控制预制件,如此你便可以使用自动方向键而进入游戏世界中探索地形。Unity自动包含了渲染,碰撞,物理和音效等元素。这真的一种很棒的工具啊!

Will眼中的眼开放世界

如果你想要学习如何使用Unity去创建游戏中的地形,并添加3D模式,声音和互动性去创造一款简单但却具有功能性的3D开放游戏,那就去掌握“Unity游戏开发的基本要素”——Will Goldstone(Pack Publishing)

我们可以在Unity中使用引擎的地形雕刻工具直接创造岛屿演示版本中的内容。演示版本中包含了特殊的模型,如桥(来自3D软件包),还包含了3D Studio Max(游戏邦注:Autodesk传媒娱乐部开发的全功能的三维计算机图形软件),Maya或Blender。还有像小鸟等元素都附加了脚本,即引导它们如何飞翔。脚本中的一列指令能够告诉游戏世界中的各种元素如何运作。

让我们着眼于Unity的界面并记下一些有趣的要点。

场景窗口

我们可以在场景窗口上为游戏对象定位,并移动它们。这一窗口拥有各种控制能够改变其细节层次。我们可以不时地使用这些控制去切换灯光,并通过纹理,线框或两者的结合去呈现窗口内容。我们可以使用右上角的彩色线框将窗口限制在X,Y和Z轴上,以此观看场景的上方和边侧内容。点击中间的白盒回到透视图。这便是当你开始致力于一个项目或创造一个新场景时场景窗口所呈现出来的内容。我们可以将场景当成游戏中的关卡或阶段。

scene window(from gamedev)

scene window(from gamedev)

游戏窗口

游戏窗口所呈现的便是玩家能够看到的内容。当你点击“播放”按键去测试游戏时,你的努力结果便会出现在这个窗口上。切换成全屏牧师去测试你的游戏。

game window(from gamedev)

game window(from gamedev)

等级

等级面板列出了你的场景中所有游戏对象。这些对象(游戏邦注:包括摄像机,灯光,模式和预制件)便是你的游戏的组成部分。它们可以是“有形的”的事物,就像岛屿演示版本中的小鸟和桥,同时也可以是无形的,即只有作为游戏开发者的你才能看到并使用,如摄像机,灯光,碰撞机等。

岛屿演示版本的等级包含了小鸟,海泡,地形和太阳等等游戏对象。它同时还罗列出了第一人称控制预制件,即拥有带着摄像机的无形碰撞机。如此玩家便能够看到岛屿了。演示列出了一些名为“行为”的内容—-带有特殊脚本的游戏对象,能够帮助演示基于玩家的计算机规格更快速地运行。所以游戏对象既能够包含更加情感化的“物理”对象,如小鸟和桥,也能够包含一些幕后的无形事物,如灯光,摄像机和行动。

hierarchy(from gamedev)

hierarchy(from gamedev)

在等级面板上点击游戏对象,然后把鼠标移到场景窗口上。按压键盘上的F键,这时场景窗口便会自动拖动并直接缩放对象。或者你可以前往Edit | Frame Selected,这比使用键盘快捷键更有效。

项目面板

项目面板上列出了你需要在项目中创造游戏对象所需要的所有元素。例如,岛屿演示中的海鸥便是由网丝去代表其形状,材料去描述其“皮肤”或颜色,而脚本去控制它的飞翔行为。海鸥材料本身则包含了纹理文件。我们可以在项目面板上找到所有的这些内容。

复杂的海鸥

实际上岛屿演示中的海鸥比我们所列举的简单例子来得复杂。为了了解如何创造这些复杂的海鸥,我们需要点击项目面板中小鸟旁边的灰色箭头。然后点击海鸥旁边的箭头。如果你不理解自己所看到的也不要担心—-重要的是你需要理解包含各种元素的项目面板,这才是制作游戏对象的关键。

project(from gamedev)

project(from gamedev)

项目面板呈现出了名为资产的特殊文件夹的内容。当你创造了一个新的项目时,Unity将自动为你创造资产文件夹。如果你将一个复杂的文件(如3D模式,音效或图像)拖进项目面板中,那么Unity将把它复制到资产文件夹中,并将其呈现在项目面板上。

不要混淆资产文件夹!

Unity储存了有关文件夹的元数据,而如果你移动了相关材料或将内容从操作系统中删除,那么整个项目便会被摧毁。如果你想要改变某些内容,那就在项目面板中进行妥善的设置。

检查器

检查器是一种与上下文相关的面板,即意味着它会根据我们在Unity中所作出的选择而改变。你可以在此调整等级面板所列出的游戏对象的位置,旋转和规格。检查器同样也会呈现出控制去配置组件,即在游戏对象上添加功能。在Unity的三个主要面板中(即等级,项目和检查器),我们将在检查器中花费更多时间,因为我们需要在此修改构成游戏项目的每一种元素。

inspector(from gamedev)

inspector(from gamedev)

关于检查器的这一截图呈现出了岛屿演示中附加于第一人称控制预制件上的组件:两个脚本(FPSWalker和Mouse Look)以及角色控制器组件。为了在你的电脑上能够看到相同的内容,你需要在等级面板上选择第一人称控制预制件。

改变位置

让我们使用检查器面板快速改变玩家角色在一开始的位置。演示一开始玩家所看到的是400英尺高的高空,如此玩家便能在跳伞前从小鸟的视角去观看游戏世界。

你刚刚点击的第一人称控制预制件代表的是游戏中的玩家。它配置了摄像机,所以玩家可以从中进行观看,而弹丸形状的角色将碰撞,并告诉游戏引擎玩家是何时在场景中碰撞到其它事物。角色碰撞机能够保证玩家安全地降落到地面上。

我们可以使用检查器面板去改变玩家一开始的位置。在场景视图中,我们将能看到第一人称控制预制件—-它就像是顶着类似扬声器图标(挡住了摄像机图标)的绿色弹药。如果你没看到的话,请按以下步骤进行设置:

1.在等级面板上点击选择第一人称控制预制件。

2.导航到Edit | Frame Selected去专注于游戏对象。或者你可以将鼠标移到场景视图上,并按压键盘上的F键。如此第一人称控制预制件将出现在眼前。

3.点击移动按键,这就像是四个相连接的箭头。

三箭头的图标将出现在游戏对象的中央。蓝色的Z轴将穿越玩家肚脐眼的位置。红色的X轴垂直于X轴。如果玩家被头上的一条绳子所倒挂时,那么绿色的Y轴将上下贯穿他。Y轴是我们想要调整的上下轴。

4.你可以点击并拖动绿色Y轴箭头将玩家朝着天空移动,但是更好的方法便是改变检查器面板中的Y轴位置。打开检查器面板中转换旁边的灰色箭头,并将Y轴的值改为400。

inspector(from gamedev)

inspector(from gamedev)

5.现在,当你按压“播放”键去测试游戏时,你的角色将开始朝天空飞翔,并平稳,安静地着陆。幸运的是Unity的工作人员并未编写出摔伤的脚本,否则我们还需要应付摔断腿的情形。

图层和布局下拉菜单

在检查器面板上,你将看到图层和布局下拉菜单。游戏对象将倍整合到图层上,就像是在Photoshop或Flash上。Unity在布局下拉菜单上储存了一些常用的布局。你也可以储存并上传你自己所创造的布局。

重放控制

这三个按键将帮助你测试游戏并控制重放。就像你所看到的,“播放”按键将能控制游戏的开始与结束。暂停按键将暂停游戏,从而让你能在过程中进行改变。而第三个按键便是分步控制,即我们可以使用这一按键去逐步推动游戏的画面,从而让你能够更准确地控制事情的发展。

在测试无法继续下去时改变你的设置!

Unity一大最让人惊讶的功能便是我们可以在测试过程中改变游戏对象和各种变量。但是我们必须知道在测试过程中所做出的改变将不会持续下去。即当你停止游戏测试时,你在测试过程中所做出的改变将恢复到点击播放按键之前的状态。在游戏中做出许多改变是非常让人沮丧的事,你只会意识到自己一直反复按压着播放按键,并且你所做出的改变最终也都会消失。避免这种问题的一大方法便是在游戏窗口中将播放按键最大化,从而确保我们能够清楚何时在测试,何时又不是。

场景控制

我们可以在屏幕的左上方看到四个控制,它们能够帮助我们移动场景,并在场景中为游戏对象定位。这些控制将映射到键盘上的Q,W,E和R按键上。从左到右分别是:

手形工具(Q):使用它去点击并拖曳场景。在键盘上按住交替键而旋转视图。按住控制键或命令键进行缩放。鼠标滚轮也能够缩放场景。按住换挡键去摇动,缩放并旋转,从而进行加速。这能帮助我们更好地在游戏世界中导航。但是这并不会影响玩家看待游戏的方式。为了改变游戏视角,我们需要使用移动或旋转工具去改变摄像机的位置。

移动工具(W):使用这一工具的话我们便能够移动场景中的游戏对象。我们可以在X,Y或Z轴的操纵下拖曳对象,或者让对象在中心自由移动。按住控制键将快速移动去设置网格的增量。当我们在天空中定位第一人称控制预制件时便会看到这一工具。

旋转工具(E):我们可以使用这一工具基于球形坐标轴而旋转对象。红线,绿线和蓝线分别映射在X,Y和Z轴上。

缩放工具:这一工具与移动和旋转工具的作用类似。使用它能够将游戏对象变得更大或者更小。拖动X,Y和Z轴将不匀称地改变对象的大小(压扁或拉长),而拖动中间的灰色方形将能规则地做到这一点。

不要在此停下!

我们已经大致掌握了Unity界面的重要元素,但却不意味我们可以就此停下来了。就像菜单选择,按键和控制等都是我未曾在文章中详细描述的。所以为何你不去探索那些内容或随机选择一些自己还不理解的内容呢?你无需致力于创造岛屿样本,为何不自己尝试着摆弄看看呢?

以下是你可以尝试的内容:

在等级面板中选择一些游戏对象,然后使用场景控制在场景窗口中移动它们。当你将桥放置在天空中会发生什么?你能否创造出小鸟飞到树上的情境?当你在测试游戏时做出错误选择时会怎样?

随机右击三个不同的面板,并浏览上下文菜单选择以明确自己会做出怎样的选择。

在GameObject | Create Othe菜单上闲逛。那里有一整列有趣的内容,你可以无需使用3D建模程序而将其添加到场景上。

当你将灯光或摄像机从场景中删除时会发生什么?你能否添加另外一个摄像机或更多灯光?这对场景会造成何种影响?

你能否将第一人称控制预制件移动到岛屿的其它部分以改变初始位置?如移到沙滩上两个巨石的上方?

能否替换音频文件而让海鸥的声音变得像汽车喇叭一样?

从网络上下载小猫的图片,并研究是否能够将其叠加在巨石模型上。也就是小猫巨石!你可以使用菜单中的Assets | Import New Asset选择将小猫整合到项目中。

协调器的天堂

Unity 3D界面的设计目的便是进行定制化。你不只可以定制自己的窗口布局,同时也可以编写定制脚本去设置Unity中的按键和面板,如此便能有效地加快工作流程了。虽然这些内容都超出了本文的范畴,但是如果你真的想要深入了解并使用这一引擎的话,你便会很乐意搞清楚如何将Unity 3D转变成自己项目中的核心内容—-也许是通过添加一些竞赛脚本或在后台安装巨大的低音喇叭?

总结

本篇文章主要是关于Unity的作用及其程序界面所呈现的内容。以下是我们的发现:

大至80个人的团队,小至只有1或2个人的团队都在使用Unity创造游戏。

比起大项目,在小项目中我们更能有效地了解Unity并创造出完整的功能型游戏。

Unity的不同版本将帮助我们将游戏带向不同的平台。通过使用免费独立版本,我们能将游戏带向网页,Mac和PC平台。

Unity界面拥有控制和面板,能让我们组合自己的游戏资产,并在程序内部进行测试!

我希望你能花些时间去摧毁岛屿演示。如果你想要再次看到这一演示或者于之后进行发泄的话,你也可以通过点击File | Save Project去保存该文件。

本文为游戏邦/gamerboom.com编译,拒绝任何不保留版权的转载,如需转载请联系:游戏邦

Introduction to Game Development Using Unity 3D

By Ryan Henson Creighton

Published Feb 21 2012

This article by Ryan Henson Creighton, author of Unity 3D Game Development by Example, introduces you to Unity 3D—an amazing game engine that enables you to create games and deploy them to a number of different devices, including (at the time of writing) the Web, PCs, iOS platforms, and WiiWare, with modules for Android and Xbox Live Arcade deployment in the works. You’ll play a number of browser-based Unity 3D games to get a sense of what the engine can handle, from a massively-multiplayer online game all the way down to a simple kart racer. You’ll download and install your own copy of Unity 3D, and mess around with the beautiful Island Demo that ships with the product.

Technology is a tool. It helps us accomplish amazing things, hopefully more quickly and more easily and more amazingly than if we hadn’t used the tool. Before we had newfangled steam-powered hammering machines, we had hammers. And before we had hammers, we had the painful process of smacking a nail into a board with our bare hands. Technology is all about making our lives better and easier. And less painful.

Introducing Unity 3D

Unity 3D is a new piece of technology that strives to make life better and easier for game developers. Unity is a game engine or a game authoring tool that enables creative folks like you to build video games.

By using Unity, you can build video games more quickly and easily than ever before. In the past, building games required an enormous stack of punch cards, a computer that filled a whole room, and a burnt sacrificial offering to an ancient god named Fortran. Today, instead of spanking nails into boards with your palm, you have Unity. Consider it your hammer—a new piece of technology for your creative tool belt.

Unity takes over the world

We’ll be distilling our game development dreams down to small, bite-sized nuggets instead of launching into any sweepingly epic open-world games. The idea here is to focus on something you can actually finish instead of getting bogged down in an impossibly ambitious opus. When you’re finished, you can publish these games on the Web, Mac, or PC.

The team behind Unity 3D is constantly working on packages and export opinions for other platforms. At the time of this writing, Unity could additionally create games that can be played on the iPhone, iPod, iPad, Android devices, Xbox Live Arcade, PS3, and Nintendo’s WiiWare service. Each of these tools is an add-on functionality to the core Unity package, and comes at an additional cost. As we’re focusing on what we can do without breaking the bank, we’ll stick to the core Unity 3D program for the remainder of this article. The key is to start with something you can finish, and then for each new project that you build, to add small pieces of functionality that challenge you and expand your knowledge. Any successful plan for world domination begins by drawing a territorial border in your backyard.

Browser-based 3D? Welcome to the future

Unity’s primary and most astonishing selling point is that it can deliver a full 3D game experience right inside your web browser. It does this with the Unity Web Player—a free plugin that embeds and runs Unity content on the Web.

Time for action – install the Unity Web Player

Before you dive into the world of Unity games, download the Unity Web Player. Much the same way the Flash player runs Flash-created content, the Unity Web Player is a plugin that runs Unity-created content in your web browser.

Go to http://unity3D.com.

Click on the install now! button to install the Unity Web Player.

Click on Download Now!

Follow all of the on-screen prompts until the Web Player has finished installing.

Welcome to Unity 3D!

Now that you’ve installed the Web Player, you can view the content created with the Unity 3D authoring tool in your browser.

What can I build with Unity?

In order to fully appreciate how fancy this new hammer is, let’s take a look at some projects that other people have created with Unity. While these games may be completely out of our reach at the moment, let’s find out how game developers have pushed this amazing tool to its very limits.

FusionFall

The first stop on our whirlwind Unity tour is FusionFall—a Massively Multiplayer Online Role-Playing Game (MMORPG). You can find it at fusionfall.com. You may need to register to play, but it’s definitely worth the extra effort!

FusionFall was commissioned by the Cartoon Network television franchise, and takes place in a re-imagined, anime-style world where popular Cartoon Network characters are all grown up. Darker, more sophisticated versions of the Powerpuff Girls, Dexter, Foster and his imaginary friends, and the kids from Codename: Kids Next Door run around battling a slimy green alien menace.

Completely hammered

FusionFall is a very big and very expensive high-profile game that helped draw a lot of attention to the then-unknown Unity game engine when the game was released. As a tech demo, it’s one of the very best showcases of what your new technological hammer can really do! FusionFall has real-time multiplayer networking, chat, quests, combat, inventory, NPCs (non-player characters), basic AI (artificial intelligence), name generation, avatar creation, and costumes. And that’s just a highlight of the game’s feature set. This game packs a lot of depth.

Should we try to build FusionFall?

At this point, you might be thinking to yourself, “Heck YES! FusionFall is exactly the kind of game I want to create with Unity, and this article is going to show me how!”

Unfortunately, a step-by-step guide to creating a game the size and scope of FusionFall would likely require its own flatbed truck to transport, and you’d need a few friends to help you turn each enormous page. It would take you the rest of your life to read, and on your deathbed, you’d finally realize the grave error that you had made in ordering it online in the first place, despite having qualified for free shipping.

Here’s why: check out the game credits link on the FusionFall website: http://www.fusionfal…ame/credits.php.

This page lists all of the people involved in bringing the game to life. Cartoon Network enlisted the help of an experienced Korean MMO developer called Grigon Entertainment. There are over 80 names on that credits list! Clearly, only two courses of action are available to you:

Build a cloning machine and make 79 copies of yourself. Send each of those copies to school to study various disciplines, including marketing, server programming, and 3D animation. Then spend a year building the game with your clones. Keep track of who’s who by using a sophisticated armband system.

Give up now because you’ll never make the game of your dreams.

Another option

Before you do something rash and abandon game development for farming, let’s take another look at this. FusionFall is very impressive, and it might look a lot like the game that you’ve always dreamed of making. This article is not about crushing your dreams. It’s about dialing down your expectations, putting those dreams in an airtight jar, and taking baby steps. Confucius said: “A journey of a thousand miles begins with a single step.” I don’t know much about the man’s hobbies, but if he was into video games, he might have said something similar about them—creating a game with a thousand awesome features begins by creating a single, less feature-rich game.

So, let’s put the FusionFall dream in an airtight jar and come back to it when we’re ready. We’ll take a look at some smaller Unity 3D game examples and talk about what it took to build them.

Off-Road Velociraptor Safari

No tour of Unity 3D games would be complete without a trip to Blurst.com—the game portal owned and operated by indie game developer Flashbang Studios. In addition to hosting games by other indie game developers, Flashbang has packed Blurst with its own slate of kooky content, including Off-Road Velociraptor Safari. (Note: Flashbang Studios is constantly toying around with ways to distribute and sell its games. At the time of this writing, Off-Road Velociraptor Safari could be played for free only as a Facebook game. If you don’t have a Facebook account, try playing another one of the team’s creations, like Minotaur China Shop or Time Donkey).

In Off-Road Velociraptor Safari, you play a dinosaur in a pith helmet and a monocle driving a jeep equipped with a deadly spiked ball on a chain (just like in the archaeology textbooks). Your goal is to spin around in your jeep doing tricks and murdering your fellow dinosaurs (obviously).

For many indie game developers and reviewers, Off-Road Velociraptor Safari was their first introduction to Unity. Some reviewers said that they were stunned that a fully 3D game could play in the browser. Other reviewers were a little bummed that the game was sluggish on slower computers. We’ll talk about optimization a little later, but it’s not too early to keep performance in mind as you start out.

Fewer features, more promise

If you play Off-Road Velociraptor Safari and some of the other games on the Blurst site, you’ll get a better sense of what you can do with Unity without a team of experienced Korean MMO developers. The game has 3D models, physics (code that controls how things move around somewhat realistically), collisions (code that detects when things hit each other), music, and sound effects. Just like FusionFall, the game can be played in the browser with the Unity Web Player plugin. Flashbang Studios also sells downloadable versions of its games, demonstrating that Unity can produce standalone executable game files too.

Maybe we should build Off-Road Velociraptor Safari?

Right then! We can’t create FusionFall just yet, but we can surely create a tiny game like Off-Road Velociraptor Safari, right? Well… no. Again, this article isn’t about crushing your game development dreams. But the fact remains that Off-Road Velociraptor Safari took five supremely talented and experienced guys eight weeks to build on full-time hours, and they’ve been tweaking and improving it ever since. Even a game like this, which may seem quite small in comparison to full-blown MMO like FusionFall, is a daunting challenge for a solo developer. Put it in a jar up on the shelf, and let’s take a look at something you’ll have more success with.

I bent my Wooglie

Wooglie.com is a Unity game portal hosted by M2H Game Studio in the Netherlands. One glance at the front page will tell you that it’s a far different portal than Blurst.com. Many of the Wooglie games are rough around the edges, and lack the sophistication and the slick professional sheen of the games on Blurst. But here is where we’ll make our start with Unity. This is exactly where you need to begin as a new game developer, or as someone approaching a new piece of technology like Unity.

Play through a selection of games on Wooglie. I’ll highlight a few of them for your interest:

Big Fun Racing

Big Fun Racing is a simple but effective game where you zip around collecting coins in a toy truck. It features a number of different levels and unlockable vehicles. The game designer sunk a few months into the game in his off-hours, with a little help from outsource artists to create the vehicle models.

Diceworks

Diceworks is a very simple, well-polished game designed for the iPhone in Unity 3D. We won’t be covering any iPhone development, but it’s good to know that your Unity content can be deployed to a number of other devices and platforms, including the Apple iPhone or iPod touch, and the Nintendo Wii. The iPhone and Wii versions of the software cost an additional fee, but you can deploy your games to the Web, to the Mac, and to the PC for free using the indie version of Unity.

Diceworks was created by one artist and one programmer working together as a team. It’s rare to find a single person who possesses both programming and artistic talent simultaneously; scientists say that these disciplines are split between two different lobes in our brains, and we tend to favor one or the other. The artist-programmer pairing that produced Diceworks is a common setup in game development. What’s your own brain telling you? Are you more comfy with visuals or logic? Art or programming? Once you discover the answer, it’s not a bad plan to find someone to make up the other half of your brain so that your game handles both areas competently.

At any event, with Diceworks we’re definitely getting closer to the scope and scale that you can manage on your own as you start out with Unity.

It’s also interesting to note that Diceworks is a 2D game created in a 3D engine. The third “D” is largely missing, and all of the game elements appear to exist on a flat plane. Nixing that extra dimension when you’re just starting out isn’t a half bad idea. Adding depth to your game brings a whole new dimension of difficulty to your designs, and it will be easier to get up and running with Unity by focusing on the X and Y axes, and leaving the Z-axis in one of those dream jars. With a few sturdy working game examples under your belt, it won’t be long before you can take that Z-jar down off the shelf and pop it open. The games that we’ll be dealing with in this article will stick to a two-dimensional plane, using three-dimensional models. Even so, certain games have taken this concept and ran with it: New Super Mario Bros. Wii locked its 3D characters to a 2D plane and wound up an extremely complex and satisfying platformer.

Walk before you can run (or double jump)

A common mistake that new game developers make is biting off more than they can chew. Even experienced game developers make this mistake when they get really excited about a project, or when they approach a new technology and expect to be immediately proficient at using it. The real danger here is that you’ll sit down and try to create your dream—let’s say it’s a sword and sorcery RPG epic that combines all the best parts of Diablo, ChuChu Rocket!, and Microsoft Excel. When you’ve sunk days and weeks and months into it and it still looks nothing like the game you envisioned, you give up. You figure that since you failed at creating your dream game, you were never really cut out to be a game developer to begin with.

You owe it to yourself to start small! Rome wasn’t built in a day, and neither was your dream kart racing game starring famous figures from Roman history. By taking smaller steps, you can experience success with a number of smaller games. Then you can take what you learn and add to it, slowly building your expertise until you’re in a position to take that dream game jar off the shelf.

For now, let’s keep our dream shelf fully stocked, and turn our attention to something small and achievable. Best would be to have a collection of working games that started out simply, and grew more and more complex as you got smarter.

There are real-world examples of games that began as simple, effective ideas and later grew into enormously complex and feature-rich titles. From small acorns, mighty multiplayer oak tree games grow.

There’s no such thing as “finished”

Some game developers who produce content for fixed media such as game discs and cartridges are used to producing a gold master—the final build of the game—and calling it a day. One of the joys of deploying games to the Web is that they’re never truly finished. You can continue tweaking your web games and modifying them until you end up with a far more fun and polished game than you started with.

If you follow Flashbang Studios on Twitter or if you read the studio’s blog, you’ll see that they’re constantly modifying and improving their games, even years after they were “finished”. At the time of this writing, Off-Road Velociraptor Safari was two years old, and the studio’s Twitter stream revealed that they’re still actively tweaking the game.

Likewise, we may start with some games that are really raw and unfinished at first. But as we learn more about how to program the crucial bits and pieces common to many games, we’ll keep revisiting our rough, early games to add those pieces and improve them.

Stop! Hammer time

Now that you’ve seen some of what Unity can do, it’s time to download the program and kick the tires! Unity indie version is available for the low price of free (at the time of this writing) from the Unity 3D website.

Explore Demo island

When Unity first opens, you should see a splash screen referring you to different tutorial resources and language guides. How helpful! Now close it. (Don’t worry, it’ll be there next time, unless you uncheck the Show at Startup box).

Because you chose to download the sample project, it should automatically load the first time you run Unity. Navigate to Window | Layouts | 2 by 3 to see the different panels that we’re about to tour.

To try out the demo, click on the Play button at the top-center of the screen.

You can walk around the Island Demo using the WASD keys on your keyboard. Jump by pressing the Space bar. When you’re finished exploring, click on the Play button again to end the demo.

The wonders of technology!

Unity contains all of the tools that you need to create an island similar to the one you see in this demo. It has terrain tools that let you model your level right inside the software. It contains a ready-made First Person Controller Prefab object you can plunk into the world with automatic WASD keyboard controls that will allow you to explore the terrain. Unity automatically takes care of the rendering (drawing), collisions, physics, and sound effects. That’s one fancy hammer!

Wide-open worlds with Will

If you’d like to learn how to sculpt your own terrain in Unity, and to add 3D models, sounds, and interactivity to create a simple but functional 3D open-world game, check out, “Unity Game Development Essentials”, Will Goldstone, Packt Publishing.

Much of what you see in the Island Demo can be built directly in Unity using the engine’s terrain sculpting tools. The demo contains special models, like the bridge, which were imported from 3D software packages, including 3D Studio Max, Maya, or Blender. Certain elements, like the birds, have scripts attached to them that teach them how to fly. Scripts are lists of instructions that tell the items in the game world how to behave.

Let’s take a quick look around the Unity interface and note a few points of interest.

The Scene window

The Scene window is where you can position your Game Objects and move things around. This window has various controls to change its level of detail. Use these controls to toggle lighing on and off, and to display the window contents with textures, wireframes, or a combination of both. You can use the colorful gizmo in the top-right corner to constrain the window to the X, Y, and Z axes to view the top and sides of your scene. Click on the white box in the middle to return to perspective view. This is what the Scene window looks like when you start a new project or create a new Scene. You can think of scenes as levels or stages in your game.

The Game window

The Game window shows you what your players will see. When you click on the Play button to test your game (as you just did with the Island Demo), the results of your efforts play out in this window. Toggle the Maximize on Play button to test your game in full-screen mode.

The Hierarchy

The Hierarchy panel lists all of the Game Objects in your Scene. Game Objects—cameras, lights, models, and prefabs—are the things that make up your game. They can be “tangible” things like the birds and the bridge in the Island Demo. They can also include intangible things, which only you as the game developer get to see and play with, such as the cameras, the lights, and colliders, which are special invisible shapes that tell the game engine when two Game Objects are touching.

The Island Demo Hierarchy contains Game Objects for the birds, the sea foam, the terrain, and the sun, to name a few. It also lists something called the First Person Controller Prefab, which has one of those invisible Colliders with a camera stuck to it. That’s how the player can see the island. The demo lists something called Performance—an empty Game Object with a special script at  ached to it that helps the demo run more quickly depending on the player’s computer specs. So, Game Objects can include touchy-feely “physical” objects like birds and bridges, as well as behind-the-scenes intangible things like lights, cameras, and actions (scripts).

Click on a Game Object in the Hierarchy panel, and then hover your mouse over the Scene window. Press the F key on your keyboard, and the Scene window will automatically pan and zoom directly to that object. Alternatively, you can go to Edit | Frame Selected, which can be more reliable than using the keyboard shortcut. (I like to think of the F as standing for Focus to help me remember what this shortcut does).

The Project panel

The Project panel lists all of the elements that you’ll use to create Game Objects in your project. For example, the Island Demo seagull Game Object is made up of a mesh that represents the seagull’s shape, a material to depict its “skin” or coloring, and a script that controls its flight behavior. The seagull material itself could include a texture (image) file. All of these goodies are listed in the Project panel.

You got a lot of gull

The actual seagulls in the Island Demo are actually more complex than the ones in our simple example. To see what went into creating them, click on the gray arrow next to Birds in the Project panel. Then click on the arrow next to Seagull. Don’t worry if you don’t understand what you’re seeing—the key here is to understand that the Project panel contains many of the elements, or ingredients, that go into making our Game Objects.

The Project panel displays the contents of a special folder called Assets. Unity automatically creates the Assets folder for you when you create a new project. If you drag a compatible file, like a 3D model, a sound effect, or an image into the Project panel, Unity copies it to the Assets folder behind the scenes, and displays it in the Project panel.

Don’t mess with the Assets folder!

Unity stores metadata about the folder, and by moving stuff around or deleting things through your operating system, you may break your project. If you need to make changes, make them right inside Unity in the Project panel.

The Inspector

The Inspector is a context-sensitive panel, which means that it changes depending on what you select elsewhere in Unity. This is where you can adjust the position, rotation, and scale of Game Objects listed in the Hierarchy panel. The Inspector can also display controls to configure components that add functionality to Game Objects. Between the three main panels in Unity (Hierarchy, Project, and Inspector), the Inspector is where you’ll likely spend most of your time because that’s where you’ll be tweaking and fiddling with every aspect of the elements that comprise your game projects.

This screenshot of the Inspector shows the components attached to the First Person Controller Prefab in the Island Demo: two scripts (FPSWalker and Mouse Look) and a Character Controller component. To see the same content on your computer, click to select the First Person Controller Prefab in the Hierarchy panel.

Invade Island Demo as a paratrooper

Let’s use the Inspector panel to make a quick change to the start position of the player character. We’ll begin the demo with the player 400 feet in midair, giving the player a beautiful bird’s eye view of the action as he parachutes into the island.

The First Person Controller Prefab that you just clicked on represents the player in the game. It has a camera embedded in it that the player looks through, and a pill-shaped Character collider that tells the game engine when the player is touching other things in the Scene. The Character collider is what keeps the player from falling through the ground.

We can use the Inspector panel to change the start position of the player. In the Scene view, you should see the First Person Controller Prefab—it looks like a green pill with what looks like a speaker icon on top of it (this is blocking the Camera icon). If you don’t see it, follow these steps:

1.Click to select the First Person Controller Prefab in the Hierarchy panel.

2.Navigate to Edit | Frame Selected to focus on the Game Object. Alternatively, you can hover your mouse over the Scene view and press the F key on your keyboard. The First Person Controller Prefab should swing into view.

3.Click on the Move button, which looks like four connected arrows.

A tripod of three arrows appears at the center of the Game Object. The blue Z- axis runs through where the player’s belly button would be. The red X-axis runs perpendicular to the X-axis. And the green Y-axis runs straight up and down through the player as if the player was hanging by a piece of string tied to the top of her head. The Y-axis is the up or down axis that we want to adjust.

4.You can click-and-drag the green Y-axis arrow to move the player up into the sky, but a better method is to change the Y-axis position in the Inspector panel. Expand the gray arrow next to Transform in the Inspector panel if it’s not already open, and change the Y value under Position to 400.

5.Now, when you press Play to test the game, your character will start way up in the sky, floating down to the island before making a soft, quiet landing. It’s a good thing that the Unity people didn’t write a fall damage script, otherwise we might have some crumpled legs to contend with!

Layers and layout dropdowns

Above the Inspector panel, you’ll see the Layers and Layout dropdowns. Game Objects can be grouped into layers, much like in Photoshop or Flash. Unity stores a few commonly used layouts in the Layout dropdown. You can also save and load your own custom layouts.

Playback controls

These three buttons help you test your game and control playback. As you’ve seen, the Play button starts and stops your game. The Pause button works as expected—it pauses your game so that you can make changes to it on the fly. The third button is a Step-Through control; use it to advance frame-by-frame through your game so that you can more tightly control what’s going on.

Changes you make while testing don’t stick!

One of the more surprising features of Unity is that you can make changes to Game Objects and variables on the fly while you’re testing your game. But it’s important to know that the changes you make during testing will not “stick”. Once you stop testing your game, the changes that you made during testing will revert to the state they were in before you clicked on the Play button. It’s disheartening to make a number of changes to your game, only to realize that the Play button was on the entire time, and your changes will be lost. One way to avoid this problem is to toggle the Maximize on Play button in the Game window so that you’ll be more aware of when you’re testing and when you’re not.

Scene controls

At the top-left of your screen, you’ll see four controls that help you move around your Scene, and position Game Objects within it. These controls are mapped to the Q, W, E, and R keys on your keyboard. From left to right, they are:

The Hand tool (Q): Use it to click-and-drag around your scene. Hold down the Alt key on your keyboard to rotate the view. Hold down the Ctrl key (Windows) or the Command key (Apple) to zoom in and out. Your mouse wheel will also zoom the scene. Hold down the Shift key to pan, zoom, and rotate in larger increments to speed things up. This is a way for you to navigate around the game world. It doesn’t actually impact the way the player sees the game. To modify the Game view, you need to use the Move or Rotate tools to modify the Camera position.

The Move tool (W): This tool lets you move the Game Objects around your scene. You can either drag the object(s) around by the X, or Y, or Z-axis handles, or by the square in the center for freeform movement. Holding down the Ctrl key will snap movement to set grid increments. We saw this tool when we were positioning the First Person Controller Prefab in the middle of the sky.

Rotate tool (E): Use it to spin your objects around using a neat spherical gizmo. The red, green, and blue lines map to the X, Y, and Z axes.

Scale tool ?: This tool works much the same as the Move and Rotate tools. Use it to make your Game Objects larger or smaller. Dragging an X, Y, or Z handle will non-uniformly scale (squash and stretch) the object, while dragging the gray cube in the center will uniformly scale it.

Don’t stop there—live a little!

We’ve glanced briefly at the key elements of the Unity interface, but there’s no need to stop poking around. Far beyond the scope of this article, there is a wealth of menu options, buttons, and controls that we haven’t covered. Why not explore those menus or start randomly clicking on things that you don’t yet understand? Now is the time to safely break stuff. You didn’t work hard to create the Island Demo, so why not mess around with it a little bit?

Here are some things to try:

Select some of the Game Objects in the Hierarchy panel and move them around in the Scene window using the Scene controls. What happens when you put the bridge in the middle of the sky? Can you make one of the birds fly into a tree? What happens when you walk way out into the ocean while testing the game?

Randomly right-click in the three different panels and read through the context menu options to see what you’re getting yourself into.

Poke around in the GameObject | Create Other menu. There’s a whole list of interesting things that you can add to this scene without even touching the 3D modeling program.

What happens when you delete the lights from the scene? Or the camera? Can you add another camera? More lights? How does that affect the Scene?

Can you move the First Person Controller Prefab to another part of the island to change your starting position? How about starting on top of those two gigantic rocks on the beach?

Can you replace the audio files to make the seagulls sound like car horns?

Download a picture of kittens from the Internet and see if you can wrap it around the boulder model. Kittens rock! You can pull the kittens into your project using the Assets | Import New Asset option in the menu.

A tuner’s paradise

The Unity 3D interface is designed to be customized. Not only can you define your own custom window layouts, but you can even write custom scripts to make certain buttons and panels appear inside Unity to speed up your workflow. That kind of thing is well beyond the scope of this article, but if you’re the kind of person who really likes to get under the hood, you’ll be happy to know that you can tweak Unity 3D to your heart’s content—maybe add a few racing stripes and install an enormous pair of subwoofers in the back?

Summary

This article was all about getting a feel for what Unity can do and for what the program interface had to offer. Here’s what we found out:

Massive 80 person teams, all the way down to tiny one- or two-person teams are using Unity to create fun games.

By thinking small, we’ll have more success in learning Unity and producing fully functional games instead of huge but half-baked abandoned projects.

Different flavors of Unity help us deploy our games to different platforms. By using the free indie version, we can deploy to the Web, and the Mac and PC platforms.

The Unity interface has controls and panels that let us visually compose our game assets, and test games on the fly right inside the program!

I hope you’ve taken some time to thoroughly vandalize the Island Demo. Save the file by clicking on File | Save Project in case you want to come back and wreak more havoc a little later.(source:gamedev)


上一篇:

下一篇: