Deprecated: Creation of dynamic property wpdb::$categories is deprecated in /home/atzok/atzok.com/wp-includes/wp-db.php on line 760

Deprecated: Creation of dynamic property wpdb::$post2cat is deprecated in /home/atzok/atzok.com/wp-includes/wp-db.php on line 760

Deprecated: Creation of dynamic property wpdb::$link2cat is deprecated in /home/atzok/atzok.com/wp-includes/wp-db.php on line 760

Deprecated: Creation of dynamic property Yoast\WP\SEO\Main::$helpers is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/lib/abstract-main.php on line 65

Deprecated: Creation of dynamic property WP_Block_Type::$skip_inner_blocks is deprecated in /home/atzok/atzok.com/wp-includes/class-wp-block-type.php on line 357

Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/conditionals/third-party/elementor-edit-conditional.php on line 22

Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/conditionals/third-party/elementor-edit-conditional.php on line 28

Deprecated: Creation of dynamic property Yoast\WP\SEO\Helpers\Import_Cursor_Helper::$options is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/helpers/import-cursor-helper.php on line 19

Warning: Cannot modify header information - headers already sent by (output started at /home/atzok/atzok.com/wp-includes/wp-db.php:760) in /home/atzok/atzok.com/wp-includes/rest-api/class-wp-rest-server.php on line 1719

Warning: Cannot modify header information - headers already sent by (output started at /home/atzok/atzok.com/wp-includes/wp-db.php:760) in /home/atzok/atzok.com/wp-includes/rest-api/class-wp-rest-server.php on line 1719

Warning: Cannot modify header information - headers already sent by (output started at /home/atzok/atzok.com/wp-includes/wp-db.php:760) in /home/atzok/atzok.com/wp-includes/rest-api/class-wp-rest-server.php on line 1719

Warning: Cannot modify header information - headers already sent by (output started at /home/atzok/atzok.com/wp-includes/wp-db.php:760) in /home/atzok/atzok.com/wp-includes/rest-api/class-wp-rest-server.php on line 1719

Warning: Cannot modify header information - headers already sent by (output started at /home/atzok/atzok.com/wp-includes/wp-db.php:760) in /home/atzok/atzok.com/wp-includes/rest-api/class-wp-rest-server.php on line 1719

Warning: Cannot modify header information - headers already sent by (output started at /home/atzok/atzok.com/wp-includes/wp-db.php:760) in /home/atzok/atzok.com/wp-includes/rest-api/class-wp-rest-server.php on line 1719

Deprecated: Creation of dynamic property Yoast\WP\SEO\Surfaces\Classes_Surface::$container is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/surfaces/classes-surface.php on line 20

Deprecated: Creation of dynamic property Yoast\WP\SEO\Main::$classes is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/lib/abstract-main.php on line 65

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$page_type is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 43

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$page_type is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 43

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$title is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$source is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Presentation::$title is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Presentation::$source is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$meta_description is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$robots is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$canonical is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$rel_prev is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$rel_next is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$open_graph_locale is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$open_graph_type is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$open_graph_title is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$open_graph_description is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$open_graph_url is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$wordpress_site_name is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$open_graph_site_name is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$company_name is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$site_represents is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$open_graph_publisher is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$open_graph_article_publisher is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$open_graph_article_author is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$open_graph_article_published_time is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$open_graph_article_modified_time is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$open_graph_enabled is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$open_graph_image_id is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$open_graph_image is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$open_graph_images is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$twitter_card is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$twitter_card is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$twitter_title is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$twitter_description is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$twitter_image is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$twitter_creator is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$twitter_site is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$estimated_reading_time_minutes is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$canonical is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$main_schema_id is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$site_url is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$schema_article_type is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$site_name is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$site_represents_reference is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$id is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$main_image_id is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$main_image_url is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$schema_page_type is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$title is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$has_image is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Context\Meta_Tags_Context::$description is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$breadcrumbs is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/generators/schema-generator.php on line 185

Deprecated: Creation of dynamic property Yoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation::$schema is deprecated in /home/atzok/atzok.com/wp-content/plugins/wordpress-seo/src/presentations/abstract-presentation.php on line 64

Warning: Cannot modify header information - headers already sent by (output started at /home/atzok/atzok.com/wp-includes/wp-db.php:760) in /home/atzok/atzok.com/wp-includes/rest-api/class-wp-rest-server.php on line 1719

