摘要: Employing characters into your game is one of the most difficult jobs you’ll face.
Even at a basic level, the code needed to control gaming characters can be convoluting.
What’s a lowly programmer to do? Just take it slow, work from the begin-ning, and all will be well.
In this section, I introduce you to some basic concepts common to most roleplaying
games. These concepts include defining a character’s basic abilities (which
include strength, intelligence, agility, and
閱讀全文
摘要: 據(jù)說漢語編程打破了西方對(duì)計(jì)算機(jī)語言的壟斷,使中國(guó)人擁有了完全自主知識(shí)產(chǎn)權(quán)的程序設(shè)計(jì)語言。據(jù)說隨著漢語編程的興起,將極大地推動(dòng)中國(guó)信息化建設(shè)的進(jìn)程。據(jù)說漢語編程已經(jīng)得到了部分省市有關(guān)部門的大力支持,很快就會(huì)形成一門發(fā)展?jié)摿薮蟮漠a(chǎn)業(yè)。然而當(dāng)不少人在了解到漢語編程后,卻懷疑它不過是某些別有用心之人泡制的謊言。那么漢語編程究竟是一項(xiàng)劃時(shí)代的技術(shù)呢,還是一則經(jīng)不起任何推敲的的傳聞?
閱讀全文
摘要: A gaming world is nothing without players and monsters running around.
Nevertheless, creating them can be a little daunting at first. But don’t worry.
In this chapter, you can find the basic information you need to create characters
and give them a life of their own in your game—all in an easy-to-follow format.
In this chapter, you learn how to do the following:
閱讀全文
摘要: 嘗試記錄那些有著各種用途的物件,以及它們?cè)诮巧缪萦螒蛑兴鸬淖饔茫瑢⑹且粋€(gè)非常重要的設(shè)計(jì)因素。
在游戲的過程中,通常被限定選擇并不算多的物件,每個(gè)物件都有它們各自獨(dú)特的用途。創(chuàng)建游戲時(shí),每個(gè)物件都必須考慮到,它們都應(yīng)被設(shè)計(jì)為一個(gè)特定的用途。武器、盔甲、療傷藥,這些都需要明確定義,包括它們的形式和功能。
形式和功能,這兩個(gè)單詞說明了在物件定義中最重要的兩個(gè)方面。形式涉及了外觀和特征,即一個(gè)物體看上去像什么,感覺上是什么,它有多大,有多重等。功能則涉及到它們的用途,每個(gè)物件都有一個(gè)特定的用途,金錢可以購(gòu)買東西,刀劍可以用來攻擊,療傷藥可以用來治愈創(chuàng)傷。
閱讀全文
摘要: 本篇是游戲中物件的定義與使用(8)的續(xù)篇。
閱讀全文
摘要: Although developing a character’s inventory system might make you cringe at first,
let me reassure you that it’s not much different from developing a map inventory
control system. You have the ability to add and remove items, but you don’t have the
problem of dealing with the item coordinates on the map. Instead, a player’s ICS
keeps track of order, which means that players can rearrange the items as they see fit.
閱讀全文
摘要: 本篇是游戲中物件的定義與使用(6)的續(xù)篇。
閱讀全文
摘要: As their names suggest, this trio of functions loads, saves, and frees a list of items
that belong to a map. The first of the three, Load, loads and creates a list of items.
For simplicity, store all items in a text file, using the following format:
閱讀全文
摘要: 物件被分散在四處,玩家們找到這些物件只不過是一個(gè)時(shí)間問題。對(duì)于這種情況,玩家需要運(yùn)用一種方法去管理物件,包括使用物品清單控制系統(tǒng)(inventory control system,ICS)來進(jìn)行分類整理。
請(qǐng)不要誤解,一個(gè)ICS并不只適用于玩家,它同樣適用于整個(gè)游戲世界。物件可以屬于一張地圖,一個(gè)角色,甚至是另一個(gè)物件(例如背包,有一些其他的物件在它里面),那就意味著物件需要指定它的所有者(ownership)。除此之外,一個(gè)所有者可以擁有一個(gè)物件的多個(gè)實(shí)例(multiple instance),例如貨幣。
閱讀全文
摘要: 1.主板上有兩個(gè)IDE接口,最多可以安裝四個(gè)IDE設(shè)備。在安裝雙硬盤之前,必須先確定機(jī)箱中是否還有安裝第二個(gè)硬盤的位置及電源功率是否夠用。
2.如果將兩個(gè)硬盤分別安裝在兩條數(shù)據(jù)線上,最好都設(shè)置成主盤方式。如果受到條件限制而將兩個(gè)硬盤安裝在同一條數(shù)據(jù)線上時(shí),應(yīng)將兩個(gè)硬盤分別設(shè)置成主盤和從盤。在進(jìn)行主、從盤設(shè)置時(shí),可以參照以下兩種方法進(jìn)行:
閱讀全文