<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Justin Nearing</title>
    <description>The latest articles on DEV Community by Justin Nearing (@jerkytreats).</description>
    <link>https://dev.to/jerkytreats</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F695113%2Fa5e0b467-d505-4795-8206-f1b247a4076c.jpeg</url>
      <title>DEV Community: Justin Nearing</title>
      <link>https://dev.to/jerkytreats</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jerkytreats"/>
    <language>en</language>
    <item>
      <title>Anatomy of a Pull Request</title>
      <dc:creator>Justin Nearing</dc:creator>
      <pubDate>Tue, 28 Jun 2022 20:17:49 +0000</pubDate>
      <link>https://dev.to/jerkytreats/anatomy-of-a-pull-request-1p8g</link>
      <guid>https://dev.to/jerkytreats/anatomy-of-a-pull-request-1p8g</guid>
      <description>&lt;p&gt;One of the programming goals I have for my &lt;a href="https://dev.to/jerkytreats/innovating-on-tetris-2122"&gt;Innovating on Tetris&lt;/a&gt; game project is to take the &lt;em&gt;craft&lt;/em&gt; of programming seriously. &lt;/p&gt;

&lt;p&gt;Despite being a side project with no other contributors, I wanted to practice the oft-ignored ancillary parts of software engineering. Things like documentation, well defined PR's, etc. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mbk9VZ7---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i8446y0etitdfdtam33r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mbk9VZ7---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i8446y0etitdfdtam33r.png" alt="GitHub PR we'll be analyzing" width="880" height="703"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With this being a side project, I also wanted to use these PR's as the canonical history of this project. By trolling through the &lt;a href="https://github.com/JerkyTreats/tetris/pulls?q=is%3Apr+is%3Aclosed"&gt;history of PRs&lt;/a&gt;, you would discover a &lt;em&gt;narrative&lt;/em&gt; of game development. &lt;/p&gt;

&lt;p&gt;The advantage of all this extra work? I can take that narrative and convert them into running devlogs- the heavy lifting is already done. In today's digital economy, marketing is everything- and the key to marketing is a compelling narrative. By creating a narrative in PR's, I enable a &lt;em&gt;derivative marketing pipeline&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Vg4TPIGD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e88kyptqiz9tkg9ucn86.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Vg4TPIGD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e88kyptqiz9tkg9ucn86.png" alt="Setting up the marketing pipeline is TODO" width="840" height="452"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Setting up the marketing pipeline is TODO, I'm thinking a GitHub Action that prints out the markdown of the PR into a blog post.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  PR Anatomy
&lt;/h2&gt;

&lt;p&gt;Taking the above PR, let's break down what I've done: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AT_WiZqq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dsy19299edhjhnxlyts9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AT_WiZqq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dsy19299edhjhnxlyts9.png" alt="Detailed Anatomy of the PR" width="880" height="714"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Link to Design
&lt;/h3&gt;

&lt;p&gt;Regardless of using your PR's as a DevLog, having your PR's link to the requirements is going to be very useful- not just for yourself, but for the reviewers who may not have the context. &lt;/p&gt;

&lt;h3&gt;
  
  
  Major Components
&lt;/h3&gt;

&lt;p&gt;This was major feature I was implementing, which required a couple of distinct steps. Much like the design links, we are communicating context here- allowing the reader to frame what we are doing (design links), where we are doing it (major components), and why (narrative)&lt;/p&gt;

&lt;h3&gt;
  
  
  Link to Commit
&lt;/h3&gt;

&lt;p&gt;To complete this feature, there were a number of major changes required. By linking to each each major change, I continue to help the reader understand where each change is coming from. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/JerkyTreats/tetris/pull/21/commits/38947244adc38f5c638e2f78a41c7c401ef25981"&gt;Coupled with the power of open source, you can view the commit yourself&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;One criticism I have is here I over-committed. Here I added the unused folder &lt;code&gt;GameManagement&lt;/code&gt; folder even though it's unused. One thing I have to get better at is adding more, smaller commits.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Narrative
&lt;/h3&gt;

&lt;p&gt;One one of those major components were completed, I used a commit to write the narrative of the change:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The previous refactor was useful for detangling the gameplay logic from the Board object. The resulting gameplay controller had several issues of its own, unfortunately.&lt;/p&gt;

&lt;p&gt;As I define in Blog/multiboard_tetris_design, I want to structure how objects are created, destroyed, and managed throughout their lifetime.&lt;/p&gt;

&lt;p&gt;Starting from the very top, I defined the GameManager as a holder of GameControllers. I defined the relationship between manager-controller to get the mandatory function a game controller would have.&lt;/p&gt;

&lt;p&gt;With this structure defined, I was able to look at the Tetris GameController (renamed now to TetrisClassicController) and refactor it with a clearer goal in mind. This led to fixing ActivePiece and GhostPiece, having them more independent and properly managed by the Controller.&lt;/p&gt;

&lt;p&gt;The result should be fairly clear object control. From the GameManager to the ActivePiece, control of an object is defined by its parent. Even more importantly, each object has a clearly defined way of how to be managed. Common functions for the control flow.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Practice Higher Standards
&lt;/h2&gt;

