{"id":557,"date":"2010-09-28T20:21:48","date_gmt":"2010-09-29T02:21:48","guid":{"rendered":"http:\/\/www.philhassey.com\/blog\/?p=557"},"modified":"2010-09-28T20:21:48","modified_gmt":"2010-09-29T02:21:48","slug":"dynamite-day-2","status":"publish","type":"post","link":"https:\/\/www.philhassey.com\/blog\/2010\/09\/28\/dynamite-day-2\/","title":{"rendered":"Dynamite: Day 2"},"content":{"rendered":"<p>So I stayed up late last night getting the lighting working.  Turns out I was doing my gluPerspective and gluLookat against my MODELVIEW instead of against my PROJECTION matrix.  Here&#8217;s the result:<\/p>\n<p><a href=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2010\/09\/dynamitedev-04.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2010\/09\/dynamitedev-04.png\" alt=\"dynamitedev-04\" title=\"dynamitedev-04\" width=\"488\" height=\"348\" class=\"alignright size-full wp-image-556\" srcset=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2010\/09\/dynamitedev-04.png 488w, https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2010\/09\/dynamitedev-04-300x213.png 300w\" sizes=\"auto, (max-width: 488px) 100vw, 488px\" \/><\/a><\/p>\n<p>Now I think I&#8217;m going to try and get a bit more texture variety, windows, height variety, thinner walls, some torches, and some shadows.  Didn&#8217;t get all this just now, but here&#8217;s an update:<\/p>\n<p><a href=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2010\/09\/dynamitedev-05.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2010\/09\/dynamitedev-05.png\" alt=\"dynamitedev-05\" title=\"dynamitedev-05\" width=\"520\" height=\"412\" class=\"alignright size-full wp-image-561\" srcset=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2010\/09\/dynamitedev-05.png 520w, https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2010\/09\/dynamitedev-05-300x237.png 300w\" sizes=\"auto, (max-width: 520px) 100vw, 520px\" \/><\/a><\/p>\n<p>Now I&#8217;m working on switching from dev under linux to dev under OS\/X and XCode.  The Linux dev has been tough because with VMWare Fusion I don&#8217;t get GL under linux, so the framerate is pretty bad.  I had an old SSH -Y trick that tunneled the GL back out to OS\/X, but that seems to be even slower than software rendering today.  Maybe it&#8217;s just time I embraced XCode and tweaked the key bindings a bit to suit myself.<\/p>\n<p>Having done that, and tweaked a few settings, it&#8217;s time to start loading up data from files instead of inlining all my level data, etc.  I think I&#8217;m going to give JSON a whirl for this project, since it should make handling all this pretty straight-forward.  It also is supported in just about every language, so I can use my python scripts for generating texture atlases and fonts and have them just spit out some JSON for my code to load up.  I had also considered sqlite for this purpose, but I think in this case, a database isn&#8217;t quite the right fit.<\/p>\n<p>I think sqlite is a good fit for when you need to store CSV type data, except you want it packed.  It&#8217;s particularly useful if you&#8217;re going to be storing a larger amount of data.  In this game, the largest data store will be the level itself, which I can&#8217;t imagine will be much larger than 200k or so.  sqlite can handle huge amounts of data and it&#8217;s quite efficient for that, but it&#8217;s also a database so you have to access everything using queries, which can be cumbersome if they aren&#8217;t needed.<\/p>\n<p>Using python to generate the atlas does give me an excuse to pop back into linux for a while though!<\/p>\n<p>-Phil<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So I stayed up late last night getting the lighting working. Turns out I was doing my gluPerspective and gluLookat against my MODELVIEW instead of against my PROJECTION matrix. Here&#8217;s the result: Now I think I&#8217;m going to try and get a bit more texture variety, windows, height variety, thinner walls, some torches, and some [&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-557","post","type-post","status-publish","format-standard","hentry","category-dynamite"],"_links":{"self":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/557","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=557"}],"version-history":[{"count":7,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/557\/revisions"}],"predecessor-version":[{"id":565,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/557\/revisions\/565"}],"wp:attachment":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/media?parent=557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/categories?post=557"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/tags?post=557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}