天行健 君子当自强而不息

     摘要: Script processing controls the entire game's content. The content includes adding
characters to the maps, displaying dialogue, and other functions not hard-coded
into the game engine.  阅读全文
posted @ 2007-12-30 15:07 lovedday 阅读(474) | 评论 (0)编辑 收藏
     摘要: Previously you read about how the barter_frame state is used to render the bartering
scene in which the player can buy items from a character.  阅读全文
posted @ 2007-12-30 14:26 lovedday 阅读(312) | 评论 (0)编辑 收藏
     摘要: The characters are the heart and soul of your game.

You derive the character controller in order to
control the player of the game and to collision-check a character's movements
against the maps. For The Tower, you can use a derived character controller,
to manage all your game's characters. The first step to
using the character controller in a game is to derive your own class from cCharController:  阅读全文
posted @ 2007-12-30 00:24 lovedday 阅读(310) | 评论 (0)编辑 收藏
     摘要: The sample game is divided into five maps (scenes). Each scene uses six bitmaps,
each of which is loaded as textures that are drawn to the display for each frame.
The game also uses an underlying simplified mesh for each scene. These simplified
meshes aid in properly drawing the 3D characters that inhabit each scene.  阅读全文
posted @ 2007-12-29 23:22 lovedday 阅读(242) | 评论 (0)编辑 收藏
     摘要: You use the status_frame function to display the player's statistics (health points,
mana points, known spells, and so on) when the player's status window is displayed.
This function handles equipping items and checking on the player's statistics.  阅读全文
posted @ 2007-12-29 22:44 lovedday 阅读(291) | 评论 (0)编辑 收藏
     摘要: Because this is a frame state, you can call the game_frame function for one of three
purposes—the state being initialized, the frame being processed, and the state
being shut down. The game_frame function uses only the update-frame purpose, so
processing is returned if any other calling purpose is used.  阅读全文
posted @ 2007-12-29 22:24 lovedday 阅读(434) | 评论 (0)编辑 收藏
     摘要: I developed the sample game to use state-based processing in order to effectively
use the application class's processing structure. The game uses these four states:  阅读全文
posted @ 2007-12-29 21:22 lovedday 阅读(228) | 评论 (0)编辑 收藏
     摘要: As the starting point of the game, the init function initializes the system (including
the graphics, sound, and input systems), sets up the character and spell controllers,
loads the master item list, pushes the main menu state, and carries out a few miscellaneous
functions. Take a look at the Init function piece by piece to see what’s
going on:  阅读全文
posted @ 2007-12-29 21:04 lovedday 阅读(250) | 评论 (0)编辑 收藏
     摘要: The main application is relatively small (if you can call just under 1,500 lines of
code small). It has the job of initializing all the required components and tracking
the game state (that’s right, state-based processing is even used here).  阅读全文
posted @ 2007-12-29 20:45 lovedday 阅读(217) | 评论 (0)编辑 收藏
     摘要: The game design is relatively simple. The majority of the work is assembling all the
pieces so that they work together. Imagine a game split into its major components,
much as illustrated in Figure 20.7. Now, you just need to amass those components into a useable form.  阅读全文
posted @ 2007-12-29 19:14 lovedday 阅读(222) | 评论 (0)编辑 收藏
仅列出标题
共136页: First 34 35 36 37 38 39 40 41 42 Last 

公告

导航

统计

常用链接

随笔分类(178)

3D游戏编程相关链接

搜索

最新评论