&lt;p&gt;In many respects, the actual code you write is the least important part of programming. The design/requirement phase is as critical as the PR/merge phase. Good habits, started early and ingrained into even your side projects is critical to the long-term success of your projects. &lt;/p&gt;

&lt;p&gt;Good habits are a force multiplier because it offers the opposite of technical debt- technical &lt;em&gt;dividends&lt;/em&gt;. Instead of fighting toil, you're pivoting rapidly, or expanding easily. &lt;/p&gt;

&lt;p&gt;By practicing higher standards, you are continuously honing the craft of software development. This is the only way to become a better developer. &lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>programming</category>
      <category>gamedev</category>
      <category>github</category>
    </item>
    <item>
      <title>Innovating On Tetris: Designing Innovation</title>
      <dc:creator>Justin Nearing</dc:creator>
      <pubDate>Tue, 14 Jun 2022 15:33:50 +0000</pubDate>
      <link>https://dev.to/jerkytreats/innovating-on-tetris-designing-innovation-24jl</link>
      <guid>https://dev.to/jerkytreats/innovating-on-tetris-designing-innovation-24jl</guid>
      <description>&lt;p&gt;&lt;em&gt;This is Part II on my series&lt;/em&gt; &lt;a href="https://dev.to/jerkytreats/innovating-on-tetris-2122"&gt;Innovating On Tetris&lt;/a&gt;, &lt;em&gt;a game prototype that takes the Tetris we know and love, and innovate a new feature on top of it.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;&lt;em&gt;In this article, I share the design document for the first innovative feature I want to implement:&lt;/em&gt; Multiboard Tetris.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What follows is the design goals, and the major software architecture changes needed to enable this feature. Finally, a detailed list of the requirements to complete the feature.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;&lt;em&gt;You can view both the &lt;a href="https://github.com/JerkyTreats/tetris/blob/main/Blog/multiboard_tetris_design.md"&gt;original document&lt;/a&gt; and in the &lt;a href="https://github.com/JerkyTreats/tetris"&gt;repo for the game&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Multiboard Tetris
&lt;/h2&gt;

&lt;p&gt;The core gameplay innovation I want to try first in the theme of &lt;code&gt;Innovate on Tetris&lt;/code&gt; is a "Multiboard Tetris" game. Instead of having one board, have multiple boards stitched together. As you complete some objective on the first board, the camera moves to the next board (which is connected to the first board). &lt;/p&gt;

&lt;p&gt;As an example, where the first board would be something like a standard Tetris board (w:10, l: 20), the next board would be wider than long. And instead of the new piece dropping from top to bottom, it would spawn on the left and "drop" to the right. &lt;/p&gt;

&lt;p&gt;This means there's overlap between where one board ends, and another board begins. Which means if you have standard Tetris rules- create lines at the bottom- then you're going to have an issue where the blocks from the previous board are stuck at the spawn of the new board. &lt;/p&gt;

&lt;p&gt;To get around this, I figure we have to change the ruleset of Tetris- no stacking blocks at the bottom and clearing as many lines as possible before losing. Instead, we'll present a board &lt;em&gt;with pieces already placed&lt;/em&gt; with the objective being to clear the pieces or clear X number of lines or w/e. &lt;/p&gt;

&lt;p&gt;This is why we needed the BoardEditor- a way to build and save boards that had pieces already drawn. &lt;/p&gt;

&lt;p&gt;The next thing we need to do is build out a system that manages the gameplay of multiple boards.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gameplay Manager
&lt;/h2&gt;

&lt;p&gt;As it sounds, the intent of the Gameplay Manager is to manage the gameplay of multiple Tetris boards. Each board can have unique rulesets and objectives, all defined in a Gameplay Controller. We need a way to stitch these boards together and have a manager that says which board is active, and when. This is the intent of the Gameplay Manager &lt;/p&gt;

&lt;h3&gt;
  
  
  Details
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Has multiple Gameplay Controllers

&lt;ul&gt;
&lt;li&gt;Gameplay Controller has one Board&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Gameplay Controllers have mandatory methods

&lt;ul&gt;
&lt;li&gt;Initialize&lt;/li&gt;
&lt;li&gt;GameStart&lt;/li&gt;
&lt;li&gt;GameEnd&lt;/li&gt;
&lt;li&gt;Terminate&lt;/li&gt;
&lt;li&gt;Interrupt&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Manager is the caller for each controller method

&lt;ul&gt;
&lt;li&gt;Likely through events&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Controllers issue events to Manager as well

