{"id":229,"date":"2010-05-22T21:12:24","date_gmt":"2010-05-23T04:12:24","guid":{"rendered":"http:\/\/www.legendofeuterra.com\/devblog\/?p=229"},"modified":"2010-05-22T21:22:28","modified_gmt":"2010-05-23T04:22:28","slug":"an-interactive-game-world-at-last","status":"publish","type":"post","link":"https:\/\/www.shadowdawngenesis.com\/devblog\/?p=229","title":{"rendered":"An interactive game world at last"},"content":{"rendered":"<figure id=\"attachment_230\" aria-describedby=\"caption-attachment-230\" style=\"width: 300px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.legendofeuterra.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37a.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-230\" title=\"screenshot37a\" src=\"http:\/\/www.legendofeuterra.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37a-300x168.jpg\" alt=\"Arashi sees a bucket\" width=\"300\" height=\"168\" srcset=\"https:\/\/www.shadowdawngenesis.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37a-300x168.jpg 300w, https:\/\/www.shadowdawngenesis.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37a-1024x576.jpg 1024w, https:\/\/www.shadowdawngenesis.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37a.jpg 1280w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-230\" class=\"wp-caption-text\">Arashi and Ket wonder how they missed this bucket in their camp after so long<\/figcaption><\/figure>\n<p>This is it, the big one.<\/p>\n<p>I finally added the functionality that allows Arashi to use one item on another item.\u00a0 This was a multi-tiered effort, as it started on the ground level by adding code when the player presses the B button (the default button to use abilities and items).<\/p>\n<p>For the base example, here we have an empty bucket found lying around the Kinshutai campsite.\u00a0 Arashi decides to pick it up, naturally, since no RPG is without encouraging kleptomania.<\/p>\n<figure id=\"attachment_231\" aria-describedby=\"caption-attachment-231\" style=\"width: 300px\" class=\"wp-caption alignright\"><a href=\"http:\/\/www.legendofeuterra.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37b.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-231\" title=\"screenshot37b\" src=\"http:\/\/www.legendofeuterra.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37b-300x168.jpg\" alt=\"Arashi obtains a bucket\" width=\"300\" height=\"168\" srcset=\"https:\/\/www.shadowdawngenesis.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37b-300x168.jpg 300w, https:\/\/www.shadowdawngenesis.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37b-1024x576.jpg 1024w, https:\/\/www.shadowdawngenesis.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37b.jpg 1280w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-231\" class=\"wp-caption-text\">Arashi decides to pick up the bucket<\/figcaption><\/figure>\n<p>Now this is just one option, but since I don&#8217;t want to post a million screenshots I&#8217;ll have to explain that you as the player are also more than capable of simply carrying the item you want to use rather than adding it to your inventory.\u00a0 That functionality is more of a direct method to interact with the world, and either way is totally valid.\u00a0 Use whatever you think is easiest \ud83d\ude42<\/p>\n<p>Now, what good is an empty bucket?\u00a0 We can equip it, but it doesn&#8217;t really have any uses aside from taking up space on its own.\u00a0<\/p>\n<figure id=\"attachment_232\" aria-describedby=\"caption-attachment-232\" style=\"width: 300px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.legendofeuterra.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37c.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-232\" title=\"screenshot37c\" src=\"http:\/\/www.legendofeuterra.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37c-300x168.jpg\" alt=\"The bucket, sadly, gives Arashi no bonus stats\" width=\"300\" height=\"168\" srcset=\"https:\/\/www.shadowdawngenesis.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37c-300x168.jpg 300w, https:\/\/www.shadowdawngenesis.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37c-1024x576.jpg 1024w, https:\/\/www.shadowdawngenesis.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37c.jpg 1280w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-232\" class=\"wp-caption-text\">The bucket, sadly, does not give Arashi any bonus stats<\/figcaption><\/figure>\n<p>Keep in mind that no item is truly useless; at the very least, you can sell off &#8220;junk&#8221; for some silver to buy things with.\u00a0 What sort of things?\u00a0 Well that&#8217;s for a later update, but keep in mind junk isn&#8217;t necessarily without merit even aside from its base silver value.<\/p>\n<p>Now with bucket in hand and readied in the special item slot, Arashi goes to find something that gives the bucket meaning in life.<\/p>\n<figure id=\"attachment_233\" aria-describedby=\"caption-attachment-233\" style=\"width: 300px\" class=\"wp-caption alignright\"><a href=\"http:\/\/www.legendofeuterra.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37d.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-233\" title=\"screenshot37d\" src=\"http:\/\/www.legendofeuterra.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37d-300x168.jpg\" alt=\"Arashi finds a conveniently temporary pool of water\" width=\"300\" height=\"168\" srcset=\"https:\/\/www.shadowdawngenesis.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37d-300x168.jpg 300w, https:\/\/www.shadowdawngenesis.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37d-1024x576.jpg 1024w, https:\/\/www.shadowdawngenesis.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37d.jpg 1280w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-233\" class=\"wp-caption-text\">Arashi finds a conveniently temporary pool of water<\/figcaption><\/figure>\n<p>And she does a little bit to the north.\u00a0 Since I needed to test the functionality I didn&#8217;t really take the time to make the new water graphics, so reusing the old temporary pond I gave it the attribute of &#8220;water&#8221;.\u00a0 By pressing the B Button (since the bucket is the active special item) while facing the pond, Arashi promptly fills the bucket with the water in one fell swoop.\u00a0 Note I am using interactions like this as &#8220;keys&#8221; so to speak.\u00a0 Both the bucket and the pond share the key &#8220;water&#8221;, and if two items with the same key are used in tandem, they will each execute the script on each item linked to that key.\u00a0 So, I can add the &#8220;water&#8221; key to just about any object, and if I use the empty bucket on any item that has a water key, then it will fill up with water.\u00a0 This is just a basic example of interaction.<\/p>\n<figure id=\"attachment_234\" aria-describedby=\"caption-attachment-234\" style=\"width: 300px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.legendofeuterra.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37e.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-234\" title=\"screenshot37e\" src=\"http:\/\/www.legendofeuterra.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37e-300x168.jpg\" alt=\"The bucket is now full of water, it even tells us so\" width=\"300\" height=\"168\" srcset=\"https:\/\/www.shadowdawngenesis.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37e-300x168.jpg 300w, https:\/\/www.shadowdawngenesis.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37e-1024x576.jpg 1024w, https:\/\/www.shadowdawngenesis.com\/devblog\/wp-content\/upLoads\/2010\/05\/screenshot37e.jpg 1280w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-234\" class=\"wp-caption-text\">The bucket is full of water, as it clearly says here<\/figcaption><\/figure>\n<p>And here we can see the bucket has changed entirely to accomodate the fact that it is now a bucket of water.<\/p>\n<p>This means it has its own scripts when used normally, and has its own &#8220;keys&#8221; to interact with other items.\u00a0 In this case, it now has the key &#8220;fire&#8221;, to interact with objects that also has the key &#8220;fire&#8221;.\u00a0 The bucket itself will empty out when used on a &#8220;fire&#8221;, while the &#8220;fire&#8221; item will (most likely) morph into an item that has had its fire put out.\u00a0 There can be several keys on every item for even deeper interactions.<\/p>\n<p>I am really quite proud of this bit of programming, as it took awhile to sit down and do it.\u00a0 I hope that it really gives the game world much needed depth \ud83d\ude42<\/p>\n<div name=\"googleone_share_1\" style=\"position:relative;z-index:5;float: right; margin-left: 10px;\"><g:plusone size=\"tall\" count=\"1\" href=\"https:\/\/www.shadowdawngenesis.com\/devblog\/?p=229\"><\/g:plusone><\/div>","protected":false},"excerpt":{"rendered":"<p>This is it, the big one. I finally added the functionality that allows Arashi to use one item on another item.\u00a0 This was a multi-tiered<a class=\"moretag\" href=\"https:\/\/www.shadowdawngenesis.com\/devblog\/?p=229\"> [&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[39,21,22,25,10,32,29,38,7,6,18,83,82,13,71,70,26,72,17,309,37,4,30,36,15,33,67],"class_list":["post-229","post","type-post","status-publish","format-standard","hentry","category-game-development","tag-2d-animation","tag-action","tag-adventure","tag-arashi","tag-art","tag-artificial-intelligence","tag-collision","tag-controls","tag-development","tag-game","tag-independent","tag-interaction","tag-interactivity","tag-jrpg","tag-ket","tag-lighting","tag-map","tag-menus","tag-pc","tag-rpg","tag-scripting","tag-shadowdawn","tag-shadows","tag-usecode","tag-xbox-360","tag-xbox-live","tag-xna"],"_links":{"self":[{"href":"https:\/\/www.shadowdawngenesis.com\/devblog\/index.php?rest_route=\/wp\/v2\/posts\/229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shadowdawngenesis.com\/devblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shadowdawngenesis.com\/devblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shadowdawngenesis.com\/devblog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shadowdawngenesis.com\/devblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=229"}],"version-history":[{"count":0,"href":"https:\/\/www.shadowdawngenesis.com\/devblog\/index.php?rest_route=\/wp\/v2\/posts\/229\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shadowdawngenesis.com\/devblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shadowdawngenesis.com\/devblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shadowdawngenesis.com\/devblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}