{"id":431,"date":"2024-10-13T20:41:17","date_gmt":"2024-10-13T20:41:17","guid":{"rendered":"https:\/\/willkolb.com\/?p=431"},"modified":"2024-10-14T02:18:56","modified_gmt":"2024-10-14T02:18:56","slug":"game-stuff-new-hud-and-angry-gimp-usage","status":"publish","type":"post","link":"https:\/\/willkolb.com\/?p=431","title":{"rendered":"Game Stuff: New Hud and Angry Gimp usage"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"553\" src=\"https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-5-1024x553.png\" alt=\"\" class=\"wp-image-432\" srcset=\"https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-5-1024x553.png 1024w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-5-300x162.png 300w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-5-768x414.png 768w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-5-1536x829.png 1536w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-5-500x270.png 500w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-5.png 1894w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>I swapped out the health numbers and ammo numbers for the game. Still frame looks alright now but personally I think the ammo count size needs more work. Also the whole thing is sliding off the screen which makes me think I need to recreate the whole UI widget from scratch. The biggest accomplishment here is getting the hex pattern for that health bar. For my 2d art I primarily use GIMP (<a href=\"https:\/\/www.gimp.org\/\">https:\/\/www.gimp.org\/<\/a>) and gimp is usually good about having a pathway to do whatever you need. I would say around 80% of the time you can google &#8220;how to blah in GIMP&#8221; and you have 20+ years of history to rely on to get some kind of idea on how to do things. For that last 20% the solution is usually involves ripping an image from somewhere else to use as a stencil or as a basis for a built-in filter. In this case it was the latter. Gimp has filters for making a square checkerboard and diamonds but nothing for hex&#8217;s except for a &#8220;mozaic&#8221; filter. Which looks fine on paper but if you&#8217;re messing with the alpha you need very exact lines and the mozaic filter makes a pattern that includes a simulated light which annoyingly blurs the edges. However, the edges aren&#8217;t blurred by a gradient color (which can be easily fixed) but is blurred by adding a gradient to the alpha. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"791\" src=\"https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-6-1024x791.png\" alt=\"\" class=\"wp-image-433\" srcset=\"https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-6-1024x791.png 1024w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-6-300x232.png 300w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-6-768x594.png 768w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-6-388x300.png 388w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-6.png 1030w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">From here it looks fine.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"611\" src=\"https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-7-1024x611.png\" alt=\"\" class=\"wp-image-434\" srcset=\"https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-7-1024x611.png 1024w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-7-300x179.png 300w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-7-768x458.png 768w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-7-1536x916.png 1536w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-7-500x298.png 500w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-7.png 1546w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Zoomed in is where troubled can be seen.<\/figcaption><\/figure>\n\n\n\n<p>I tried everything to get rid of these edges but failed miserably: edge detection, thresholding, median blurs, contrast and color selection all seemed to maintain the gradient off the edge lines. I eventually gave up and used the suggestion from &#8220;chaz_prinz&#8221; here: <a href=\"https:\/\/www.reddit.com\/r\/GIMP\/comments\/rg5wt4\/creating_a_borderless_hexagon_gridpattern\/\">https:\/\/www.reddit.com\/r\/GIMP\/comments\/rg5wt4\/creating_a_borderless_hexagon_gridpattern\/<\/a> and ripped a hex pattern from the internet to generate a black\/white image which I was able to use for the pattern.<br>I ended up with a pretty nice pattern here: <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"320\" src=\"https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-8-1024x320.png\" alt=\"\" class=\"wp-image-435\" srcset=\"https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-8-1024x320.png 1024w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-8-300x94.png 300w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-8-768x240.png 768w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-8-500x156.png 500w, https:\/\/willkolb.com\/wp-content\/uploads\/2024\/10\/image-8.png 1366w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Which I threw into a filled green rectangle to get the health bar above (plus some trimming\/filling around the edges). I think the result is quite nice and fits the whole old-er school vibe that I&#8217;m going for. I might make it red just to fit the obvious ascetics from every other game in existence but I figure I&#8217;d fix up the ammo up first.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I swapped out the health numbers and ammo numbers for the game. Still frame looks alright now but personally I think the ammo count size needs more work. Also the whole thing is sliding off the screen which makes me think I need to recreate the whole UI widget from scratch. The biggest accomplishment here [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":435,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,9],"tags":[],"class_list":["post-431","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gamedev","category-unreal"],"_links":{"self":[{"href":"https:\/\/willkolb.com\/index.php?rest_route=\/wp\/v2\/posts\/431","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/willkolb.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/willkolb.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/willkolb.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/willkolb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=431"}],"version-history":[{"count":1,"href":"https:\/\/willkolb.com\/index.php?rest_route=\/wp\/v2\/posts\/431\/revisions"}],"predecessor-version":[{"id":436,"href":"https:\/\/willkolb.com\/index.php?rest_route=\/wp\/v2\/posts\/431\/revisions\/436"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/willkolb.com\/index.php?rest_route=\/wp\/v2\/media\/435"}],"wp:attachment":[{"href":"https:\/\/willkolb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/willkolb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=431"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/willkolb.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}