&lt;ul&gt;
&lt;li&gt;Game is started&lt;/li&gt;
&lt;li&gt;Game is ended&lt;/li&gt;
&lt;li&gt;Update (send some data back to the Manager that the manager might want to know about- think a individual board score than might feed into a cumulative score)&lt;/li&gt;
&lt;li&gt;Game is interrupted&lt;/li&gt;
&lt;li&gt;Game has resumed?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Lifecycle
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Init Self&lt;/li&gt;
&lt;li&gt;Init &lt;code&gt;Game Controllers&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Setup Listeners to GC children&lt;/li&gt;
&lt;li&gt;Instrument Listeners to children&lt;/li&gt;
&lt;li&gt;Wait for all GC init events &lt;/li&gt;
&lt;li&gt;Order games / setup game session&lt;/li&gt;
&lt;li&gt;Start first game &lt;/li&gt;
&lt;li&gt;Listen for game finish event&lt;/li&gt;
&lt;li&gt;Trigger next until all games complete&lt;/li&gt;
&lt;li&gt;Send terminate to all GC&lt;/li&gt;
&lt;li&gt;Trigger "finish session" event&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Event Driven Management
&lt;/h3&gt;

&lt;p&gt;My thoughts are to take my learnings of events and bring them into gameplay management. The requirements here is that we need more than one board, and a way to manage which board is "active". &lt;/p&gt;

&lt;p&gt;So what I want to try is writing an &lt;code&gt;interface&lt;/code&gt; that define how the Game Manager is going to interact with its controllers. The manager will trigger events that the controllers listen to. These events mainly deal with the games state (might want to setup an actual &lt;code&gt;state machine&lt;/code&gt; here).&lt;/p&gt;

&lt;p&gt;I like the idea of an interface because it means each controller gets a ton of flexibility. The ruleset might be incredibly different from one controller to another, and I don't want the manager to care- If you are going to be managed by a Gameplay Manager, you will send/receive certain events types. An interface accomplishes this quite well. &lt;/p&gt;

&lt;h3&gt;
  
  
  Gameplay Ordering
&lt;/h3&gt;

&lt;p&gt;The thing I need to consider now is how to order the games. If we have 3 boards in our gameplay session, how does the manager know which board is first, second, third? &lt;/p&gt;

&lt;p&gt;The answer seems to be some piece of data in the game manager with the desired order. An ordered list of GC ID's. If I'm going to trigger "GameStart" via event, I need to send the controller ID as a parameter for this event- all the controllers will receive this event, so I need to specify which controller I actually want to start. &lt;/p&gt;

&lt;h3&gt;
  
  
  Gameplay Session Serialization
&lt;/h3&gt;

&lt;p&gt;So we are defining a "Gameplay Session" as the beginning of the first controller GameStart event to the end of the last controllers GameEnd event- basically a session is the gameplay managers lifecycle. &lt;/p&gt;

&lt;p&gt;We've also spelled out that there is going to be some data associated with the Manager- at the very least we'll need a set of Gameplay Controllers and their order in the session. &lt;/p&gt;

&lt;p&gt;It would make sense that we want to Serialize a gameplay session- once we have designed a fun multiboard tetris layout, we'd want to save that for later- hence serialization.&lt;/p&gt;

&lt;p&gt;This means we'll need the following Serializable Objects:&lt;/p&gt;

&lt;h4&gt;
  
  
  Gameplay Manager
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;A ordered set of references to gameplay Controller object&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Gameplay Controller
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;A controller ID for the Gameplay Manager to reference
&lt;/li&gt;
&lt;li&gt;A reference to a BoardData object &lt;/li&gt;
&lt;li&gt;Probably some ruleset data object&lt;/li&gt;
&lt;li&gt;Probably a set of "gameplay objects"&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Ruleset
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;ActivePiece enabled? Drop direction (top -&amp;gt; bottom vs left -&amp;gt; right)

&lt;ul&gt;
&lt;li&gt;If the Ruleset is enabling ActivePiece, then it might make sense for the set of gameplay objects to live within the Ruleset, not directly into the Controller.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Gameplay Objects
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;ActivePiece is an example of a gameplay object&lt;/li&gt;
&lt;li&gt;We would need to store the data of ActivePiece somewhere (right now its hardcoded, which may be fine for now)&lt;/li&gt;
&lt;li&gt;I we wanted to extend the types of pieces beyond the standard set of Tetrominos, then we would likely want to pull that into a true serializable object.

&lt;ul&gt;
&lt;li&gt;Think of adding Bombs, special pieces, individual blocks, etc.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Technical Debt Rears It's Ugly Head
&lt;/h3&gt;

&lt;p&gt;And before I can do anything, I must remember that I left the current Gameplay Controller in a bit of a state. I kept feeling like I had something conceptually backwards with the BoardManager/Tester, and I finally realize what it was- I had inverted the ownership of objects. &lt;/p&gt;

&lt;p&gt;My refactor of "Board does everything" to this concept of a "Gameplay controller" still had the Board being the thing I was instantiating. I then had a ton of trouble trying to cram in a Gameplay Controller into the BoardFactory. This was the inversion of control- the GC should be my entrypoint. A gamecontroller HAS a Board- not a Board has a GameController. &lt;/p&gt;

