{"id":567,"date":"2010-09-29T20:54:57","date_gmt":"2010-09-30T02:54:57","guid":{"rendered":"http:\/\/www.philhassey.com\/blog\/?p=567"},"modified":"2010-09-29T20:54:57","modified_gmt":"2010-09-30T02:54:57","slug":"dynamite-day-3-json-texture-atlas-lighting-effects","status":"publish","type":"post","link":"https:\/\/www.philhassey.com\/blog\/2010\/09\/29\/dynamite-day-3-json-texture-atlas-lighting-effects\/","title":{"rendered":"Dynamite: Day 3 &#8211; JSON Texture Atlas &#038; Lighting Effects"},"content":{"rendered":"<p>I&#8217;ve done a bit of further improvement of the lighting code.  I think the lighting will end up relating to the game mechanics somehow.  <\/p>\n<p><a href=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2010\/09\/DynamiteScreenSnapz001.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2010\/09\/DynamiteScreenSnapz001.png\" alt=\"DynamiteScreenSnapz001\" title=\"DynamiteScreenSnapz001\" width=\"512\" height=\"406\" class=\"aligncenter size-full wp-image-568\" srcset=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2010\/09\/DynamiteScreenSnapz001.png 512w, https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2010\/09\/DynamiteScreenSnapz001-300x237.png 300w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/p>\n<p>Next up &#8211; to finish up the idea I was talking about yesterday, having a proper texture atlas system.  I ended up using <a href=\"http:\/\/jsoncpp.sourceforge.net\/\">jsoncpp<\/a> for my json loading in C++.  This worked very well.  This is a vast improvement over how I did it in Galcon \/ Galcon Fusion.  In those games, I generated C++ code with defined values for each image \/ texture.  And I had generated C++ code with the structures for all these things, so everything ended up getting baked into the binary, and was very &#8220;undynamic&#8221; (it also added a considerable amount to the compile time, and in certain compilers &#8211; MSVC, I had to change some oddball stack settings for it to even work.)  By using JSON I&#8217;m avoiding all kinds of nonsense and loading everything is just as quick as ever.<\/p>\n<p>To show off this milestone, here&#8217;s an updated screenshot.  I adjusted the lighting a bit more, to make the basic level of lighting a bit more 3D looking.<\/p>\n<p><a href=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2010\/09\/DynamiteScreenSnapz002.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2010\/09\/DynamiteScreenSnapz002.png\" alt=\"DynamiteScreenSnapz002\" title=\"DynamiteScreenSnapz002\" width=\"512\" height=\"406\" class=\"aligncenter size-full wp-image-572\" srcset=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2010\/09\/DynamiteScreenSnapz002.png 512w, https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2010\/09\/DynamiteScreenSnapz002-300x237.png 300w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/p>\n<p>Tomorrow I want to have a basic editor up and running so I can save and load levels.  The editor might end up being available in-game, so I figure I&#8217;ve got to get that feature in from the start.  Then on Friday I&#8217;ll try and get actual gameplay happening.  Thus leaving the entire month of October for the last 10% \ud83d\ude09<\/p>\n<p>-Phil<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve done a bit of further improvement of the lighting code. I think the lighting will end up relating to the game mechanics somehow. Next up &#8211; to finish up the idea I was talking about yesterday, having a proper texture atlas system. I ended up using jsoncpp for my json loading in C++. This [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[116],"tags":[],"class_list":["post-567","post","type-post","status-publish","format-standard","hentry","category-dynamite"],"_links":{"self":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/comments?post=567"}],"version-history":[{"count":5,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/567\/revisions"}],"predecessor-version":[{"id":574,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/567\/revisions\/574"}],"wp:attachment":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/media?parent=567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/categories?post=567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/tags?post=567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}