Game Development Community

dev|Pro Game Development Curriculum

torque 1.5 chinses tutorial

by Wubo · 03/21/2007 (6:49 am) · 12 comments

Torque 1.5 - 介绍教程
欢迎来到Torque的世界
祝贺你买了我们的Torque 游戏引擎。这个教程会带领你参观大部分Torque的基本功能,也是你开始自己做游戏的一个起点。做完这个教程时,我们已经做好了一个简单的3D游戏!

在我们进入Torque世界以前,有两点值得注意。在这个教程中,当你看到诸如"Select File > Open Mission",它意味着点击File菜单中的"Open Mission"选项。至于文件的位置,我们假定你把Torque安装在了某个硬盘根目录的/Torque/SDK目录。第2点,这个教程是写给PC平台用户的,如果你使用的是苹果系统,我们强烈建议你使用两个按键的鼠标,同时用Option键代替Ctrl键的操作。另外,应用程序文件在Mac中被叫做"二进制文件"的,我们在这里叫"可执行文件"。
开始页
在Torque/SDK/example目录下,你会发现名为torqueDemo可执行文件。当你运行torqueDemo的时候,你会发现如下的开始页面:
那顶上的一群图标是到TGE工具和文档的快捷方式。GUI Editor是制作图形用户界面的工具。World Editor是创造你的游戏世界并添加物体。Console是提供通过文字界面访问和控制游戏引擎的脚本。在这个教程中,我们将要探索GUI和World编辑器,并且我们会快速浏览一下Console。至于TDN,News,Docs,和Forums图标是关于Torque信息的网页的链接。Tutorial是本教程的链接。Options让你能设置普通的图形和声音选项,比如屏幕分辨率或音量等。最后,Exit就像你想象中的那样,退出这个引擎。

我们在这个教程中不会深入介绍Torque的Consol(控制台),只是让你知道它能做什么,点击这个图标,在Consol窗口你可以看到引擎启动后的一些进程记录。你不仅仅可以用它来得到文字反馈,你也能直接在文字输入框中输入命令,举个例子,输入"quit();",当然,这个命令退出了TGE。


游戏文件
为了制作我们的教程游戏,我们需要创建一个新的工程文件夹并通过这个文件夹浏览一下引擎文件的结构。在标准的TGE安装中,游戏文件将装在Torque/SDK/example目录中。在那里你可以看到一些游戏DEMO的文件夹。我们的游戏将用到tutorial.base文件夹中的所有文件,为防止原始文件夹在我们的操作中被损坏,所以要对tutorail.base(包括它里面所有的内容)文件夹进行备份,备份文件夹仍然放在example目录下,并重命名为"GameOne",这就是我们的第一个游戏文件夹。
游戏数据的根目录就是Torque可执行文件所在之处,在example目录,torqueDemo.exe可执行文件是,当然当你想发布自己的游戏时你可以改成任何你喜欢的名字,在torqueDemo的同一目录下,有个叫main.cs的脚本文件,用一个文本编辑器(如果你有编译程序就用编译程序,如果没有那就用windows中的写字板)打开Torque/SDK/example/main.cs文件,我们在这里不详细解释脚本,在这个文件中会看到其中一行写着"$defaultGame = "tutorial.base";"。那行(结合下面的两行)告诉Torque引擎在哪里可以找到我们游戏的其他文件。在这行用"GameOne"取代"tutorial.base"并保存这个脚本文件。注意:defaultGame是大小写敏感的,所以确保Game和One都以大写字母开头。当我们运行torqueDemo的时候,它就知道在GameOne目录里查找我们的游戏资源。
我们进入这个GameOne目录里看看,打开这个目录你可以看到更多的脚本文件和一些新的目录。我们不会提及太多的细节,只大概地浏览一下,这里的脚本有更多的游戏启动信息,client和server目录包括游戏脚本的大部分内容(我们将会在后面看到它们),data目录包括
了我们所有的资源文件,比如模型,纹理,声音,和少许脚本,直接处理资源的脚本。当第一次运行Torque后,你会发现每个一个.cs文件都有一个.dso文件与之对应,.dso文件是.cs文件的编译版本,引擎会自动重编译在你上次运行之后改过的.cs文件。

现在我们已经安装好了我们的游戏文件,该是专入引擎的时候了,回到Torque/SDK/example目录并运行torqueDemo,开始界面有一些图形按钮在顶端。我们先学习World编辑器,所以我们就点击World Editor按钮。