&lt;p&gt;So I need to correct the object control here, then also hit that TODO of pulling the "ActivePiece" back into its own object, THEN I can actually start building out the Gameplay Manager.&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>design</category>
      <category>programming</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Innovating on Tetris</title>
      <dc:creator>Justin Nearing</dc:creator>
      <pubDate>Thu, 09 Jun 2022 15:17:36 +0000</pubDate>
      <link>https://dev.to/jerkytreats/innovating-on-tetris-2122</link>
      <guid>https://dev.to/jerkytreats/innovating-on-tetris-2122</guid>
      <description>&lt;p&gt;While I am in the games industry, my day job has me in the #DevOps and #SRE world. I wanted to get back to my #GameDev roots, and decided to jump headfirst into a new game prototype: Build Tetris, then &lt;em&gt;innovate&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;The following is an &lt;em&gt;in media res&lt;/em&gt; snapshot of the planning around my Innovating on Tetris project. Hopefully there is something to learn on how I've approached this project to help you achieve your goals on your gamedev journey.&lt;/p&gt;

&lt;p&gt;You can follow along with the open repo &lt;a href="https://github.com/JerkyTreats/tetris"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step One: Build Tetris
&lt;/h2&gt;

&lt;p&gt;We all know it. Pretty dope stuff.&lt;/p&gt;

&lt;p&gt;Uses &lt;a href="https://tetris.fandom.com/wiki/SRS"&gt;SRS&lt;/a&gt; rotation, the rotation system users didn't realize they want. Handles wallkicks.&lt;/p&gt;

&lt;p&gt;Basically an exact copy of the (amazing) &lt;a href="https://www.youtube.com/watch?v=ODLzYI4d-J8"&gt;YouTube tutorial&lt;/a&gt; by &lt;a href="https://github.com/zigurous/"&gt;Zigurous&lt;/a&gt;. This includes their assets and copypasta &lt;code&gt;tetromino&lt;/code&gt; data.&lt;/p&gt;

&lt;p&gt;There are some nice advantages of taking an existing game and innovating on top of it. It gets you a first milestone &lt;em&gt;very&lt;/em&gt; quickly- a couple hours to get Tetris working (thanks to the tutorial). &lt;/p&gt;

&lt;p&gt;From that starting point, I can really start thinking about my goals for the remainder of the project. &lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Define Goals
&lt;/h2&gt;

&lt;p&gt;There are a bunch of different goals I'm working on for this prototype. Maximum learning and experimentation is top-of-mind, all the while pushing to become a better developer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Design Goals
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Detailed Design requirements in &lt;a href="https://github.com/JerkyTreats/tetris/blob/main/Blog/multiboard_tetris_design.md"&gt;Blog/multiboard_tetris_design.md&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stitch multiple boards together.&lt;/li&gt;
&lt;li&gt;After clearing arbitrary amount of lines from current board, move to the next board.&lt;/li&gt;
&lt;li&gt;Complete all boards to complete game.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Programming Goals
&lt;/h3&gt;

&lt;p&gt;For this project I'll be dusting off Unity3d for the first time in over 4 years (coincidentally my kid is 4... funny how that works). &lt;/p&gt;

&lt;p&gt;The nice thing about choosing a well established casual game with tons of tutorials, is it allows you rediscover all those Unity basics- GameObjects and Components and Monobehaviours. &lt;/p&gt;

&lt;p&gt;From there I can start playing with different features and think critically about the code I'm writing. &lt;/p&gt;

&lt;h4&gt;
  
  
  Large Goals
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Unity UI &lt;strong&gt;DONE&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;Data Serialization &lt;strong&gt;DONE&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Gameplay Manager &lt;strong&gt;DONE&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Better Input Systems &lt;/li&gt;
&lt;li&gt;Complete Multiboard Tetris feature requirements&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Small
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Score/Reward&lt;/li&gt;
&lt;li&gt;Scaling Speed on line(s) cleared.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Completed Goals
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Complete Tetris Tutorial&lt;/li&gt;
&lt;li&gt;Dynamic Border&lt;/li&gt;
&lt;li&gt;Dynamic Background Grid&lt;/li&gt;
&lt;li&gt;Add proper new piece queue (A bag containing each piece randomly chosen until every piece chosen, then create new bag). "Real" Tetris shouldn't be full random Piece selection.&lt;/li&gt;
&lt;li&gt;Dynamic Camera&lt;/li&gt;
&lt;li&gt;Multiple Boards&lt;/li&gt;
&lt;li&gt;Board Editor mode&lt;/li&gt;
&lt;li&gt;Gameplay Manager&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Known Bugs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;del&gt;Ghost piece shouldn't search from bottom up, it should start from top and search down.&lt;/del&gt;

&lt;ul&gt;
&lt;li&gt;If the &lt;code&gt;I&lt;/code&gt; piece is the first to spawn, its Ghost will be placed in an incorrect position.&lt;/li&gt;
&lt;li&gt;The ghost for &lt;code&gt;I&lt;/code&gt; in general seems a bit messed up. I think its because its the only piece that is one size high.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>unity3d</category>
      <category>programming</category>
      <category>gamedev</category>
      <category>architecture</category>
    </item>
    <item>
      <title>The Game Developers Guide to the Metaverse</title>
      <dc:creator>Justin Nearing</dc:creator>
      <pubDate>Fri, 17 Sep 2021 05:41:07 +0000</pubDate>
      <link>https://dev.to/jerkytreats/the-game-developers-guide-to-the-metaverse-55ie</link>
      <guid>https://dev.to/jerkytreats/the-game-developers-guide-to-the-metaverse-55ie</guid>
      <description>&lt;p&gt;It seems that overnight everyone started talking about the Metaverse. From Microsoft CEO Satya Nadella to Mark Zuckerberg, to CryptoTwitter to blogs, everyone has grand visions for this thing they’re calling the “Metaverse.” &lt;/p&gt;

