{"id":9562,"date":"2010-09-28T07:54:22","date_gmt":"2010-09-28T12:54:22","guid":{"rendered":"http:\/\/www.shamusyoung.com\/twentysidedtale\/?p=9562"},"modified":"2010-09-28T08:11:37","modified_gmt":"2010-09-28T13:11:37","slug":"comic-press","status":"publish","type":"post","link":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=9562","title":{"rendered":"Comic Press"},"content":{"rendered":"<p>EDIT: Whoops.  I&#8217;d intended to post this <em>after<\/em> today&#8217;s comic.  The screenshots are spoiler-ish, so you might want to see <a href=\"http:\/\/www.escapistmagazine.com\/articles\/view\/comics\/stolen-pixels\/8157-Stolen-Pixels-230-The-History-of-Civilization-Part-1\">today&#8217;s comic<\/a> before reading further. <\/p>\n<p>Some people expressed interest in what I was doing that led to <a href=\"?p=9557\">yesterday&#8217;s post<\/a>. I&#8217;m not one to miss an opportunity to talk about myself, so let&#8217;s do that.<\/p>\n<p>Ever since <a href=\"?p=1265\">DM of the Rings CXXXI<\/a> I&#8217;ve used my own software for making comics. It&#8217;s 100% homebrew code. It looks thus:<\/p>\n<p><table   class=\"\" cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/comic_press1.jpg' class='insetimage'   alt='comic_press1.jpg' title='comic_press1.jpg'\/><\/td><\/tr><\/table><\/p>\n<p>Ok, I never have the window this small. I usually run it full-screen, so it looks like this:<\/p>\n<p><!--more--><table   class=\"\" cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/comic_press2.jpg' class='insetimage'   alt='comic_press2.jpg' title='comic_press2.jpg'\/><\/td><\/tr><\/table><\/p>\n<p>That 308 you see in the lower left corner is the framerate counter, and should give you a pretty good idea of why I made the software in the first place. If you&#8217;ve ever opened a jumbo project in Photoshop, Comic Book creator, or some other graphic-artsy type program, you&#8217;ve probably noticed that they are not the smoothest things in the world. Zoom way in and pan around and watch your modern quad-core desktop computer choke and stutter like an old 486. Comic Press here is a champ and will maintain the smooth framerate no matter what you do.  It&#8217;s rendering the comic using OpenGL, and this is a lightweight job even for graphics cards of a decade ago.  It&#8217;s rendering maybe one or two hundred polygons. (Although the images are ginormous and likely wouldn&#8217;t fit in a turn of the century card.) <\/p>\n<p>The word bubbles break against the panel borders automatically, so you can just slide them around the page and fiddle with how wide or tall they are and CP handles the rest.  (Some artist-types do this sort of stuff in Photoshop by manually arranging words, drawing ovals, giving them borders, and cropping them as needed. Madness!)  You can chain bubbles together, aim the tail, and alter the dialog in realtime. Just click and drag.  I&#8217;m pretty proud of this. <\/p>\n<p>The bubbles support a few bits of HTML markup, although that part needs work. You might remember the post from two years ago where I was frustrated with how <a href=\"?p=1959\">slow and cumbersome Windows was when I generated the word bubbles<\/a>. I managed to <a href=\"?p=1964\">fix that<\/a>, though.  <\/p>\n<p>Note that the program is only complete enough to serve my needs.  It&#8217;s lacking crucial features and bug fixes that would be required if I were to ever try and release this to the public.  There&#8217;s a dozen ways to crash it. I know about these issues and avoid them, so the program is stable for me. But it would be a minefield for the uninitiated.<\/p>\n<p>Anyway, note the palette of controls on the right-hand side. That changes based on what you have selected. It&#8217;s the only part of the program that is Windows-specific. You couldn&#8217;t port this program to any other platform because you&#8217;d have to re-write the 3,000 lines of code that drive the interface widgets. (Windows code is very bulky.) It&#8217;s also kind of wasteful.  There&#8217;s a ton of space wasted below the controls. <\/p>\n<p>Last week I got to thinking it would be cool if the controls floated over the workspace like in this, which I just Photoshopped:<\/p>\n<p><table   class=\"\" cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/comic_press3.jpg' class='insetimage'   alt='comic_press3.jpg' title='comic_press3.jpg'\/><\/td><\/tr><\/table><\/p>\n<p>If the controls were part of the rendering, then they could be transparent. Also, it would no longer be driven by Microsoft-specific code, so it would be portable.  I decided to try and find a library that would let me do this, which is how I lost my weekend to frustration and madness.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>EDIT: Whoops. I&#8217;d intended to post this after today&#8217;s comic. The screenshots are spoiler-ish, so you might want to see today&#8217;s comic before reading further. Some people expressed interest in what I was doing that led to yesterday&#8217;s post. I&#8217;m not one to miss an opportunity to talk about myself, so let&#8217;s do that. Ever [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66],"tags":[],"class_list":["post-9562","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/9562","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9562"}],"version-history":[{"count":0,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/9562\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9562"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9562"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}