<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Robert Kuropkat on Medium]]></title>
        <description><![CDATA[Stories by Robert Kuropkat on Medium]]></description>
        <link>https://medium.com/@robert.kuropkat?source=rss-f45a75a69513------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6tCufYgaHfOH0tsYLHghAg.jpeg</url>
            <title>Stories by Robert Kuropkat on Medium</title>
            <link>https://medium.com/@robert.kuropkat?source=rss-f45a75a69513------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 12:39:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@robert.kuropkat/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[JTF: Unity Prefab Variants]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@robert.kuropkat/jtf-unity-prefab-variants-f670181ffe31?source=rss-f45a75a69513------2"><img src="https://cdn-images-1.medium.com/max/656/0*pUfMu_zIVItzQb62.gif" width="656"></a></p><p class="medium-feed-snippet">Objective</p><p class="medium-feed-link"><a href="https://medium.com/@robert.kuropkat/jtf-unity-prefab-variants-f670181ffe31?source=rss-f45a75a69513------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@robert.kuropkat/jtf-unity-prefab-variants-f670181ffe31?source=rss-f45a75a69513------2</link>
            <guid isPermaLink="false">https://medium.com/p/f670181ffe31</guid>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[gamedevhq]]></category>
            <category><![CDATA[unity-prefab]]></category>
            <category><![CDATA[unity-game-development]]></category>
            <category><![CDATA[unity]]></category>
            <dc:creator><![CDATA[Robert Kuropkat]]></dc:creator>
            <pubDate>Tue, 22 Sep 2026 15:56:18 GMT</pubDate>
            <atom:updated>2026-09-24T17:42:54.208Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Week 004 — Just Six Words]]></title>
            <link>https://medium.com/@robert.kuropkat/week-004-just-six-words-2e15142e26e5?source=rss-f45a75a69513------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e15142e26e5</guid>
            <category><![CDATA[bradbury-challenge]]></category>
            <category><![CDATA[3-1-52-challenge]]></category>
            <dc:creator><![CDATA[Robert Kuropkat]]></dc:creator>
            <pubDate>Fri, 30 Jan 2026 21:30:45 GMT</pubDate>
            <atom:updated>2026-01-30T21:32:31.386Z</atom:updated>
            <content:encoded><![CDATA[<h3>Week 004 — Just Six Words</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*wWtjb2fAytv4D7Vd.png" /></figure><p>One of the fun things about this reading challenge, there is always at least one good rabbit hole to jump down every week. This week’s rabbit hole is sponsored by the words “Flash” and “Fiction.”</p><p>The <a href="https://www.writersdigest.com/">Writers Digest</a> has become my carry-everywhere magazine. Anytime I think I may find myself away from home and stuck in a holding pattern, I bring along an issue of Writers Digest to read. Between that and searching about for various threads I chase about writing I’ve been running across a few terms I’ve sort of understood from context but never really paid much attention to. However, as I continue with my Ray Bradbury challenge, the different forms of writing keep vying for my attention and most of them seem to fall under the heading of “Flash Fiction.” So, I thought it was time to disambiguate some of my newfound vocabulary. I wanted to make sure I didn’t Dribble when I should have Drabbled and I thought I should make sure I never Suddenly Flashed a Nano Postcard story when all I needed was just a bit of Twitterature…</p><p>One of the more curious forms of short fiction I encountered was the <em>Six Word Story</em>. Often attributed to Ernest Hemmingway (but generally considered implausible) was a complete story, told with only six words.</p><blockquote>For sale: baby shoes, never worn.</blockquote><p>I’ll give you a moment to let that one sink in.</p><p>The idea of course, and this is true of all forms of flash fiction, is to produce the most impact with as few words as possible. In the case of the Six Word Story, it is even more interesting because each of the six words are entirely innocuous and are even presented in a way commonly and uninterestingly used. It’s not until the reader takes those six particular words, arranged in that particular order, and starts adding their own story around them does a story even emerge.</p><p>As you can probably guess, the Six Word Story is not the only form of Flash Fiction. With some help from Professor Google, I came up with this short key to fiction writing types:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/346/1*Fh7h2bAYv7O-xCLze3ylAw.png" /></figure><p>The exact numbers and groupings vary, but seemed fairly consistent in my, admittedly brief, searching.</p><p>With that, I will close out Week 004 of my reading and writing challenge with my report card and my very first, Six Word Story (offered here in its entirety)…</p><blockquote><strong>Concert 6pm. Lead Singer auditions 4pm.</strong></blockquote><p>My Week 004 Report Card:</p><h3>Poetry (Henry Wadsworth Longfellow)</h3><ul><li><em>Rain in Summer</em></li><li><em>To A Child</em></li><li><em>The Occultation of Orion</em></li><li><em>The Bridge</em></li><li><em>To the Driving Cloud</em></li><li><em>The Day is Done</em></li><li><em>Afternoon in February</em></li></ul><h3>Essays (Wendell Berry)</h3><ul><li><em>Discipline and Hope (part 10)</em></li><li><em>Discipline and Hope (part 11)</em></li><li><em>In Defense of Literacy</em></li><li><em>The Making of a Marginal Farm</em></li><li><em>The Unsettling of America</em></li><li><em>The Ecological Crisis as a Crisis of Character</em></li><li><em>The Ecological Crisis as a Crisis of Agriculture</em></li></ul><h3>Short Stories (O. Henry)</h3><ul><li><em>A Municipal Report</em></li><li><em>A Fog in Santone</em></li><li><em>Friends in San Rosario</em></li><li><em>Round the Circle</em></li><li><em>Hearts and Hands</em></li><li><em>The Lonesome Road</em></li><li><em>The Pimienta Pancakes</em></li></ul><p><em>Originally published at </em><a href="https://robert.kuropkat.info/2026/01/30/week-004-just-six-words/"><em>https://robert.kuropkat.info</em></a><em> on January 30, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e15142e26e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 003 — Expanding My Vocabulary]]></title>
            <link>https://medium.com/@robert.kuropkat/week-003-expanding-my-vocabulary-a21949737e3e?source=rss-f45a75a69513------2</link>
            <guid isPermaLink="false">https://medium.com/p/a21949737e3e</guid>
            <category><![CDATA[bradbury-challenge]]></category>
            <category><![CDATA[3-1-52-challenge]]></category>
            <dc:creator><![CDATA[Robert Kuropkat]]></dc:creator>
            <pubDate>Thu, 22 Jan 2026 01:17:58 GMT</pubDate>
            <atom:updated>2026-01-22T01:17:58.144Z</atom:updated>
            <content:encoded><![CDATA[<h3>Week 003 — Expanding My Vocabulary</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*ekt4A64UhQxkfA4l.png" /></figure><p>Week 003 continues what seems to be a trend. Wendell Berry continues to expand my vocabulary while O. Henry all but bludgeons me with a dictionary. I am considering adding <em>Chambers 20th Century Dictionary new Edition 1983</em> to my list of weekly readings since I spend so much time in it.</p><p>The real surprise since starting this endeavor however is the reading of essays. You really cannot read them the same way you would poems or short (or long) stories. You have to read them with what I call, <em>intention</em>.</p><p>When reading a story, you really don’t have to actually read all the words. “a,” “and,” “the” are superfluous. Adjectives and adverbs you only need to read enough of them to reinforce the mental movie playing in your mind as you read the words. When the action really gets moving, you read even less, letting the words serve more as queues and road signs, rather than needed details.</p><p>With essays however, that does not work. Skip a word, derail the whole thought process. An essayist is not a preacher or a storyteller. A sermon will contain a single point that is driven in through example and admonishment. The preacher has but one lesson for you that day and wants to make sure it is made clear. A storyteller takes you on a journey and while he may tell you when to look out the window, it is up to you to observe and experience. An essayist, however, makes connections. Skip a word, lose a connection. Break a thread, the entire tapestry unravels.</p><p>The essays I am reading now were clearly written in the late 60’s, early 70’s. No need to look them up. The cultural references make that much obvious. What was surprising however was the applicability of those same essays to current events of today. You have to swap out some names, places, events and groups, but I am quite certain you could do that and create a series of completely relevant, current up to the day essays out of those same, fifty-year-old pieces. It’s a little depressing actually. The only question that would be left unanswered by said exercise would be how much more or less dire our circumstances are compared to the time of their original writing.</p><p>They are interesting enough and I think, relevant enough I may very well return to them one day and read deeper. For now, though, that is as deep as I want to go. I am fairly certain Mr. Bradbury did not intend this challenge to include deep analysis, but instead, a continuous stirring of ideas. So, back to the kitchen to stir the pots and see what bubbles up.</p><p>My Week 003 Report Card:</p><h3>Poetry (Henry Wadsworth Longfellow)</h3><ul><li><em>The Slave’s Dream</em></li><li><em>The Slave Singing at Midnight</em></li><li><em>The Witnesses</em></li><li><em>The Warning</em></li><li><em>The Belfry of Bruges</em></li><li><em>A Gleam of Sunshine</em></li><li><em>The Arsenal at Springfield</em></li></ul><h3>Essays (Wendell Berry)</h3><ul><li><em>Discipline and Hope (part 3)</em></li><li><em>Discipline and Hope (part 4)</em></li><li><em>Discipline and Hope (part 5)</em></li><li><em>Discipline and Hope (part 6)</em></li><li><em>Discipline and Hope (part 7)</em></li><li><em>Discipline and Hope (part 8)</em></li><li><em>Discipline and Hope (part 9)</em></li></ul><h3>Short Stories (O. Henry)</h3><ul><li><em>The Miracle of Lava Canyon</em></li><li><em>Whistling Dick’s Christmas Stocking</em></li><li><em>A Retrieved Reformation</em></li><li><em>Confessions of a Humorist</em></li><li><em>A Ramble in Aphasia</em></li><li><em>Blind Man’s Holiday</em></li><li><em>The Ransom of Red Chief</em></li></ul><p><em>Originally published at </em><a href="https://robert.kuropkat.info/2026/01/20/week-003-expanding-my-vocabulary/"><em>https://robert.kuropkat.info</em></a><em> on January 20, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a21949737e3e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 002 — Unexpected Surprises]]></title>
            <link>https://medium.com/@robert.kuropkat/week-002-unexpected-surprises-edbd21448ff7?source=rss-f45a75a69513------2</link>
            <guid isPermaLink="false">https://medium.com/p/edbd21448ff7</guid>
            <category><![CDATA[bradbury-challenge]]></category>
            <category><![CDATA[3-1-52-challenge]]></category>
            <dc:creator><![CDATA[Robert Kuropkat]]></dc:creator>
            <pubDate>Sun, 18 Jan 2026 05:52:25 GMT</pubDate>
            <atom:updated>2026-01-18T05:52:25.901Z</atom:updated>
            <content:encoded><![CDATA[<h3>Week 002 — Unexpected Surprises</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*CD7VKrA8vFCFXVM5.png" /></figure><p>Week two actually ended about a week ago, which perhaps demonstrates that I still struggle to stay on course. The problem seems, at least at this early stage, is that resolutions have a nature of being infectious. Not necessarily to other people, though that may be happening as well, but rather to myself. After all, what could possibly better than actually committing to, starting and continuing to engage in a new resolution? Why, two resolutions of course! And what better than two? Obviously, three.</p><p>After all, if we have the capacity to make one change, why can we not make more? Truth be told, I actually did start another resolution. This was a long standing one. As fate would have it, the opportunity to take it on came up unexpectedly. Even more so, my wife wanted to participate as well, so it became a team effort. This one is called “The Daily Walk” and is a program designed to read through the entire Bible in one year, by reading a few, specific chapters each day, with a weekly group gathering to discuss.</p><p>Now, one could argue I could consider that one of my three readings, but that seemed to me like double dipping. Besides, the nature of the reading would change. At times, the reading will be more essay like. At others, more like a story and still others, nothing less than poetry. So, no, I’ll keep each goal separate.</p><p>But that means, I’m doing TWO new resolutions, so maybe a third…? You see the dilemma. I’m right back to wanting a 27-hour day.</p><p>And yet, I hold out hope. I’m keeping pace, even if somewhat wobbly. I do manage to get all my reading in (at least on weekly average) and even my weekly writing. In fact, it is already starting to pay the dividends I promised my doubtful wife. Writing number two, a short story, or more properly, the short start of what will probably be a longer story, has already added ideas and a little fire to the video game idea.</p><p>I had hoped this would happen but had not expected an idea to pop so soon, nor did I expect my family to collectively jump on the idea. But there it is. I even started some of the coding. It’s like I stepped forward by first stepping sideways.</p><p>Week three is rapidly coming to a close so we will see how things progress. I am hopeful, even slightly elated, yay though cautious. However, regardless of what the future brings, here is my Week 002 Report Card:</p><h3>Poetry (Henry Wadsworth Longfellow)</h3><ul><li><em>The Village Blacksmith</em></li><li><em>It Is Not Always May</em></li><li><em>The Rainy Day</em></li><li><em>God’s Acre</em></li><li><em>To the River Charles</em></li><li><em>The Goblet of Life</em></li><li><em>Excelsior</em></li></ul><h3>Essays (Wendell Berry)</h3><ul><li><em>The Hidden Wound (chapter 5)</em></li><li><em>The Hidden Wound (chapter 6)</em></li><li><em>The Hidden Wound (chapter 7)</em></li><li><em>The Hidden Wound (chapter 8)</em></li><li><em>Think Little</em></li><li><em>Discipline and Hope (part 1)</em></li><li><em>Discipline and Hope (part 2)</em></li></ul><h3>Short Stories (O. Henry)</h3><ul><li><em>The Return of the Songster</em></li><li><em>Book Reviews</em></li><li><em>Guessed Everything Else</em></li><li><em>In Mezzotint</em></li><li><em>The Barber talks</em></li><li><em>The Ghost That Came to Old Angles</em></li><li><em>Pursuing Ideals</em></li></ul><p><em>Originally published at </em><a href="https://robert.kuropkat.info/2026/01/17/week-002-unexpected-surprises/"><em>https://robert.kuropkat.info</em></a><em> on January 18, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=edbd21448ff7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 001 — Starts with a fumble]]></title>
            <link>https://medium.com/@robert.kuropkat/week-001-starts-with-a-fumble-3c41d54afb18?source=rss-f45a75a69513------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c41d54afb18</guid>
            <category><![CDATA[3-1-52-challenge]]></category>
            <category><![CDATA[bradbury-challenge]]></category>
            <dc:creator><![CDATA[Robert Kuropkat]]></dc:creator>
            <pubDate>Mon, 05 Jan 2026 02:27:02 GMT</pubDate>
            <atom:updated>2026-01-18T05:47:14.072Z</atom:updated>
            <content:encoded><![CDATA[<h3>Week 001 — Starts with a fumble</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*qOHCbc8wz7vk-idT.png" /></figure><p>Not surprisingly, my first week of the Bradbury Challenge (more specifically, the 3/1/52 version of this challenge) went a little rough.</p><p>I made a few tactical decisions I knew would complicate it. First, I started during the holiday season which came with multiple layers on its own. Besides the usual holiday festivities, my middle son was home from college, which meant fetching him, unpacking, then packing and taking him back. We also decided on a family vacation away from home. In the end, the primary reason for jumping right in was to just arbitrarily dismiss all excuses not to.</p><p>So, of course, comedy demands it stumble right on day one. The additional decision I made that complicated things was to choose Wendell Berry as my starting essayist. Of my three chosen authors so far, his works are the longest. Far longer than I had expected. This even includes breaking some of them into separate essays whenever he clearly defines a part one and part two. Given all the other conflicting pulls on my time, by the time I got to O. Henry’s <em>“Bexar Scrip №2692”</em> I could barely function.</p><p>“Bexar Scrip №2692” I read as my head sagged forward and a fog of sleep took over.</p><p>“Bexar Scrip №2692” I read again as I awoke startled.</p><p>“Bexar Scrip №2692” I read after waking yet again. And again. and again … then maybe yet one more time …</p><p>Eventually I gave up and went to bed, vowing to read it the next day.</p><p>Day two started out great. While on our vacation my wife and I decided we needed to get out and hike more. Exercise yes, but exercise by getting out in nature, not on a treadmill. She picked the park, and we had a nice, little hike. Much easier than the mountainous hikes we attempted in Georgia. It was good to get outside and unusually aligned with my new reading since the Wendell Berry essays I am reading now all focus on the woods and river where he grew up.</p><p>“Bexar Scrip №2692” I read and my eyes fluttered, my vision wavered and my head sagged forward in sleep.</p><p>Apparently, our little hike took more out of me than I thought. After the day’s normal activities I had nothing left. I didn’t even make it to the bed before falling asleep this time and slept the night on the couch. Now, I was a whole day behind, not just one story.</p><p>Day three, hellbent for victory I tried valiantly to catch up, but Wendell Berry’s<em> “The Long Legged House” </em>was fifty-two pages long! I elected to treat parts one and two as two separate essays and almost managed to catch up.</p><p>In the end, it took me all the way to day six to level set my reading. Hopefully, I will now be able to keep the “3/1” part of the challenge on track. I still have to get the “52” part in the mix and write my weekly short story later today.</p><p>This Week’s report card:</p><h3>Poetry (Henry Wadsworth Longfellow)</h3><ul><li><em>The Spirit of Poetry</em></li><li><em>Hymn to the Night</em></li><li><em>A Psalm of Life</em></li><li><em>The Light of Stars</em></li><li><em>Footsteps of an Angel</em></li><li><em>The Skeleton in Armor</em></li><li><em>The Wreck of Hesperus</em></li></ul><h3>Essays (Wendell Berry)</h3><ul><li><em>The Rise</em></li><li><em>The Long Legged House (part 1)</em></li><li><em>The Long Legged House (part 2)</em></li><li><em>A Native Hill (part 1)</em></li><li><em>A Native Hill (part 2)</em></li><li><em>A Native Hill (part 3)</em></li><li><em>The Hidden Wound (chapter 4)</em></li></ul><h3>Short Stories (O. Henry)</h3><ul><li><em>Bexar Scrip №2692</em></li><li><em>Three Paragraphs</em></li><li><em>A Personal Insult</em></li><li><em>When the Train Comes In</em></li><li><em>Why He Hesitated</em></li><li><em>Something for Baby</em></li><li><em>Too Wise</em></li></ul><p><em>Originally published at </em><a href="https://robert.kuropkat.info/2026/01/04/week-001-starts-with-a-fumble/"><em>https://robert.kuropkat.info</em></a><em> on January 04, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c41d54afb18" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[New Year, New Goal]]></title>
            <link>https://medium.com/@robert.kuropkat/new-year-new-goal-1a89ff0b3c3d?source=rss-f45a75a69513------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a89ff0b3c3d</guid>
            <category><![CDATA[bradbury-challenge]]></category>
            <category><![CDATA[3-1-52-challenge]]></category>
            <dc:creator><![CDATA[Robert Kuropkat]]></dc:creator>
            <pubDate>Mon, 29 Dec 2025 02:37:45 GMT</pubDate>
            <atom:updated>2025-12-29T02:37:45.358Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*5E-7fJsTcersyx-Z.png" /></figure><p>As 2025 comes to a close, and 2026 stands ready to shine down upon us, I find myself thinking of the year to come. I have thoughts of the year that was to be certain, but for the past few days, the future has been dancing about my head in a game of cerebral hide and seek. In a montage of what was, what could have been and what may yet be, a resolution of New Year worthiness crystalized in my mind.</p><p>Admittedly, some who read this may suspect a clever procrastination in the creation of our game studio, <a href="https://doersofstuff.com/">Doers of Stuff</a>, but I am holding out the belief otherwise. Not because I am being cavalier about the time requirement to engage in this resolution, but because I am serious about creating an ongoing business, not just a single game. Video games are a strange breed of software that draws less on the rules and practices of software and more on the creativity and artistry of entertainment. While I have plenty of confidence in the former, I am much less confident in the later.</p><p>I have spent 35 years in Software and IT and fear no task in that realm. During the bulk of that career however, I considered Entertainment to be little more than mindless fluff. So, while I enjoyed and benefited from the output of the Entertainment industry, I have no understanding or appreciation for the production of it. Yet, I know enough to understand the fickle nature of popular appeal means technical excellence alone does not translate into success. That nebulous realm of creative appeal that allows our game to create an impactful connection between us and the players is much more akin to what makes a book, a movie or an album successful and much, much less to do with completing all the tasks in our ToDo list.</p><p>So, how does one foster creativity? How does one sculpt it into a product? Some people, of course, are just wired that way. They are creative because they have no ability to be otherwise. But the rest of us have spent a lifetime suppressing that creative core we are all born with; the one that carries us through our childhood. This means, we need to do something to regain those lost powers; to relight those flames of creativity within us. And that is what I resolved to do.</p><p>Enter the “3/1/52 Challenge,” a variation on what is sometimes called the “Ray Bradbury Challenge.”</p><p>In a <a href="https://www.youtube.com/watch?v=_W-r7ABrMYU">keynote speech</a> at the Sixth Annual <a href="https://www.pointloma.edu/opportunities/writers-symposium-sea">Writer’s Symposium by the Sea</a>, sponsored by Point Loma Nazarene University in 2001, author Ray Bradbury challenged his audience to read 1 poem, 1 essay and 1 short story every night for a thousand nights. He encouraged reading for all disciplines and genres, particularly turn of the 20th century (and older) writings. He said by doing so your head would be so full of ideas, or as he says, metaphors, that it will cause you to start creating your own metaphors and from those, your own story ideas.</p><p>Of course, the whole point is to take those ideas and turn them into stories. Bradbury also challenged his audience to write a short story a week. His belief was that short stories allowed for new authors to practice and hone their skills faster and more completely by simply writing more stories. He further declared it impossible to write fifty-two stories and have them all be bad!</p><p>The 3/1/52 Challenge then is a combination of those two challenges created by Michael La Ronn in the January 2026 issue of Writers Digest. In this version of the challenge, you read three pieces as described by Bradbury, once every day and then once a week, you write a short story. Rinse and repeat for an entire year.</p><p>So, there it is…</p><p>Fortunately, I have no shortage of source material. For some time, I have been a member of the <a href="https://www.loa.org/">Library of America</a> book club. Every six weeks I get a new slipcased version of a collection of writings by American authors. I do have a few other books of other authors from around the world, but the LoA collection ensures I will not run short of material.</p><p>Ray Bradbury made clear the importance of reading from many subjects and disciplines, but I think there is also value in immersion. So rather than skipping around completely willy-nilly (at least for now), I will focus on just three authors. The three I have chosen are:</p><ul><li><a href="https://www.loa.org/books/146-poems-amp-other-writings/">Henry Wadsworth Longfellow</a></li><li><a href="https://www.loa.org/books/604-essays-1969-1990/">Wendell Berry</a></li><li><a href="https://www.loa.org/books/657-101-stories/">William Sidney Porter (O. Henry)</a></li></ul><p>With these three companions I will start my journey. While I know where I want to be at the end of next year, I can’t imagine where I really will be. So, with my first step, my journey of a thousand miles and my million worst words, begins.</p><blockquote>There is a quiet spirit in these woods,<br>That dwells where’re the gentle south-wind blows;</blockquote><blockquote>— The Spirit of Poetry, Henry Wadsworth Longfellow</blockquote><p><em>Originally published at </em><a href="https://robert.kuropkat.info/2025/12/28/new-year-new-goal/"><em>https://robert.kuropkat.info</em></a><em> on December 28, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a89ff0b3c3d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Retro Command Line Junkie]]></title>
            <link>https://medium.com/@robert.kuropkat/retro-command-line-junkie-99b49fc8bb27?source=rss-f45a75a69513------2</link>
            <guid isPermaLink="false">https://medium.com/p/99b49fc8bb27</guid>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[command-line]]></category>
            <dc:creator><![CDATA[Robert Kuropkat]]></dc:creator>
            <pubDate>Thu, 24 Jul 2025 08:45:06 GMT</pubDate>
            <atom:updated>2025-07-24T08:59:56.370Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve had a long-standing desire to return to my command-line roots. It may be just rose-tinted nostalgia, but it sometimes seems I spend an inordinate amount of time waiting for my screen to redraw some very pretty, but very unnecessary graphically enhanced experience. When working from a thirteen-year-old laptop, this can take on a bit more urgency. Every time my laptop fan spins up and starts pushing hot air out the left side vents, I start to wonder if I should take the time again to go retro.</p><p>One of the things that came up on one of my digital walk-abouts, was <a href="https://github.com/dlvhdr/gh-dash">GH-Dash</a>, a terminal window GitHub interface. Unfortunately, it horribly misfired and the screen redraw in both PowerShell and CMD terminals on Windows 10. Searching around led me to an unexpected solution, <a href="https://learn.microsoft.com/en-us/windows/terminal/">Windows Terminal</a>. Now, both of these are subjects for further discussion, but the configurability of <a href="https://learn.microsoft.com/en-us/windows/terminal/custom-terminal-gallery/retro-command-prompt">Windows Terminal</a> lead me to an amusing side trip.</p><p>Windows Terminal can be configured with a <a href="https://learn.microsoft.com/en-us/windows/terminal/custom-terminal-gallery/retro-command-prompt">Retro Command Prompt</a> look.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EydcdejLWB_h1hzy.png" /></figure><p>The initial setup is straightforward and described in the article above. I even added a little flare by adding transparency to the background. A little old and a little new.</p><p>But it turns out there are a few flaws. It seems turning everything green can cause problems in more complicated terminal applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JOY4PfCrWYhXjzj0.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wNvi2gs9lxo2I9wr.png" /></figure><p>As you can see, the foreground and background colors of selected text are the same and therefore unreadable. It turns out, these two images show different results of the same problem. The fix takes some experimentation.</p><p>Now, some quick Googling will lead you to discover that the issue in image one (the red circled one) is due to a bug in Readline for Windows. This bug was fixed in Windows PowerShell v6 but Windows 10 has PowerShell v5 installed. Now, this can be fixed by installing an updated version of Readline. It can also be fixed by updating Windows PowerShell which is currently at v7.5. Which partially worked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8ommKJEW7H3YlWE-.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fxyurdbu91lcdO3Y.png" /></figure><p>As you can see, the command line highlighting is fixed, but a new highlighting problem is created and the display issues in gh dash are not changed at all. The problem is in the related configuration for the settings.json file recommended by the Microsoft article. Namely, the color scheme definition.</p><pre>    &quot;schemes&quot;: <br>    [<br>        {<br>            &quot;background&quot;          : &quot;#000000&quot;,<br>            &quot;black&quot;               : &quot;#00FF00&quot;,<br>            &quot;blue&quot;                : &quot;#00FF00&quot;,<br>            &quot;brightBlack&quot;         : &quot;#00FF00&quot;,<br>            &quot;brightBlue&quot;          : &quot;#00FF00&quot;,<br>            &quot;brightCyan&quot;          : &quot;#00FF00&quot;,<br>            &quot;brightGreen&quot;         : &quot;#00FF00&quot;,<br>            &quot;brightPurple&quot;        : &quot;#00FF00&quot;,<br>            &quot;brightRed&quot;           : &quot;#00FF00&quot;,<br>            &quot;brightWhite&quot;         : &quot;#00FF00&quot;,<br>            &quot;brightYellow&quot;        : &quot;#00FF00&quot;,<br>            &quot;cursorColor&quot;         : &quot;#FFFFFF&quot;,<br>            &quot;cyan&quot;                : &quot;#00FF00&quot;,<br>            &quot;foreground&quot;          : &quot;#00FF00&quot;,<br>            &quot;green&quot;               : &quot;#00FF00&quot;,<br>            &quot;name&quot;                : &quot;Retro Terminal&quot;,<br>            &quot;purple&quot;              : &quot;#00FF00&quot;,<br>            &quot;red&quot;                 : &quot;#00FF00&quot;,<br>            &quot;selectionBackground&quot; : &quot;#FFFFFF&quot;,<br>            &quot;white&quot;               : &quot;#00FF00&quot;,<br>            &quot;yellow&quot;              : &quot;#00FF00&quot;<br>        }<br>    ],</pre><p>The problem is, and there may be a better way to figure it out, is we do not actually know which color each application has chosen for which feature. The good news is, Windows Terminal reads the settings.json file dynamically and in real time. So, changes to the file are immediately reflected in the terminal window. That makes it a process of elimination effort to open the desired application, open the settings.json file, make a change and see if it works.</p><p>Eventually, changing the following:</p><pre>    &quot;schemes&quot;: <br>    [<br>        {<br>            &quot;blue&quot;                : &quot;#004400&quot;,<br>            &quot;brightBlack&quot;         : &quot;#004400&quot;,<br>            &quot;brightWhite&quot;         : &quot;#FFFFFF&quot;,<br>            &quot;selectionBackground&quot; : &quot;#00BB00&quot;,<br>            ...<br>        }<br>    ],</pre><p>Results in:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2ZuBxkm0UrT7waLb.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dxrbNzU9LUv-Ctci.png" /></figure><p>Other terminal-based applications may require additional tinkering, but as a preview of things to come, a new and improved spin on a DOS classic…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IoWrO9TJmJ0hItAb.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*d7qnpNg0S5j6l_PL.png" /></figure><p>We’ll talk later about why I’m excited to see DOS Microsoft Edit came back to life…!</p><p><em>Originally published at </em><a href="https://doersofstuff.org/2025/07/24/retro-command-line-junkie/"><em>https://doersofstuff.org</em></a><em> on July 24, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99b49fc8bb27" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kibbles, Bits and Pro-Tips]]></title>
            <link>https://medium.com/@robert.kuropkat/kibbles-bits-and-pro-tips-1738f8e6a639?source=rss-f45a75a69513------2</link>
            <guid isPermaLink="false">https://medium.com/p/1738f8e6a639</guid>
            <category><![CDATA[unity]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[gamedevhq]]></category>
            <dc:creator><![CDATA[Robert Kuropkat]]></dc:creator>
            <pubDate>Thu, 06 Feb 2025 08:08:27 GMT</pubDate>
            <atom:updated>2025-02-06T08:08:27.595Z</atom:updated>
            <content:encoded><![CDATA[<h3>…or, the Importance of Community</h3><figure><img alt="Kibbles the Dog" src="https://cdn-images-1.medium.com/max/300/0*kGqdtn0BeRbL8LcP.jpg" /><figcaption>Kibbles the Dog</figcaption></figure><p>It’s pretty easy to sing the praises of <a href="https://gamedevhq.com/">GameDevHQ </a>content. You don’t even need to take my word for it. Between the courses released on <a href="https://www.udemy.com/user/gamedevhq/">Udemy</a>, and the free content now being released on <a href="https://www.youtube.com/@gamedevhq">YouTube</a>, you can go see for yourself. What is less obvious and even more difficult to quantify is the community surrounding it. Right now, the GameDevHQ community is positively on fire. Between their new Accelerator program, their Alumni program and their open community (primarily supporting the Udemy courses), it’s actually a challenge to keep up.</p><p>But it’s a challenge worth accepting. Ignore the big success stories. Hopefully you’ll have one of your own soon. Focus instead on the little things, too numerous to count and often difficult to recall. Just as you can suffer death of a million paper cuts, you can build your fortune, one small gem at a time.</p><p>Let me show you an example of some of those gems.</p><h3>Gem #1</h3><p><strong><em>When changing the Play Mode Tint color, if you are using Dark Mode, stay to the left on the hue box.</em></strong></p><p>First of all, if you don’t know what the Play Mode Tint color is and why it matters, fire up Unity, then go to Edit -&gt; Preferences -&gt; Colors -&gt; General -&gt; Playmode tint. This changes the color of your IDE when you go into play test mode. The editor default does not change (or barely changes) and it is easy to start working away, not realizing you did not yet exit playmode.</p><p>I first learned of this by watching someone else’s screen replay. However, I did not give much thought to <em>what</em> color to actually use. The only thought I gave it was to use green, rather than the red I’d seen demonstrated. It wasn’t until recently the comment above was made and it wasn’t even a planned part of the lesson. The only reason it came up was because the webinar was “starting from scratch” and Unity 6 had just come out. So, the person doing the demonstration had not already gone through all their usual setup yet. So, we saw it happen live and the little throw-away comment above sent me off on a minor tailspin.</p><p><em>My screen, before…</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hIEsLQH51JXUh4_a.png" /></figure><p><em>after…</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aMloWeqHs7ChQDLW.png" /></figure><p>Depending on what device you are viewing this article on, the difference may not be as dramatic as on my screen. But the difference positively floored me. In fact, I think had I been told this, without seeing it, I might not have bought into it.</p><p>Why does this matter? Originally, all I wanted was to make it clear I was in play mode (aka, changes don’t save). But at that time, I really didn’t make runtime changes, so being a bit blurry and hard on the eyes was a bonus as it actively discouraged me from trying to make changes.</p><p>Now however, I’ve moved far enough down the road I am actually starting to consider balance and level design. I’ve even made specific design changes so values are available in the Inspector. I am finding it increasingly valuable (and more efficient) to start the game play and change values live. When I find the ones I want, I can make note of them and make the changes permanent, only after figuring out the ones I want.</p><p>So, the key again, is stay to the left as shown in the color selector.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/140/0*Dawcimyks_xAC6VS.png" /></figure><h3>Gem #2</h3><p><strong><em>Order of operations matters for performance, not just mathematically.</em></strong></p><p>Consider the following code:</p><pre>private void Update()<br>{    <br>    transform.Translate(new Vector3( Input.GetAxis(&quot;Horizontal&quot;)<br>                                   , Input.GetAxis(&quot;Vertical&quot;)<br>                                   , 0<br>                                   ) * Time.deltaTime * currentSpeed );<br>}</pre><p>It is simple player movement, based on keyboard input. It is presented in this manner for a very specific reason. Initially, transform.Translate() is introduced with a simple, hard coded Vector3 value. Something like transform.Translate(new Vector3(1,0,0)) which rapidly moves the player game object off the screen to the right. It is then explained this code runs up to sixty times every second and the default unit of movement in Unity is one meter. Thus, as soon as you hit the play button, the game object flies off sixty meters to the right.</p><p>Next, the property Time.deltaTime is introduced. This is the time between each frame and thus each execution of our statement. The end effect is it slows down our player object to a speed of one meter per second. Of course, this is too slow, so like Goldilocks, we try a third option of currentSpeed. If we set it to the value of three, our player will now move at three meters per second.</p><p>Only after working up to and combining these three ideas do we introduce how to capture user input.</p><p>The problem? Anything that runs sixty times every second can quickly become a performance sink. The first problem is the first value in the math problem is a Vector3. This means Time.deltaTime must be multiplied by all three values in the Vector3. Then, all three of those values must again be multiplied by currentSpeed. That’s THREE more multiplications. On a one-time pass, you’ll never notice this. Running it sixty times a second, you still might not notice it initially. However, when you start adding in more and more of these, they start to add up.</p><p>What other performance hampering paper cuts might you commit, you may ask? How about declaring a new Vector3 variable, assigning it and destroying it every sixty seconds? You can’t get out of the assignment part. But, performance-wise, it is probably better to pull the declaration of this variable out and just reuse it.</p><p>And both of these errors were committed in the same line of code! So, perhaps an improvment might be the following:</p><pre>private Vector3 playerDirection = Vector3.zero;<br>private void Update()<br>{    <br>    playerDirection.x = Input.GetAxis(&quot;Horizontal&quot;);<br>    playerDirection.y = Input.GetAxis(&quot;Vertical&quot;);<br>    transform.Translate( playerDirection * (Time.deltaTime * currentSpeed) );<br>}</pre><p>The above code does two things. The parentheses around (Time.deltaTime * currentSpeed) forces that calculation to happen first. That reduces our multiplications from six to four. By using playerDirection and initalizing it once at the class level, we eliminate the new/destroy sixty times per second and replace it with two simple assignments.</p><p>Going a bit further, one might theorize additional optimization.</p><pre>private Vector3 playerDirection = Vector3.zero;<br>private float   frameSpeed      = 1f;<br>private void Update()<br>{    <br>    frameSpeed        = Time.deltaTime * currentSpeed;<br>    playerDirection.x = Input.GetAxis(&quot;Horizontal&quot;) * frameSpeed;<br>    playerDirection.y = Input.GetAxis(&quot;Vertical&quot;)   * frameSpeed;<br>    transform.Translate( playerDirection );<br>}</pre><p>Why might this be better still? First of all, since we are actually making a 2D game, the z-axis of our Vector3 is always zero, so that is a wasted calculation. Changing this, we can go from four multiplications to just three. Finally, and this is just speculation mind you, but I suspect matrix math is not just expensive because all values in the matrix must be multiplied, but also because they must be unpacked, multiplied and put back. The above code is all floats times floats. No complex data structures.</p><p>Of course, we’ve all heard the warning against premature optimization and surely, the above should be properly analyzed before being adopted. On the other hand, certain things border on being a no-brainer. Top of that list, forcing the order of operations to avoid repeating expensive operations (like matrix math). Even if the gain is negligible in your use case, doing it creates no bizarre or obtuse code leaving later programmers scratching their heads. Even if they don’t recognize the optimization, they recognize the operation.</p><p>What’s really useful from all this is simply adding this line of thinking to your coding process. If nothing else, when you find you DO have a performance issue, you already have a list of places you’ve thought might need changing. Those spots will be where you start.</p><p>And there’s more, so much more. But putting even two of the little mind bombs from the last couple days into one article has made it a lengthy read. Hopefully, I will have time to share some more. But my better suggestion to you, is find a code-buddy, or better yet a group. Code, share, and even trash-talk each other for fun and sport. We already know we’re supposed to learn from our mistakes. But you can’t learn from mistakes you don’t know you are making and often times, you won’t know about those mistakes until you see someone else <em>NOT</em> making them.</p><p><em>Originally published at </em><a href="https://doersofstuff.org/2025/02/06/kibbles-bits-and-pro-tips/"><em>https://doersofstuff.org</em></a><em> on February 06, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1738f8e6a639" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Say it With Data]]></title>
            <link>https://medium.com/@robert.kuropkat/say-it-with-data-7ccdd6497027?source=rss-f45a75a69513------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ccdd6497027</guid>
            <category><![CDATA[gamedevhq]]></category>
            <category><![CDATA[unity]]></category>
            <category><![CDATA[level-design]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Robert Kuropkat]]></dc:creator>
            <pubDate>Mon, 03 Feb 2025 03:36:46 GMT</pubDate>
            <atom:updated>2025-02-03T03:36:46.502Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*KiG7zN3uWC28TxRZ.jpg" /></figure><p>A good friend and fellow programmer once accused me of trying to replace all my code with just data. He told me it just wasn’t right to use dynamic data to rewrite the code on the fly. I didn’t actually accomplish this using Oracle PL/SQL, but I would later learn you could pretty much do exactly that with Perl. But I’m getting ahead of myself…</p><p>We continue our refactoring efforts by revisiting our wave system. I blogged about this before, but knew as I wrote the code it would be shortly replaced. This might beg the question of why I wrote it in the first place. The answer? Experience. It’s one of those things where you just don’t know what you don’t know until you know you don’t know it. Know what I mean? I wrote it so I could see exactly what it didn’t do so I would better understand what I wanted to begin with.</p><p>I had already run across this phenomenon once already when I created the side moving enemy. Initially, I actually felt bad. Like I was cheating the lesson by making a “new” enemy that was such an easy [programmatic] change to our existing enemy. Then I play tested the game and got my butt handed to me straight out of the gates. Turns out, tracking enemy objects from multiple directions at once is harder than I thought.</p><p>In the same manner, I wanted to see just how difficult it would be to manage and fine tune a wave system using a blunt force code, copy, paste add more code, method would be.</p><p>Not surprisingly, especially with my recent success with my spawn manager data struct, I found myself leaning towards a data solution. Something I can expose in the Unity Inspector. Something with which I can monkey with the values, even during game play. Ideally, something a smaller (if possibly more cryptic) code function can loop through to instantiate and manage each wave.</p><p>Say hello to my little Wave Manager!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*VITOC6YZ9QcujoS6.jpg" /></figure><pre>[SerializeField] private WaveManager[] currentWave;<br>[System.Serializable]<br>    public struct WaveManager<br>    {<br>        public float[] _spawnRateRange;<br>        public int     _numberOfEnemyToSpawn;<br>        public WaveManager ( int     numberOfEnemyToSpawn<br>                           , float[] spawnRateRange<br>                           )<br>        {<br>            _numberOfEnemyToSpawn = numberOfEnemyToSpawn;<br>            _spawnRateRange       = spawnRateRange;<br>        }<br>        public float[] SpawnRateRange       <br>          { get { return _spawnRateRange;       } <br>            set { spawnRateRange       = value; } }<br>        public int     NumberOfEnemyToSpawn <br>          { get { return _numberOfEnemyToSpawn; } <br>            set { numberOfEnemyToSpawn = value; } }<br>     }</pre><p>Currently it has only two attributes. The first is the number of total enemy (of any type) to spawn for that wave. Remember, the Spawnable data struct will provide a weighted selection system for determining which enemy types to spawn. The second attribute is a simple array with two float values. These represent the lower and upper limits of the cooldown time before the next object is spawned. It should be noted here the current system will randomly choose an enemy OR powerup after each cool down. Thus, it is theoretically possible to spawn several powerups before the next enemy ship appears. However, given the ability to set different weights and change up the timing, I am fairly certain we can bully our way out of that being a regular coincidence. If it happens on some rare occasion, then I say we just treat it as “bank error in your favor.”</p><p>In the Inspector, it looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/0*-Bs-Vs6u72mBDAn4.png" /></figure><p>I could wish for a better label than Element 0/1 for the lower and upper boundaries of the Spawn Rate Range, but for now I’m willing to put that on the Round Tuit list for later.</p><p>We now end up with this as our driving function:</p><pre>    private IEnumerator SpawnRoutine()<br>    {<br>        gameManager.CurrentEnemyCount += currentWave[gameManager.CurrentWave -1].NumberOfEnemyToSpawn;<br>        gameManager.WaveOver = false;<br>        while (currentWave[gameManager.CurrentWave - 1].NumberOfEnemyToSpawn &gt; 0 &amp;&amp; gameManager.GameLive) <br>        {<br>            var index = spawnWeight[Random.Range(0, spawnWeight.Length - 1)];<br>            GameObject newSpawnable = Instantiate(spawnableObjects[index].Prefab);<br>            newSpawnable.GetComponent&lt;ISpawnable&gt;().MySpeed = spawnableObjects[index].MovementSpeed;<br><br>            if (newSpawnable != null &amp;&amp; spawnableObjects[index].Type.ToUpper() == &quot;ENEMY&quot;) <br>            { <br>                newSpawnable.transform.parent = enemyContainer.transform;<br>                currentWave[gameManager.CurrentWave - 1].NumberOfEnemyToSpawn--;<br>            } else if (newSpawnable != null &amp;&amp; spawnableObjects[index].Type.ToUpper() == &quot;POWERUP&quot;) <br>            {<br>                newSpawnable.transform.parent = powerUpContainer.transform;<br>            }<br><br>            yield return new WaitForSeconds(Random.Range( currentWave[gameManager.CurrentWave - 1].SpawnRateRange[0]<br>                                                        , currentWave[gameManager.CurrentWave - 1].SpawnRateRange[1]));<br>        }<br>    }</pre><p>It’s a bit much, I’ll grant. This is partially due to the messiness have having to now dive into the depths of the data structure. It’s also partially due to the fact I recombined several methods I had previously broken out into separate methods to increase readability. Bringing them back together again makes for a pretty dense looking block of code.</p><p>The complex values with all the dots and brackets I can probably simplify by turning into properties of some sort. The exact same code will still exist, but it would be hidden away so this particular method would not look so scary. I will almost certainly experiment with this but will probably let the code sit as-is for a bit and see if my subconscious comes up with anything clever first.</p><p>The minor increase in complexity is primarily due to finally combining both the enemy and powerups into the same spawning routine. This means I do need to branch slightly in the code based on the type of game object being spawned. Now, I might be able to remove some of that by pushing more into the data structure and better “encapsulate” each object’s knowledge of itself.</p><p>It’s also possible, these structs would be better implemented as proper classes, or maybe interfaces. Time will tell. I did already implement my very first interface, the ISpawnable interface which both the Enemy.cs and PowerUp.cs classes are expected to implement.</p><p>All of this does bring us closer to deciding how our game will end. Will we define every wave we want, and declare “Game Over” when you get through them all? Or perhaps we define the first few to introduce the cast of characters, and then define a calculation on the various values thereafter and make the game endless? Still unsure at this point.</p><p>For now, I won’t spend <em>tooooo </em>much time tweaking the data as I already plan later to work specifically on that. I do still need to complete my complement of enemy types which includes one new weapon type. But there is a pretty good chance that won’t be very difficult with this new structure in place. So yea, I’m kinda stoked at the moment. I’m starting to like my code again…</p><p><em>Originally published at </em><a href="https://doersofstuff.org/2025/02/03/say-it-with-data/"><em>https://doersofstuff.org</em></a><em> on February 02, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ccdd6497027" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Objects of My Factory]]></title>
            <link>https://medium.com/@robert.kuropkat/the-objects-of-my-factory-4d5633a3d0fa?source=rss-f45a75a69513------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d5633a3d0fa</guid>
            <category><![CDATA[level-design]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[gamedevhq]]></category>
            <category><![CDATA[unity]]></category>
            <dc:creator><![CDATA[Robert Kuropkat]]></dc:creator>
            <pubDate>Sun, 02 Feb 2025 04:39:12 GMT</pubDate>
            <atom:updated>2025-02-02T04:39:12.000Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*JX7oKDTBd0jdbkzT.jpg" /></figure><p>My refactoring continues. My Enemy.cs class hierarchy is not yet complete, but enough for me to dig into refactoring the SpawnManager.cs class. It is implemented like any other game object, but it is essentially a factory for spawning enemy and powerup game objects. It’s also every bit as icky as the Enemy.cs was. Mainly because much of it was a direct response to all the if-then-elseing going on in the Enemy.cs class. The SpawnManager.cs class also had its fair share of if-then-elseing and corresponding methods calls with ever inventive names like SpawnEnemyWave01(), SpawnEnemyWave02(), etc.</p><p>I knew I wanted to get away from this line of thinking. I’d also just attended a couple webinars put on by <a href="https://gamedevhq.com/">GameDevHQ </a>that contained some discussion concerning Level Design and how part of the Game Programmer’s job was to create game objects the Level Designer could monkey with and there-by refine how the objects interacted and differentiated themselves from level to level. Given the success I had with the Boundary struct in the Enemy.cs class, I thought I would explore a more data driven approach to my game object.</p><p>Since I had been able to easily test my new enemy sub-classes by just dragging and dropping them into the prefab variable exposed in the Inspector, I started simple. I turned the variable into an array. So, I changed:</p><pre>[SerializeField] private GameObject   enemyPrefab;</pre><p>into:</p><pre>[SerializeField] private GameObject[]   enemyPrefab;</pre><p>I then just dragged all three of the enemy prefabs (EnemyVertical, EnemyHorizontal and EnemyHorizontalZigZag) into the array in the Inspector. In my code, I was then able to make iterative changes, using each one, and then looping through the array to make sure each one worked properly. Even selecting the next enemy type at random.</p><p>With this working, I then set about designing my new data structure. Knowing I was going to eventually include as many “spawnable” items as I could in this process, I named the struct Spawnable. Like my Boundary struct, I included local variables to store the data, a constructor and accessor methods. I knew I would need an attribute to store the prefab we would be using to spawn new game objects. I also suspected I would need the name of the of the particular prefab and that I would need some sort of type identifier such as “Enemy” or “PowerUp”, etc.</p><p>It was here I began to flounder a bit. I could access the struct easily enough and I could instantiate the selected enemy prefab easily enough. What I struggled with was <em>how </em>to select which prefab to instantiate. See, this was the crux of the level design and the central part of the factory concept all together. Which one did I choose, and how many should I choose?</p><p>Initially, I just declare three different data structures, one for each type of enemy I needed to instantiate. Now, for my power ups, I had done this:</p><pre>private int ChoosePowerUpIndex<br>{ get <br>     { <br>       int selectIndex = Random.Range(1,56);<br>       //Debug.Log(&quot;Select Index Range: &quot; + selectIndex);<br>       //<br>       // Note: This is dependendent on the order these power ups are placed <br>       //       in the array in the inspector which is wonky.<br>       //<br>       if      (selectIndex &gt; 0  &amp;&amp; selectIndex &lt; 10) { return 0; }  // Triple Shot   approx: 17%<br>       else if (selectIndex &gt; 9  &amp;&amp; selectIndex &lt; 20) { return 1; }  // Speed         approx: 17%<br>       else if (selectIndex &gt; 19 &amp;&amp; selectIndex &lt; 30) { return 2; }  // Shield        approx: 17%<br>       else if (selectIndex &gt; 29 &amp;&amp; selectIndex &lt; 40) { return 3; }  // Ammo          approx: 17%<br>       else if (selectIndex &gt; 39 &amp;&amp; selectIndex &lt; 50) { return 4; }  // Health        approx: 17%<br>       else if (selectIndex &gt; 49 &amp;&amp; selectIndex &lt; 55) { return 6; }  // Negative Ammo approx: 09%<br>       else if (selectIndex &gt; 54 &amp;&amp; selectIndex &lt; 57) { return 5; }  // Spiral        approx: 05%<br>       return 0;<br>       } <br>}</pre><p>Besides the fact I already whined about this in a previous post, having this buried in the code made it unsuitable for manipulation by the level designer. So, I needed something different. I needed to think this through logically. After some highly productive brainstorming,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/180/0*CUV5eDpINBdTTTzs.gif" /></figure><p>I came up with this. First, I would replace each of my individual enemy data structs with an array of structs. I then added an integer attribute to my struct called “weight.” This value would serve a similar purpose to the high and low values of each range in the else if statements above. I could then use this to create an array of indexes based on the weight of each index (prefab in the array of structs). So, let’s say EnemyVertical as the first struct in our array (now called spawnableObjects[]) and had a weight of 4. EnemyHorizontal was the next in the array with a weight of 2 and EnemyHorizontalZigZag was third with a weight of 1. This would create an array of indexes like this: [0,0,0,0,1,1,2] (remember, array indexes start with 0). Now, being overly simplistic, randomly choosing a value from this array, 0 is twice as likely to get chosen as 1 and four times as likely to get chosen as 2. We now have a way to “balance” and randomize our enemy selection. This new SpawnWeight[] array can be created with the following:</p><pre>[SerializeField] private Spawnable[]   spawnableObjects;<br>[SerializeField] private int[]         spawnWeight;<br>private void SetSpawnWeight()<br>{<br>   int i = 0;<br>   foreach (Spawnable spawnableObject in spawnableObjects)<br>   {<br>      spawnWeight = spawnWeight.Concat(Enumerable.Repeat&lt;int&gt;(i, spawnableObject.Weight).ToArray()).ToArray();<br>      i++;<br>   }<br>}</pre><p>The syntax is a horribly cryptic, but it is the Enumerable.Repeat&lt;&gt;() function that allows us to easily add the correct number of indexes to our array without having to also have a nested loop. All the rest is just to incrementally add to the array. Note, there are other ways to do this, the nested loop being the most obvious. Since I’m not yet familiar with profiling and benchmarking in Unity, I had to rely on Google to guide me. While I did get conflicting reviews on which method was best, I opted to follow the one article that included benchmarking stats for doing something very similar. So, until I can prove it myself, I’m going with the one shown to be more performant in someone else’s testing.</p><p>There is still a bit more to come, but this was one of the bigger breakthroughs since I started this particular refactoring. But right now, the following code,</p><pre>[SerializeField] private Spawnable[]   spawnableObjects;<br><br>[System.Serializable]<br>private struct Spawnable<br>    {<br>        public GameObject _prefab;<br>        public int        _weight;<br>        public string     _name, _type;<br>        public float      _movementSpeed;<br>        public Spawnable( GameObject prefab<br>                        , int        weight<br>                        , string     name<br>                        , string     type<br>                        , float      movementSpeed<br>                        )<br>        {<br>            _prefab        = prefab;<br>            _weight        = weight;<br>            _name          = name;<br>            _type          = type;<br>            _movementSpeed = movementSpeed;<br>        }<br>        public GameObject Prefab        { get { return _prefab;        } set { _prefab        = value; } }<br>        public string     Name          { get { return _name;          } set { _name          = value; } }<br>        public string     Type          { get { return _type;          } set { _type          = value; } }<br>        public float      MovementSpeed { get { return _movementSpeed; } set { _movementSpeed = value; } }<br>        public int        Weight        { get { return _weight;        } set { _weight        = value; } }<br>    }</pre><p>Gets translated into the Inspector as this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/0*QuKYQOegnAN5Obja.png" /></figure><p>So, stay tuned, there’s more exciting adventures ahead…!</p><p><em>Originally published at </em><a href="https://doersofstuff.org/2025/02/02/the-objects-of-my-factory/"><em>https://doersofstuff.org</em></a><em> on February 01, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d5633a3d0fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>