Warning: Cannot modify header information - headers already sent by (output started at /home/atzok/atzok.com/wp-includes/wp-db.php:760) in /home/atzok/atzok.com/wp-includes/rest-api/class-wp-rest-server.php on line 1719
{"id":6,"date":"2009-07-17T14:19:41","date_gmt":"2009-07-17T14:19:41","guid":{"rendered":""},"modified":"2016-04-14T22:20:27","modified_gmt":"2016-04-14T22:20:27","slug":"isometric-coordinate-algorithms","status":"publish","type":"post","link":"https:\/\/www.atzok.com\/2009\/07\/17\/isometric-coordinate-algorithms\/","title":{"rendered":"Isometric Coordinate Algorithms"},"content":{"rendered":"

Just thought I’d share the final functions I settled on for isometric coordinate calculations. Unlike most of the others I’ve seen around the web, these account for:
\n* Origin offset
\n* Tile-based position offset
\n* Varied scale
\n* Any aspect ratio (not just 2:1)
\n<\/p>\n

    def GetScreenPositionForTile(self, map_pos, view, origin, offset, delta=None):\r\n        if self.projection == Layer.Projections.BirdsEye:\r\n            screen_x = origin[0] + map_pos[0] * self.tile_width\r\n            screen_y = origin[1] + map_pos[1] * self.tile_height\r\n            \r\n            if delta is not None:\r\n                screen_x += delta[0]\r\n                screen_y += delta[1]\r\n        elif self.projection == Layer.Projections.Isometric:\r\n            map_pos = (map_pos[0] - offset[0] \/ self.scale, map_pos[1] - offset[1] \/ self.scale)\r\n            screen_x = origin[0] - (map_pos[1] * self.tile_width \/ 2) + (map_pos[0] * self.tile_width \/ 2) - (self.tile_width \/ 2)\r\n            screen_y = origin[1] + (map_pos[1] * self.tile_height \/ 2) + (map_pos[0] * self.tile_height \/ 2)\r\n            \r\n            if delta is not None:\r\n                iso_delta_x = (delta[0] - delta[1]) \/ 2 * self.tile_aspect\r\n                iso_delta_y = (delta[1] \/ 2) + (delta[0] \/ 2)\r\n                \r\n                screen_x += iso_delta_x\r\n                screen_y += iso_delta_y\r\n        \r\n        return screen_x, screen_y\r\n<\/pre>\n

 <\/p>\n

    def GetTileAtScreenPosition(self, screen_pos, view, offset):\r\n        origin_x, origin_y = self.GetOrigin(view)\r\n        map_x_screen = screen_pos[0] - origin_x\r\n        map_y_screen = screen_pos[1] - origin_y\r\n        \r\n        if self.projection == Layer.Projections.BirdsEye:\r\n            map_x = map_x_screen \/ self.tile_width\r\n            map_y = map_y_screen \/ self.tile_height\r\n            map_delta_x = map_x_screen % self.tile_width\r\n            map_delta_y = map_y_screen % self.tile_height\r\n        elif self.projection == Layer.Projections.Isometric:\r\n            map_x_raw = map_y_screen + int(map_x_screen \/ self.tile_aspect)\r\n            map_y_raw = map_y_screen - int(map_x_screen \/ self.tile_aspect)\r\n            \r\n            map_x = map_x_raw \/ self.tile_height\r\n            map_y = map_y_raw \/ self.tile_height\r\n            \r\n            map_delta_x = map_x_raw % self.tile_height\r\n            map_delta_y = map_y_raw % self.tile_height\r\n            \r\n            map_x += offset[0] \/ self.scale\r\n            map_y += offset[1] \/ self.scale\r\n        \r\n        return map_x, map_y, map_delta_x, map_delta_y\r\n<\/pre>\n

I could comment the code better of course, but I think it’s actually pretty straightforward and self-explanatory.<\/p>\n

Full code: http:\/\/ohshitzombies.com\/PallidumZ\/trunk\/game\/board\/Layers.py<\/p>\n","protected":false},"excerpt":{"rendered":"

Just thought I’d share the final functions I settled on for isometric coordinate calculations. Unlike most of the others I’ve seen around the web, these account for: * Origin offset * Tile-based position offset * Varied scale * Any aspect ratio (not just 2:1) def GetScreenPositionForTile(self, map_pos, view, origin, offset, delta=None): if self.projection == Layer.Projections.BirdsEye:…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[],"tags":[2,5,1],"yoast_head":"\nIsometric Coordinate Algorithms - ATZ OK<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.atzok.com\/2009\/07\/17\/isometric-coordinate-algorithms\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Isometric Coordinate Algorithms - ATZ OK\" \/>\n<meta property=\"og:description\" content=\"Just thought I’d share the final functions I settled on for isometric coordinate calculations. Unlike most of the others I’ve seen around the web, these account for: * Origin offset * Tile-based position offset * Varied scale * Any aspect ratio (not just 2:1) def GetScreenPositionForTile(self, map_pos, view, origin, offset, delta=None): if self.projection == Layer.Projections.BirdsEye:…\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.atzok.com\/2009\/07\/17\/isometric-coordinate-algorithms\/\" \/>\n<meta property=\"og:site_name\" content=\"ATZ OK\" \/>\n<meta property=\"article:published_time\" content=\"2009-07-17T14:19:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-04-14T22:20:27+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:creator\" content=\"@bsarsgard\" \/>\n<meta name=\"twitter:site\" content=\"@bsarsgard\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ben Sarsgard\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.atzok.com\/#website\",\"url\":\"https:\/\/www.atzok.com\/\",\"name\":\"ATZ OK\",\"description\":\"NO CARRIER\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.atzok.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.atzok.com\/2009\/07\/17\/isometric-coordinate-algorithms\/#webpage\",\"url\":\"https:\/\/www.atzok.com\/2009\/07\/17\/isometric-coordinate-algorithms\/\",\"name\":\"Isometric Coordinate Algorithms - ATZ OK\",\"isPartOf\":{\"@id\":\"https:\/\/www.atzok.com\/#website\"},\"datePublished\":\"2009-07-17T14:19:41+00:00\",\"dateModified\":\"2016-04-14T22:20:27+00:00\",\"author\":{\"@id\":\"https:\/\/www.atzok.com\/#\/schema\/person\/a7d609d20631e1bcf9b978f3559b9775\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.atzok.com\/2009\/07\/17\/isometric-coordinate-algorithms\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.atzok.com\/2009\/07\/17\/isometric-coordinate-algorithms\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.atzok.com\/2009\/07\/17\/isometric-coordinate-algorithms\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.atzok.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Isometric Coordinate Algorithms\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.atzok.com\/#\/schema\/person\/a7d609d20631e1bcf9b978f3559b9775\",\"name\":\"Ben Sarsgard\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.atzok.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/023af55f7bf3a040f7b1d13e2102a454?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/023af55f7bf3a040f7b1d13e2102a454?s=96&d=mm&r=g\",\"caption\":\"Ben Sarsgard\"},\"url\":\"https:\/\/www.atzok.com\/author\/atzokadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Isometric Coordinate Algorithms - ATZ OK","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.atzok.com\/2009\/07\/17\/isometric-coordinate-algorithms\/","og_locale":"en_US","og_type":"article","og_title":"Isometric Coordinate Algorithms - ATZ OK","og_description":"Just thought I’d share the final functions I settled on for isometric coordinate calculations. Unlike most of the others I’ve seen around the web, these account for: * Origin offset * Tile-based position offset * Varied scale * Any aspect ratio (not just 2:1) def GetScreenPositionForTile(self, map_pos, view, origin, offset, delta=None): if self.projection == Layer.Projections.BirdsEye:…","og_url":"https:\/\/www.atzok.com\/2009\/07\/17\/isometric-coordinate-algorithms\/","og_site_name":"ATZ OK","article_published_time":"2009-07-17T14:19:41+00:00","article_modified_time":"2016-04-14T22:20:27+00:00","twitter_card":"summary","twitter_creator":"@bsarsgard","twitter_site":"@bsarsgard","twitter_misc":{"Written by":"Ben Sarsgard","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/www.atzok.com\/#website","url":"https:\/\/www.atzok.com\/","name":"ATZ OK","description":"NO CARRIER","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.atzok.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.atzok.com\/2009\/07\/17\/isometric-coordinate-algorithms\/#webpage","url":"https:\/\/www.atzok.com\/2009\/07\/17\/isometric-coordinate-algorithms\/","name":"Isometric Coordinate Algorithms - ATZ OK","isPartOf":{"@id":"https:\/\/www.atzok.com\/#website"},"datePublished":"2009-07-17T14:19:41+00:00","dateModified":"2016-04-14T22:20:27+00:00","author":{"@id":"https:\/\/www.atzok.com\/#\/schema\/person\/a7d609d20631e1bcf9b978f3559b9775"},"breadcrumb":{"@id":"https:\/\/www.atzok.com\/2009\/07\/17\/isometric-coordinate-algorithms\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.atzok.com\/2009\/07\/17\/isometric-coordinate-algorithms\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.atzok.com\/2009\/07\/17\/isometric-coordinate-algorithms\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.atzok.com\/"},{"@type":"ListItem","position":2,"name":"Isometric Coordinate Algorithms"}]},{"@type":"Person","@id":"https:\/\/www.atzok.com\/#\/schema\/person\/a7d609d20631e1bcf9b978f3559b9775","name":"Ben Sarsgard","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.atzok.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/023af55f7bf3a040f7b1d13e2102a454?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/023af55f7bf3a040f7b1d13e2102a454?s=96&d=mm&r=g","caption":"Ben Sarsgard"},"url":"https:\/\/www.atzok.com\/author\/atzokadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.atzok.com\/wp-json\/wp\/v2\/posts\/6"}],"collection":[{"href":"https:\/\/www.atzok.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.atzok.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.atzok.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.atzok.com\/wp-json\/wp\/v2\/comments?post=6"}],"version-history":[{"count":2,"href":"https:\/\/www.atzok.com\/wp-json\/wp\/v2\/posts\/6\/revisions"}],"predecessor-version":[{"id":40,"href":"https:\/\/www.atzok.com\/wp-json\/wp\/v2\/posts\/6\/revisions\/40"}],"wp:attachment":[{"href":"https:\/\/www.atzok.com\/wp-json\/wp\/v2\/media?parent=6"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.atzok.com\/wp-json\/wp\/v2\/categories?post=6"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.atzok.com\/wp-json\/wp\/v2\/tags?post=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}