{"id":974,"date":"2019-02-20T12:00:55","date_gmt":"2019-02-20T12:00:55","guid":{"rendered":"https:\/\/castle-engine.io\/wp\/?p=974"},"modified":"2019-02-20T14:52:02","modified_gmt":"2019-02-20T14:52:02","slug":"sprite-demo-from-valter-buccina","status":"publish","type":"post","link":"https:\/\/castle-engine.io\/wp\/2019\/02\/20\/sprite-demo-from-valter-buccina\/","title":{"rendered":"Sprite Demo from Valter Buccina"},"content":{"rendered":"<table class=\"thumbnails thumbnails-align-right\"><tr><td>\n          <a href=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2019\/02\/DemoImg.jpg\"\n             class=\"screenshot\"\n             title=\"Sprite Demo\"><img loading=\"lazy\" decoding=\"async\"\n            style=\"float: right\"\n            src=\"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2019\/02\/DemoImg-200x342.jpg\"\n             width=\"200\" height=\"342\" \n            alt=\"Sprite Demo\"\n          ><\/a><\/td><\/tr><\/table>\n<p><em>Valter Buccina<\/em> made a demo application using sprites in <em>Castle Game Engine<\/em>.<\/p>\n<p>The demo is available on <a href=\"https:\/\/github.com\/valterb\/sprite-demo-castle-engine\">https:\/\/github.com\/valterb\/sprite-demo-castle-engine<\/a>.<\/p>\n<p>Citing from the README:<\/p>\n<p>Demo is divided into two parts:<\/p>\n<ol>\n<li>Goniometer<\/li>\n<li>Road demo<\/li>\n<\/ol>\n<p>The first shows with extreme precision the direction of the sprite in degrees. Using mouse click coordinates and Player position we apply the arctangent formula and convert the value obtained in degrees. This way we get the requested direction.<\/p>\n<p>The second one is a demo with a road background where you can move the sprite that is sized according to the distance from the observation point. One click to walk, double click to run. Run animation is divided into three actions, short initial walk, run, short final walk but it is not perfect.<\/p>\n<p>See the <a href=\"https:\/\/sourceforge.net\/p\/castle-engine\/discussion\/general\/thread\/0aca91fdd8\/\">forum post<\/a> for details. (This post was on an old forum &#8212; please use <a href=\"https:\/\/forum.castle-engine.io\/\">new forum<\/a> for comments.)<\/p>\n<p>Thank you!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Valter Buccina made a demo application using sprites in Castle Game Engine. The demo is available on https:\/\/github.com\/valterb\/sprite-demo-castle-engine. Citing from the README: Demo is divided into two parts: Goniometer Road demo The first shows with extreme precision the direction of the sprite in degrees. Using mouse click coordinates and Player position we apply the arctangent &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/castle-engine.io\/wp\/2019\/02\/20\/sprite-demo-from-valter-buccina\/\" class=\"more-link\">Continue reading  \u27a4<span class=\"screen-reader-text\"> &#8220;Sprite Demo from Valter Buccina&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":976,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"publish_to_discourse":"0","publish_post_category":"9","wpdc_auto_publish_overridden":"","wpdc_topic_tags":"","wpdc_pin_topic":"","wpdc_pin_until":"","discourse_post_id":"146","discourse_permalink":"https:\/\/forum.castle-engine.io\/t\/sprite-demo-from-valter-buccina\/47","wpdc_publishing_response":"","wpdc_publishing_error":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-974","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/castle-engine.io\/wp\/wp-content\/uploads\/2019\/02\/DemoImg.jpg","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9IgYW-fI","jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/posts\/974","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/comments?post=974"}],"version-history":[{"count":5,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/posts\/974\/revisions"}],"predecessor-version":[{"id":1007,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/posts\/974\/revisions\/1007"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/media\/976"}],"wp:attachment":[{"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/media?parent=974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/categories?post=974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/castle-engine.io\/wp\/wp-json\/wp\/v2\/tags?post=974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}