&lt;p&gt;Ask them what the metaverse is, and you’ll likely get a different answer for each person you ask.&lt;/p&gt;

&lt;p&gt;So, what is this Metaverse at its fundamental level? &lt;/p&gt;

&lt;p&gt;&lt;em&gt;The Metaverse is a Decentralized Network of Content&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let’s break that down. &lt;/p&gt;

&lt;p&gt;Content is what you’d expect- text, images, video, audio, etc. From the videos uploaded to YouTube to the content you see on Twitter, it’s all content. &lt;/p&gt;

&lt;p&gt;When that content has a common interface to connect with each other, it forms a network. Think of it as the comments on a YouTube video actually being Tweets.  &lt;/p&gt;

&lt;p&gt;But there’s a problem of ownership when your YouTube comments are Tweets- the platform owners jealously guard the content on their platforms. As such, there cannot be a single owner for the Metaverse- no single trusted party can be the definitive source of truth.&lt;/p&gt;

&lt;p&gt;If only there was a verifiably secure, fully decentralized, distributed ledger that could act as the common interface for all this content. What’s that? This the literal use case of blockchains? How surprising we’re all of a sudden talking about the Metaverse! &lt;/p&gt;

&lt;p&gt;From the lens of game development, this global content network allows for fundamental shifts in how games are developed. &lt;/p&gt;

&lt;h2&gt;
  
  
  From Game Creator to Game Curator
&lt;/h2&gt;

&lt;p&gt;The most significant mental shift for understanding the Metaverse is to think of game “mods” as the starting point. The pattern today is for you to build a game from scratch, and allow the community to build content around your game. &lt;/p&gt;

&lt;p&gt;With the Metaverse, you start with the community content, and build your game around the preexisting global content network. &lt;/p&gt;

&lt;p&gt;When you make that shift, it means you stop being game creators, but game curators. &lt;/p&gt;

&lt;p&gt;Instead of building a high tech sweatshop to grind out game assets, you have a marketplace to decide what content you want from the Metaverse. &lt;/p&gt;

&lt;p&gt;This means partnerships with independent content creators whose business model revolves around building and selling assets for the Metaverse. &lt;/p&gt;

&lt;p&gt;This means that as a game studio, you are focusing on building a porous walled garden- pulling assets from the Metaverse for use in the sandbox of your game. &lt;/p&gt;

&lt;h2&gt;
  
  
  Game Curation Changes Game Development
&lt;/h2&gt;

&lt;p&gt;Carefully controlling how porous the garden is crucial. Too open, you lose control and quality suffers. Too restrictive, and you lose the network effect of the greater gaming “Metaverse.”&lt;/p&gt;

&lt;p&gt;Therefore, content creation for your studio becomes a funnel, similar to your customer flow- many possible content creators, fewer creators that have contributed to your game, fewer that are considered core developers.  &lt;/p&gt;

&lt;p&gt;The developers of your game lie on a curve ranging from a random artist on the internet, to day-to-day core developer. &lt;/p&gt;

&lt;p&gt;On the rando artist end of the range, it's a simple transactional relationship. They create content for the Metaverse, and the content is consumed for money. &lt;/p&gt;

&lt;p&gt;The more successful the artist is on your platform, the more likely they will start creating art specifically for your platform. &lt;/p&gt;

&lt;p&gt;You start moving up the development curve, and with it a symbiotic relationship between artist and platform. It’s a virtuous cycle where creators build content for your game as they are rewarded for the content they’ve built. &lt;/p&gt;

&lt;p&gt;Become successful enough, it doesn’t take much to become indistinguishable from core developers. &lt;/p&gt;

&lt;h2&gt;
  
  
  DAOs Provide Structure to Decentralized Development
&lt;/h2&gt;

&lt;p&gt;This decentralized development- this curve from least engaged to most engaged- can be expressed in a Decentralized Autonomous Organization. &lt;/p&gt;

&lt;p&gt;DAO’s are shared digital communities that have their own currency and governance rules expressed in a blockchain. &lt;/p&gt;

&lt;p&gt;The thing about these DAO Tokens- their currency- is that it puts a numerical value on your involvement within the community. The bigger the number, the more influential you are within that community. This is an oversimplification, and things like quadratic funding solves for the obvious problems of money equaling votes, but the basic principle stands. &lt;/p&gt;

&lt;p&gt;If you award content creators with your DAO Token for the sales they make, it provides the backbone for the curve of game developers within your ecosystem. It provides incentive to content creators as the market rewards their success. &lt;/p&gt;

