ゲームでの例とは? わかりやすく解説

ゲームでの例

出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2021/08/23 15:02 UTC 版)

Inform」の記事における「ゲームでの例」の解説

Informライブラリ使ったInformソースコードの例を以下に示す。Inform 6前提としている。Inform 7では全く文法異なるが、レガシーコードであることを示すよう修正加えればInform 7でも使用可能である。 Constant Story "Hello World"; Constant Headline "^An Interactive Example^"; Include "Parser"; Include "VerbLib"; [ Initialise; location = Living_Room; "Hello World"; ]; Object Kitchen "Kitchen"; Object Front_Door "Front Door"; Object Living_Room "Living Room" with description "A comfortably furnished living room.", n_to Kitchen, s_to Front_Door, has light; Object -> Salesman "insurance salesman" with name 'insurance' 'salesman' 'man', description "An insurance salesman in a tacky polyester suit. He seems eager to speak to you.", before [; Listen: move Insurance_Paperwork to player; "The salesman bores you with a discussion of life insurance policies. From his briefcase he pulls some paperwork which he hands to you."; ], has animate; Object -> -> Briefcase "briefcase" with name 'briefcase' 'case', description "A slightly worn, black briefcase.", has container; Object -> -> -> Insurance_Paperwork "insurance paperwork" with name 'paperwork' 'papers' 'insurance' 'documents' 'forms', description "Page after page of small legalese."; Include "Grammar";

※この「ゲームでの例」の解説は、「Inform」の解説の一部です。
「ゲームでの例」を含む「Inform」の記事については、「Inform」の概要を参照ください。


ゲームでの例

出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2021/08/23 15:02 UTC 版)

Inform」の記事における「ゲームでの例」の解説

以下は、上掲の "Hello World" の例をInform 7書いて実装したものである。Inform 7でのコンパイル自動的にリンクされる "The Standard Rules" というライブラリ使っている。 "Hello World" by "I.F. Author" The story headline is "An Interactive Example". The Living Room is a room. "A comfortably furnished living room."The Kitchen is north of the Living Room. The Front Door is southof the Living Room. The Front Door is a closed locked door. The insurance salesman is a man in the Living Room. Thedescription is "An insurance salesman in a tacky polyester suit.He seems eager to speak to you." Understand "man" as theinsurance salesman. A briefcase is carried by the insurance salesman. The descriptionis "A slightly worn, black briefcase." Understand "case" as thebriefcase. The insurance paperwork is in the briefcase. Thedescription is "Page after page of small legalese." Understand "papers" or "documents" or "forms" as the paperwork. Instead of listening to the insurance salesman: say "The salesman bores you with a discussion of life insurance policies. From his briefcase he pulls some paperwork which he hands to you."; now the player carries the insurance paperwork.

※この「ゲームでの例」の解説は、「Inform」の解説の一部です。
「ゲームでの例」を含む「Inform」の記事については、「Inform」の概要を参照ください。

ウィキペディア小見出し辞書の「ゲームでの例」の項目はプログラムで機械的に意味や本文を生成しているため、不適切な項目が含まれていることもあります。ご了承くださいませ。 お問い合わせ



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「ゲームでの例」の関連用語

1
10% |||||

2
4% |||||

ゲームでの例のお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ゲームでの例のページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
ウィキペディアウィキペディア
Text is available under GNU Free Documentation License (GFDL).
Weblio辞書に掲載されている「ウィキペディア小見出し辞書」の記事は、WikipediaのInform (改訂履歴)の記事を複製、再配布したものにあたり、GNU Free Documentation Licenseというライセンスの下で提供されています。

©2025 GRAS Group, Inc.RSS