移动
当你点击World Editor按钮后,你会发现自己浮动在一个大型的棋盘上。这是World编辑器的默认任务。在World Editor的屏幕右侧,你可以看到World Editor Inspector窗口,我们先暂时把它关掉,先选择Window > World Editor关掉它们(快捷键F2)。
现在,在我们开始编辑地形之前,先用点时间熟悉下Torque里的移动。默认情况,你的视野是一个自由移动的摄像头,要转换成游戏者的第一视角可以通过 Camera > Toggle Camera (快捷键Alt+C)来实现。按住右键拖动的时候,你可以环视四周,而W\A\S\D键让你能在地面上前后左右的四处移动。好,就用这种方法感觉一下你在游戏的时候是怎么移动的吧,在四周走动巡视一下.一个更酷的功能是第三者的视觉模式,你可以按住右键并按Tab键来进入(如上图所示)。
现在,让我们试着回到宽阔的交互摄像头模式,把摄像头从游戏者视觉模式脱离可以选择"Drop Camera at Player"选项(快捷键:Alt+Q)。现在你又是浮动在地面之上了。在这种视野之下,鼠标右键拖动仍然是环视四周,W,A,S,D键仍然是四处移动,但这是的镜头运动已经是摆脱了地心引力的随意移动了。你可以通过按Shift+1到7(参考Camera菜单)来改变摄像头的移动速度。试着从高处环顾一下地形。如果你走丢了,你可按Camera > Toggle Camera回到游戏者视觉模式。
注意:那个浮在天上的灰色正方形是游戏者的出生点。

地形编辑
酷!现在我们已经可以在场景中快速而自由地移动了,所以我们进入下一个环节:编辑我们自己的地形。把摄像头移动到游戏者出生处的附近,并选择Window > Terrain Editor。现在当你在屏幕中移动鼠标的时候,你会发现有一群有色的小正方形跟在它周围。那些小正方形是你能调整的地形的区域。在游戏者模型附近点击某处,并上下拖动鼠标你可以看到一个小土墩形状的。漂亮!如果你选择"Action"菜单,你可以看到你现在做的功能叫做"Adjust Height"(调节高度)。
默认的Brush (刷子)尺寸有点大,所以按"Ctrl+Z"来撤销我们的小山,并选择Brush > Size 5

About the author

Recent Blogs


#1
03/21/2007 (6:56 am)
What?
#2
03/21/2007 (7:20 am)
don't you get it... It's in 'chinses' :)
#3
03/21/2007 (7:37 am)
Its actually in chinese if you set your browser to Unicode 16, although it destroys the html doing that :)
#4
03/21/2007 (7:48 am)
Who said TGE can't torque in a foreign tongue ;0) (sorry, I had to do it!)
#5
03/21/2007 (8:38 am)
yeah.. GG website can't handle UTF stuff. Even Russian: привет всем (this is UTF-8)