&lt;p&gt;Similarly, governance of the organization is defined on the blockchain. It can define what decisions to make, and who is making those decisions. A successful content creator in your game, rewarded with the DAO tokens of your organization, gives them the ability to become involved in the direction of the game. &lt;/p&gt;

&lt;p&gt;Combined with the fact that they have incentive to influence the game, and you have an incredible on-ramp for a game development community. &lt;/p&gt;

&lt;p&gt;This is a radical departure from traditional game development. Decentralized game development, by way of decentralized content networks, blurs the lines between consumer and creator, player and developer. &lt;/p&gt;

&lt;h2&gt;
  
  
  Decentralized Disruption
&lt;/h2&gt;

&lt;p&gt;Technological progress keeps equalizing the playing field in game development. Game engines are at their most powerful, and accessible. The amount of people able and willing to play games continues to grow. &lt;/p&gt;

&lt;p&gt;But, there are still massive imbalances in where games are being made, and who are making them. Simply put, there are a lot of white men in game development. &lt;/p&gt;

&lt;p&gt;Blockchains provides a massive leap forward in decentralized technology, and with it the opportunity for a more meritocratic development structure on a global scale. &lt;/p&gt;

&lt;p&gt;Truth be told, this is one area that the games industry desperately needs disruption. Development shops do resemble high tech sweatshops. Gender and racial abuse are rife within the industry. &lt;/p&gt;

&lt;p&gt;New rules can be written, by way of Decentralized Autonomous Organizations, and new games can be explored through Decentralized Content Networks. &lt;/p&gt;

&lt;p&gt;What is the Metaverse? A chance for us to do better. &lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>The Game Developers Guide to NFTs</title>
      <dc:creator>Justin Nearing</dc:creator>
      <pubDate>Sat, 28 Aug 2021 17:43:23 +0000</pubDate>
      <link>https://dev.to/jerkytreats/the-game-developers-guide-to-nfts-30jj</link>
      <guid>https://dev.to/jerkytreats/the-game-developers-guide-to-nfts-30jj</guid>
      <description>&lt;p&gt;The blockchain is going to revolutionize the gaming industry.&lt;/p&gt;

&lt;p&gt;When a game’s digital currency becomes an openly traded token, and game objects are fully owned by players as NFTs, a brave new world of game development becomes possible.&lt;/p&gt;

&lt;p&gt;The opportunities afforded by this innovation are incredible. What follows is an exploration into how blockchain technology provides so much potential, and how you can start building a framework for integrating NFT’s into games.&lt;/p&gt;

&lt;p&gt;A note before we begin: This is an idealized vision for blockchain technology. There are significant challenges still to be overcome- Scaling and regulatory pressures to name just two.&lt;/p&gt;

&lt;p&gt;For the purposes of this article, we are assuming that these issues will be resolved over time- and use this time to understand the technology, its capabilities, and to start building a blockchain strategy for games.&lt;/p&gt;

&lt;p&gt;We need to start now, so that when these issues are resolved, we can be ready for the inevitable wave- a wave as revolutionary as the free-to-play innovation that swept game development a decade ago. This will be the blockchain wave.&lt;/p&gt;

&lt;p&gt;To be prepared for the Big One, we need to buy our surfboard, be in the water, and be ready to swim as the wave starts forming.&lt;/p&gt;

&lt;p&gt;By the way, these are shark infested waters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Buying the Surfboard
&lt;/h2&gt;

&lt;p&gt;The problem with paradigm shifts is you have to start at the beginning. Legacy game studios took so long to transition to free-to-play models because it was diametrically opposed to the decades of knowledge built around AAA games.&lt;/p&gt;

&lt;p&gt;With the blockchain, we once again start at the beginning. It’s the perennial curse of game development- you feel so damn old because everything’s new all over again.&lt;/p&gt;

&lt;p&gt;You can read my &lt;a href="https://jerkytreats.dev/crypto-narratives-blockchains-69dfbf8d54d9" rel="noopener noreferrer"&gt;primer on blockchain fundamentals&lt;/a&gt; to get an understanding of the underlying technology NFT’s are built atop of.&lt;/p&gt;

&lt;p&gt;Then you can read my &lt;a href="https://jerkytreats.dev/modern-game-design-the-arm-triangle-584c60724484" rel="noopener noreferrer"&gt;framework for Modern Game Design&lt;/a&gt;, providing context to the design and operation of highly successful free-to-play games.&lt;/p&gt;

&lt;p&gt;While these aren’t requirements for this article, having a solid frame of reference will help in understanding the potential this technology provides.&lt;/p&gt;

&lt;p&gt;Blockchain technology, and NFTs, create an order of magnitude more complexity for managing your games economy. It also provides an unprecedented opportunity for game developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Power of Non Fungible Tokens
&lt;/h2&gt;

&lt;p&gt;Any game object owned by a player- any item in their inventory, any character, any achievement, can be represented on-chain as a Non-Fungible Token (NFT).&lt;/p&gt;

