天行健 君子当自强而不息

     摘要: The player interacts with The Tower by using the keyboard and mouse. When working
in the main menu (see following snap), the player uses the mouse to select an
option. The options available on the main menu are as follows:  阅读全文
posted @ 2007-12-28 19:45 lovedday 阅读(287) | 评论 (0)编辑 收藏
     摘要: You control all The Tower’s game content, such as dialogue, through the use of scripts.
The Mad Lib Script system is in use here. A single action template, Game.mla,
contains a number of actions that will be useful in your project. More than 200 lines
in length, the game’s action template is a little too long to list here, so I highly suggest
that you open the action template while reading through this section.  阅读全文
posted @ 2007-12-28 18:48 lovedday 阅读(292) | 评论 (0)编辑 收藏
     摘要: During the design of the sample game, it is necessary to assign each character a
unique identification number. For example, the player is assigned the identification
#0, whereas the village elder uses the identification #1. By assigning these
identification numbers, the script engine knows which characters to use for performing
certain actions, such as displaying dialogue or tracking flags in order to
alter in–game-play. These pre-assigned identification numbers are as follow  阅读全文
posted @ 2007-12-28 18:20 lovedday 阅读(254) | 评论 (0)编辑 收藏
     摘要: Including the player of the game, a total of eight types of characters are in The Tower
(with the game using multiple instances of those types of characters). Table 20.1
defines those eight types of characters. To understand those definitions, use the
following legend:  阅读全文
posted @ 2007-12-28 17:51 lovedday 阅读(191) | 评论 (0)编辑 收藏
     摘要: The story in the preceding section helps to set the mood for "The rooad of warrior" and provides
a way for the player to be in a small village located by a dark, ominous tower. The
purpose of the player of "The rooad of warrior" is to free a cursed village from the evil demons
that inhabit the nearby tower. It turns out that the inhabitants of the village are forever
trapped, only to be sacrificed one by one to the tower’s evil demon lord. It is the
job of the player to go in  阅读全文
posted @ 2007-12-28 17:04 lovedday 阅读(226) | 评论 (0)编辑 收藏
     摘要: Now comes the time to commence creating the book’s sample game—"The rooad of warrior".
The game does put together all the gaming
pieces you need to complete a game. The purpose of "The rooad of warrior" is to show every
component in its proper place, including tech engines, map and level management,
character control, and scripting.  阅读全文
posted @ 2007-12-28 15:09 lovedday 阅读(419) | 评论 (0)编辑 收藏

posted @ 2007-12-25 13:42 lovedday 阅读(218) | 评论 (0)编辑 收藏
     摘要: 测试结果:

string array: times - 10000 memory - 1740k VM - 828k
static char array: times - 10000 memory - 1740k VM - 820k
char* array: times - 10000 memory - 2292k VM - 1368k
string vector: times - 10000 memory - 1752k VM - 828k
char* vector: times - 10000 memory - 2340k VM - 1420k

可以看出,使用string以及vector或者静态分配数组,内存消耗是比较少的,多次new小内存导致内存消耗明显增多。  阅读全文
posted @ 2007-12-22 19:45 lovedday 阅读(2543) | 评论 (4)编辑 收藏
     摘要: 今人有言,步入中年以后,有三大乐事:升官、发财、死老婆。最后一乐得大意指中年丧妻正好可以再找个小的,省了离婚的麻烦,有人说这是学了老祖宗庄子。在中国,妇孺老幼、贩夫走卒都知道庄子妻死之后其鼓盆而歌的故事。这段故事有两个版本,一个是《庄子 至乐篇》中的记载,一个是冯梦龙《警世通言》第二卷的《庄子休鼓盆得大道》。  阅读全文
posted @ 2007-12-21 01:04 lovedday 阅读(487) | 评论 (3)编辑 收藏
     摘要: Although beating down the endless hordes of evil and saving countless worlds is
interesting enough to rob you of precious sleep, it can get pretty boring after a
while. No matter how hard we try, game developers just can’t nail down the intrigue
and challenge of human intelligence that gamers want in virtual opponents.  阅读全文
posted @ 2007-12-19 17:55 lovedday 阅读(500) | 评论 (0)编辑 收藏
仅列出标题
共136页: First 35 36 37 38 39 40 41 42 43 Last 

公告

导航

统计

常用链接

随笔分类(178)

3D游戏编程相关链接

搜索

最新评论