• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            天行健 君子當自強而不息

            游戲中物件的定義與使用(1)


            嘗試記錄那些有著各種用途的物件,以及它們在角色扮演游戲中所起的作用,將是一個非常重要的設計因素。

            在游戲的過程中,通常被限定選擇并不算多的物件,每個物件都有它們各自獨特的用途。創建游戲時,每個物件都必須考慮到,它們都應被設計為一個特定的用途。武器、盔甲、療傷藥, 這些都需要明確定義,包括它們的形式和功能。

            形式和功能,這兩個單詞說明了在物件定義中最重要的兩個方面。形式涉及了外觀和特征,即一個物體看上去像什么,感覺上是什么,它有多大,有多重等。功能則涉及到它們的用途,每個物件都有一個特定的用途,金錢可以購買東西,刀劍可以用來攻擊,療傷藥可以用來治愈創傷。

             

            物件的形式

            盡管對我們來說,在視覺上認識一個物體十分重要,但對計算機而言卻毫無意義,它們只不過是使用某個圖像或三維模型所表示的物體。假設想要創建一把武器,更確切的說是一把劍,在一個三維游戲中,希望玩家們能夠看到游戲中角色手握著的寶劍,而且能夠隨距離接近而放大。另外,為了顯示出已裝備的武器,還希望在屏幕上顯示一把寶劍的位圖。其實只需要一個網格模型和一張位圖(如下圖所示)就可以表示寶劍。

             

            定義物件的功能

            If you were to hand an object to a child (or to anyone for that matter), the child
            would be able to find some use for it, even if it’s not the correct use. Although it
            might be great to be able to do all kinds of things with objects in a game, that just
            will not do for your purposes. The items (objects) in your game
            will be used for specific purposes, which can be in one of the following categories
            (note that the list is not comprehensive, but is a starting place for ideas):

            ■ Accessory. Rings, necklaces, belts, and any other form of wearable equipment
            that can aid an adventurer are classified as accessories. Sometimes an accessory
            is a magical piece of equipment that helps boost the abilities of the wearer.


            ■ Armor. Taking a blow is nothing—if you’re wearing the proper protection,
            that is. Armor can be any form of protective gear, from a full suit of armor to
            a pair of boots.


            ■ Collection. Any item that doesn’t serve an actual purpose is considered to be
            a collection piece. These can be items that are important to the game story
            in some way or that really have no definitive use. Items such as a picture,
            small ornamental figurine, or chair are considered collection items.


            ■ Edible. Clam cakes, clam pies, clam alamode, creamed clam, or BBQ clam—
            whatever your fancy. Your gaming denizens are bound to get hungry, and
            whatever they can find and consume is classified as edible, even potions and
            herbs.


            ■ Money. Everybody deals with the big M, no matter what form it takes—coins,
            bills, clam shells, and so on. Games do not require denominations—one gold
            coin is as good as the next, and the more coins you have, the better.


            ■ Transportation. Whether by bus, boat, plane, or hang glider, people sure
            know how to get around, and items that can transport belong to characters
            in the game. A boat can’t be lugged around, but your game recognizes a
            character as the item’s owner by noting so in the character’s inventory.


            ■ Weapon. Whether it’s a sword, rock, or piece of lint, some things are just
            more suitable for dealing out damage.


            ■ Other. Anything that doesn’t fit into the preceding categories is considered
            “other.”

            游戲引擎根據物件的類別來確定每個物件能夠做些什么。例如,武器可以被裝備,而食物可以被消費。可以在需要的時候添加每個物件的子類,以便可以使物件的分配更容易。

             

            武器

            武器所產生的破壞程度由一個數值來衡量,稱之為攻擊指數(attack modifier);越高的數值,就意味著武器擁有更大的破壞力。同時,一些武器能夠更輕巧地揮舞,所以就能夠給對手更快頻率的有效打擊。為了衡量一件武器攻擊目標的有效性,使用了命中指數(to-hit modifier);更高數值的武器,就意味著角色命中敵人的幾率越大。

            一些武器也可以被歸類到指定的分組中,稱之為武器組合(weapon groups)。某些武器能夠比另外的武器發揮更大的破壞力,例如使用一把附上烈火法術的寶劍去對付冰魔。

            武器也可以被歸類到子類中,例如近身格斗類和遠程攻擊類。無論什么類型,每件武器都有一個有效攻擊范圍。劍可以正面攻擊目標,而一把弩可以擊中40英尺外的目標。除此之外,武器還可以一次攻擊多個目標。

            Armor

            The more protection, the better, and in your game every little piece of armor
            helps. Armor helps add resistance to damage. This resistance amount is called the
            defense modifier. Just like weapons, armor has special uses and usage restrictions and
            belongs to armor groups.
            Armor can be split into multiple subcategories, such as helmets, chest and
            abdomen protection, leggings, boots, gloves, and so on.

            Accessories

            As mentioned earlier, accessories usually have a specific use. A magic ring can be
            worn to gain the ability to become invisible. This ability might always be in use
            once the ring is donned, or it may have to be activated. Accessories can also act like
            armor; they can increase the resistance to some aspect of the game—for example,
            making it harder for the wearer to be poisoned.

            Edibles

            Edible items usually come in a few flavors (pun intended). Food items sustain life,
            healing items increase health, and poisonous items decrease health. Again, special
            uses are in effect, but because there are few uses for edible items, you can hardcode
            those into your game engine.

            Collections

            A collectable object is usually docile; it’s needed only for some small aspect of the
            game. For example, if a character gives you a picture of himself to deliver to a girl
            in a neighboring town (and for no other purpose), the picture is considered a collection
            item. Collection items simply move some part of the game story forward.
            Perhaps the character delivering the picture will receive, in turn, a special item
            from the girl in the next town.

            Transportation

            Getting around on foot is slow and tiring, so other forms of transportation might
            be needed. The purpose of transportation items is to change the way the characters
            move around (typically around the map). Transportation can also open up new areas
            in the game that were previously not accessible. For instance, your character’s newly
            acquired boat can now be used to sail across the lake to an isolated island, or maybe
            that horse you saw in a nearby town will help you cross a barren desert safely.

            Others

            “Other” items are pretty much useless because they don’t have a defined use.
            However, don’t throw them out. At the least, they can perform some type of action
            as defined by the engine. For instance, depending on how well you do in combat,
            your character could be awarded medals. While these medals are cool to look at,
            they serve no purpose in the game.


            posted on 2007-11-05 23:23 lovedday 閱讀(579) 評論(0)  編輯 收藏 引用

            公告

            導航

            統計

            常用鏈接

            隨筆分類(178)

            3D游戲編程相關鏈接

            搜索

            最新評論

            久久人人爽人人爽人人av东京热| 久久久久久精品免费免费自慰| 久久精品国产乱子伦| 国产午夜精品理论片久久| 伊人丁香狠狠色综合久久| 成人久久精品一区二区三区| 精品国产乱码久久久久久1区2区| 国产精品无码久久综合| 亚洲一区中文字幕久久| 久久精品一区二区三区中文字幕| 欧美激情精品久久久久久久| 7777精品伊人久久久大香线蕉| 精品久久久无码人妻中文字幕 | 人妻无码精品久久亚瑟影视 | 狠狠色婷婷久久综合频道日韩| 亚洲国产成人久久一区久久| 久久99久久99精品免视看动漫| 99久久精品免费观看国产| 日本亚洲色大成网站WWW久久 | 亚洲AV无码一区东京热久久| 东方aⅴ免费观看久久av| 麻豆一区二区99久久久久| 久久久久亚洲AV无码专区体验| 久久一本综合| 日产精品久久久久久久| 国产成人无码精品久久久免费 | 国产精品免费看久久久 | 久久久久人妻一区精品果冻| 99久久无色码中文字幕人妻| 香港aa三级久久三级| 久久综合九色综合网站| 国产精品九九久久精品女同亚洲欧美日韩综合区| 久久免费香蕉视频| 久久久久中文字幕| 久久99国产精品久久久| 精品国产乱码久久久久久人妻| 国产精品日韩深夜福利久久| 久久99久久99小草精品免视看| 久久久亚洲裙底偷窥综合 | 尹人香蕉久久99天天拍| 99久久国产热无码精品免费久久久久 |