Wubo, the TDN works fine with UTF encodings, so you better post your article there (in appropriate place) and change post here to show the link.
#6
03/21/2007 (9:42 am)
I don't even see the matrix anymore... I see blonde, brunette...
#7
03/21/2007 (11:43 am)
Chinese is not a language for those of you who actually care.... just and ethnic group.
#8
03/21/2007 (11:58 am)
Well said Wubo!
#9
03/21/2007 (12:12 pm)
Ok I thought this post will probably be deleted, so here is a stereotype translated version using a translator. I dont get what it is but still.
Quote:
Torque 1.5-Introduction Services way to welcome Torque to the world congratulate you buy our Torque game engine . The Education lead the way You see a Torque part of the base The function You also open done before a game starting point. The finish Directory, We have doing a simple 3D games! in As we enter the Torque world before , 2:00 note . In this Guide. When you see such as "Select File" Open Mission. " It means click File menu The "Open Mission" election items. As The position paper home, we assuming you Torque installed in the a hard disk Gen Catalog /Torque/SDK catalog. No. 2 o'clock, Guide is months addressed PC platform users. If you make Ping is the fruit system We strongly I suggest that you make by using two Key Mouse in addition to the use of Option Key replaced Ctrl键 operation . In addition, Applications documents in which Mac they are called "two 229 documents "We called here "enforceable text pieces. " start Page Torque/SDK/example Contents , you will Entitled found torqueDemo enforceable documents. When You operation torqueDemo time You will find is as follows start page That tops : The group plans AGI objective is to work and their files The quickest style. is the GUI Editor graphics production User Interface tool. World Editor is to create your game Tim world and Canada objects. Console is to provide links profession than words An interview and control game Engine feet this. In this Five Guide We will to explore and GUI World Editor, and we Liu rapidly in relation to what Console. As TDN, News, Docs and plans Forums hinge on Torque information network Links page . Tutorial is the Copies of this chain accept. Options let you Putin can be installed Graphic links and the voice of election items, such as Screen resolution rate or volume and so on. Finally , Exit like you imagine the , retreat out of the primers Steps. We In this Education not process depth Torque the Consol (Holding Taiwan's system). just let you know it what The hits icon, Consol window you can see primers Steps launched Some progress Cheng record. You not only It can be used text to be Feedback words, You can directly Then in words input boxes import orders , example son, the importation "quit (); "Of course, This life Order from the AGI. Wen game system to pieces for the Directory game , we need to create a new work - folders and through this Five papers Skimming through Document engine structure. In the standard AGI installation. Document game will be installed in Torque/SDK/example Contents China. In that You may Lane see Culture employing DEMO game castings. I the game will be used tutorial.base folder All the document, prevent the original in the folder Our parade they were damaged bad. on tutorail.base (Packet including it inside all the time :) document files perform backup , the text Backup Annex still trapped on the example Contents , both Dubbed "GameOne" This is what I the first Wen game castings. You The data show Kan on the list Torque is enforceable where documents about, Contents example, torqueDemo.exe enforceable documents, Of course when you Since publication like own game You can Any change you like name, the same torqueDemo catalog. married to the main.cs script file with a Text Editor device (if You have translated procedures used Compiler If not it is used The write Windows board) opened Torque/SDK/example/main.cs text pieces, we not here explained in detail Script, The document China will see which his party reads "$defaultGame =" tutorial.base "; . " It (the unity with the following 2) A divisions v. Torque engines Where can I We found its game He document. In this trip with "GameOne" replaced "tutorial.base" and preserve The script documents. Note Italy defaultGame is : - capitalization flu, and to ensure that the Game One has to capital letters beginning . When we The operation torqueDemo , it in the know Contents Richard GameOne We find the game resources . us into Head into the GameOne Lane recorded see , which opened directories you can see more feet This document and new Contents. I We will not mention and too many details, only about to visit the laid that Here feet The more Kai's game of information. client and server Contents games the script part (We will in the back see them ), data catalog including me We all Resource Files For example Die Type, texture Voice, and a few feet The direct processing resources Scripting. When the first Operation Torque, You will find Each one . cs papers 1. dso documents the corresponding ,. dso documents . cs documents in the translated version Since the engine re-editing action In your last After Operation turn over. cs-wen pieces. Now We have installed the We You show documents The tertiary entry when the engine waiting to return Subject to Torque/SDK/example recorded and running torqueDemo start One interface according to some graphics button at the top . us Learning World Editor device. We point World Editor button down . mobile when You click World Editor button You will find Floating its own In an action big game plate. This is the World Editor Ren default Treasury. in World Screen Editor right, you can see World Editor Inspector window We first it temporarily switched off, first choice Window "switch off World Editor They (fast McNair Key F2). Now, We started Terrain Editor , first using time familiar with Lane under Torque Mobile. tacit consent , as you is a field free movement The camera , to be replaced into the game As the first Kok links can be too Camera "Toggle Camera (fast McNair Key Alt+C) to bring now. press on Right Key Drive when You can ring As around, Key and let you W\A\S\D in the ground Left on right around Mobile. , This used Methods feeling In your when the game Designate is how Mobile, the happiest go around visited one action under. more cool functions of a third party The visual model - you Right to press on Key breakdown Tab键 to enter ( As map show). now in, I They tried to return to a wide Interactive video the first model, put camera from the game Visual Pattern from the can choice "Drop Camera at Player" option (Shortcut Key : Alt+Q). Now you it is floating in the above ground the. In this kind of routine , mouse Right Key Drive Central still As around, W, A, S, D is the key mobile , but Yun shot action is out of the way the gravitational center free movement the. You may to pass by Shift+1 to 7 (reference Camera menu) change camera The first movement speed. Examination From a height look around terrain. If You picked fruit , you by Camera "Toggle back Camera to the game Visual Pattern . attention : Floating in that The gray sky Color squares is the game point of birth . terrain Addendum Repertoire cool! now we have After in Scene Express speed and freedom moving the , I They go on to the next link Editor : I They own terrain. put camera shift started to game Department of birth in the vicinity and choosing Window "Terrain Editor. now When you SHIFTING screen The mouse action , you will be found a group of non-ferrous metals Small Square Fractal with it around. That small square You can shape adjusted to shaped region . in the game Bylaws were model A recent hits , and on Driving under control You can subscript see small cave shape like. Bleaching Liang! If your choice "Action" menu. You can see to you do function called "Adjust Height" (regulation Festival height). tacit Brush (Brush a) dimension points, which with the "Ctrl+Z" We removed The hill, Brush and choose "Size 5
#10
03/21/2007 (12:26 pm)
Yeah, I think I prefer the original version after attempting to read that ;0) Let's hope this doesn't catch on (at least until it's supported in this particular section of the site, otherwise resources could get a little tricky to follow!)
#11
03/21/2007 (10:16 pm)
Wudo,

[chinese on]

ni hao.

wo zai beijing. ru guo ni zai zhong guo,qing fa email (frank at darkhand-studio dot com) he wo lian xi,ran hou wo men kan kan shi fou ke yi he zuo, fen xiang wo men zhi shi.

shun bian shuo yi xia,wo de han yu bu hao,ru guo ni neng shuo ying yu zui hao.

[chinese off]
#12
03/23/2007 (6:37 am)
Quote:In that You may Lane see Culture employing DEMO game castings.

I can't even read the english version.