&lt;p&gt;NFTs are a type of smart contract. Smart contracts are pieces of code that live on a blockchain, and define the capabilities of a token.&lt;/p&gt;

&lt;p&gt;Non-fungible is a fancy way of saying “not interchangeable.” A ten dollar bill can be replaced by another ten dollar bill, and no one cares- it’s still a representation of ten dollars- despite subtle differences in serial numbers, print date, and wear of the bill.&lt;/p&gt;

&lt;p&gt;Non-fungible tokens are not interchangeable. The easiest way to think about them is to compare it to baseball cards.&lt;/p&gt;

&lt;p&gt;You can have duplicates, but they are not interchangeable representations of a unit of account. Those unique attributes- serial numbers, print date, wear, are of much greater importance.&lt;/p&gt;

&lt;p&gt;Every object put on-chain is persistent, and truly owned by the wallet owner. Within the game, these objects have utility- it is a game object after all. Instead of storing this object within your games database, the object is stored on a fully decentralized blockchain.&lt;/p&gt;

&lt;p&gt;Out of the game, the NFT has value. Like baseball cards, these tokens can be traded for money or like kind- trading cards at the schoolyard. The utility in your game gives you a base level of value, but the maximum value can be much higher- its prices set on a secondary market.&lt;/p&gt;

&lt;p&gt;This shift to true ownership of your games objects, coupled with the ability to hook these owned objects into a dynamic marketplace, is the root of why NFT’s are so revolutionary.&lt;/p&gt;

&lt;p&gt;NFT’s are so revolutionary because they sit at the nexus of Community Driven Marketing, Engagement Campaigns, and Long-Tail Monetization.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgdpnhkq1sn9lwdao8dje.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgdpnhkq1sn9lwdao8dje.png" alt="The Power of NFTs"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In my article on &lt;a href="https://jerkytreats.dev/modern-game-design-the-arm-triangle-584c60724484" rel="noopener noreferrer"&gt;ARM Game Design Theory&lt;/a&gt;, I list &lt;em&gt;community-driven marketing, re-engagement campaigns,&lt;/em&gt; and &lt;em&gt;long-tail monetization&lt;/em&gt; as the three pillars of a successful free-to-play game business.&lt;/p&gt;

&lt;p&gt;NFT’s are the holy grail of these three points. As opposed to game features that cause tension with each other (think the issues players have with “pay to win” game mechanics), NFT’s maximize and reinforce each pillar.&lt;/p&gt;

&lt;h2&gt;
  
  
  Community Driven Marketing
&lt;/h2&gt;

&lt;p&gt;Growth of free-to-play games is largely gated by player acquisition cost. The vast majority of new users brought into a game are purchased by auction in a highly competitive marketplace- at absolutely insane prices.&lt;/p&gt;

&lt;p&gt;New player acquisition is so important that developers calculate every players lifetime value. The profitability of your game requires an aggregate LTV greater than your acquisition cost.&lt;/p&gt;

&lt;p&gt;As such, organic growth is one of the big focuses for a game studios marketing department. If you can acquire users without directly paying per install, you sidestep one of the single largest sources of a game’s operating cost.&lt;br&gt;
NFT’s present the biggest organic growth opportunity in over a decade.&lt;/p&gt;

&lt;p&gt;NFTs have real, transactable value, and are truly owned by the player. This creates strong incentives for the player to grow the value of their NFT’s.&lt;/p&gt;

&lt;p&gt;A users NFT collection incentives them to become ambassadors and evangelists for your game.&lt;/p&gt;

&lt;p&gt;A single user advertising your game might not have the same impact as a tracked million dollar ad campaign, but any new user acquired this way is essentially free (from a marketing perspective). At scale, this can drive a level of organic growth that is self-sustaining.&lt;/p&gt;

&lt;p&gt;For content creators and influencers, targeted NFT drops creates a win-win for both your game and the content creator. Think of a scenario where you create a limited edition NFT run of 100 NFT’s. You give these 100 NFT’s to the content creator, for them to do with as they please.&lt;/p&gt;

&lt;p&gt;A savvy creator is going to create content campaigns for the NFT’s. Contests, engagement lotteries, VIP community rewards, etc. They put in the work of growing their brand, and your brand lies in the cut. &lt;/p&gt;

&lt;p&gt;This outsources your marketing in a very cost effective manner- As long as you are judiciously managing your NFT economy (a subject for a future article), you have a very attractive ROI for this marketing strategy.&lt;/p&gt;

&lt;p&gt;For marketing, NFT’s creates passive incentives for your users. Incentive structures like these, at scale, creates FOMO for your game. And most powerfully, NFTs allows marketers to engineer FOMO events through engagement campaigns.&lt;/p&gt;

&lt;h2&gt;
  
  
  Engagement Campaigns
&lt;/h2&gt;

&lt;p&gt;The secret to a long lived game lies in the Live Operations of that game. New content, continually released, aimed at specific player segments to keep the show going. A strong Live Operations team can have a free-to-play game reach all-time highs for revenue and player count years after initial release.&lt;/p&gt;

&lt;p&gt;The key to a successful Live Operations team is how that new content is released. The manner in which you release new narratives, game assets, and features; is hugely important to the successful operation of a live game.&lt;/p&gt;

&lt;p&gt;NFT’s supercharge your content pipeline.&lt;/p&gt;

&lt;p&gt;When you have an NFT that is owned by the player, and you attach a scheduled in-game reward to that NFT, you have an incredibly powerful retention mechanic.&lt;/p&gt;

&lt;p&gt;Imagine a scenario where every 24 hours a users NFT can be “activated” in-game, for an in-game reward.&lt;/p&gt;

&lt;p&gt;Those same passive incentive structures that are available to your marketing department are available to your LiveOps team. For this team, incentivizing players to log into the game daily is a big deal.&lt;/p&gt;

&lt;p&gt;Things really get going when you change the state of the NFT on enough in-game activations- If a player activates their NFT every 24 hours for a month, the NFT gets upgraded and starts granting better rewards per 24 hours.&lt;/p&gt;

&lt;p&gt;Tell me about your D30 retention when all your players have this type of NFT. Even if some users are only logging into the game to farm upgraded NFTs for resale on the secondary market, you get 30 chances to hook those users into the other features of your game- not to mention the revenue from their sale.&lt;/p&gt;

&lt;p&gt;And this says nothing about getting early access to content based on a player’s owned NFT, or exclusive content. As you go up the rarity curve, these NFT’s can be tied to things like governance- the ability to provide design and feedback, or even development access- granting read rights to the codebase.&lt;/p&gt;

&lt;p&gt;NFT’s are capable of all of this. They provide a unified mechanism to define your players’ relationship to your game. And every time an NFT changes hands, you get paid.&lt;/p&gt;

&lt;h2&gt;
  
  
  Long-Tail Monetization
&lt;/h2&gt;

&lt;p&gt;NFT’s exist on-chain, and as such, can be traded for digital currency. Smart contracts, which form the basis of your NFT, allows you to write very specific rules on what happens when a trade is executed. This enables you to get a percentage for all trades on the secondary market.&lt;/p&gt;

&lt;p&gt;For the entire lifetime of the NFT, you get paid per transaction. Consider again the marketing strategy of gifting 100 limited edition NFT’s to a content creator: &lt;/p&gt;

&lt;p&gt;As those NFT’s are traded on the secondary market, you get a portion of the proceeds per sale. How many marketing campaigns can you think of that provides a direct source of revenue?&lt;/p&gt;

&lt;p&gt;How many can you think of that generates revenue over the long-term? Because you get paid for every transaction of an NFT, for the lifetime of that NFT- developers can plan for a much longer term than ever before. This means your engagement campaigns, and marketing strategy, can also be designed for the long term.&lt;/p&gt;

&lt;p&gt;And that’s just where the monetization opportunities start. This is a hugely unexplored area. Consider the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Digital currency that gets minted by trades on the secondary market&lt;/li&gt;
&lt;li&gt;Burning NFTs to mint digital currency&lt;/li&gt;
&lt;li&gt;Converting and merging NFTs for more expensive ones&lt;/li&gt;
&lt;li&gt;Directly minting NFTs for money&lt;/li&gt;
&lt;li&gt;Cosmetic enhancement of NFTs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The monetization opportunities are incredible, and will warrant their own articles in the future.&lt;/p&gt;

&lt;p&gt;Those features and incentives, that are so attractive to Marketers and LiveOps, are all grounded by the increase in real monetary value. Users are rewarded by putting in the work to increase the monetary value of the items they own. Developers are rewarded by the work those users put in, as well as the sale of those items.&lt;/p&gt;

&lt;p&gt;This is why NFTs, if properly harnessed by developers, are such a powerful tool. They create feedback loops that captures, retains, and rewards players.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Revolution Will be Tokenized
&lt;/h2&gt;

&lt;p&gt;Non fungible tokens, and digital currencies, allows for nothing short of a revolution within the games industry. The capabilities of this technology allows you to create community-driven marketing strategies, that tie directly into your content engagement campaigns, that are monetizable over the long term.&lt;/p&gt;

&lt;p&gt;In the coming articles we’ll further explore the deeper implications of NFT’s- how they change a game studios staffing and management. We’ll investigate some of the anti-patterns and risks in managing your NFT economy. We’ll also look into digital currencies themselves- the implications of turning your in-game currencies to real world, tradable currencies.&lt;/p&gt;

&lt;p&gt;The good news is time is on our side. The blockchain industry still needs to mature to allow the technology to stabilize, and allow transaction costs to race to zero. Once the stage is set, savvy developers will be able to capitalize on the amazing opportunities the blockchain affords.&lt;/p&gt;

&lt;p&gt;Those savvy developers are starting now. They’re experimenting with these systems, gaining an understanding of the technology, and developing an integration strategy.&lt;br&gt;
When the inevitable wave arrives, they’ll be in the water and ready to surf the Big One.&lt;/p&gt;

&lt;p&gt;Will you be among them?&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>nft</category>
      <category>gamedev</category>
    </item>
  </channel>
</rss>
