<?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 Jon Foust on Medium]]></title>
        <description><![CDATA[Stories by Jon Foust on Medium]]></description>
        <link>https://medium.com/@jonfoust?source=rss-3227692b2dda------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*saxw8KfyjT6fpU2PJaSkHQ.jpeg</url>
            <title>Stories by Jon Foust on Medium</title>
            <link>https://medium.com/@jonfoust?source=rss-3227692b2dda------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 04:39:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jonfoust/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[Creating a Game Frontend: Setting up Protos and Services in C#]]></title>
            <link>https://jonfoust.medium.com/creating-a-game-frontend-setting-up-protos-and-services-in-c-214aefbeb106?source=rss-3227692b2dda------2</link>
            <guid isPermaLink="false">https://medium.com/p/214aefbeb106</guid>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[services]]></category>
            <category><![CDATA[grpc]]></category>
            <category><![CDATA[c-sharp-programming]]></category>
            <dc:creator><![CDATA[Jon Foust]]></dc:creator>
            <pubDate>Tue, 15 Dec 2020 01:05:02 GMT</pubDate>
            <atom:updated>2021-04-05T21:30:37.533Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This post is part of a series of posts on Open Match. If you want to follow from the beginning start with the </em><a href="https://medium.com/@jonfoust/open-match-overview-6f1cd612c81a"><em>Overview</em></a><em> and then read the </em><a href="https://medium.com/@jonfoust/open-match-deep-dive-794fcc3b9e9"><em>Deep Dive</em></a></p><blockquote>(This post was edited on Apr. 5, 2020 to resolve broken gists)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/0*tuklcIs-deO4hp3A.png" /></figure><p>Open Match enables you to customize and design a matchmaker, but there is functionality that it does not offer. For example, Open Match is not responsible for player data nor other game components such as inventory, friends lists, or leaderboards. This creates the need for a service to interact with Open Match that can access these components. If you haven’t figured it out from the title of this blog post, I’m talking about a Game Frontend.</p><p>A Game Frontend serves two essential purposes when designing your matchmaker. The first is handling what Open Match does not: interactions with other game components. The other is providing a layer between game clients and Open Match. You do not want game clients to interact with Open Match directly, because it would allow users to potentially submit a request with unvalidated information. Imagine a player who has a skill rating of 1000 submitting a request with a skill rating of 3500; not fun. The Game Frontend enables you to submit matchmaking requests with authenticated user data from your game components. To connect with players online, we must first create a ticket to represent a matchmaking request.</p><h3>Setup</h3><p>To create this Game Frontend sample, we will use the following resources:</p><ul><li>Visual Studio 2017 Community: C# console app</li><li>Open Match Messages <a href="https://github.com/googleforgames/open-match/blob/master/api/messages.proto">proto</a> file</li><li>gRPC</li></ul><h4>Create Two C# Console Applications</h4><p>To simulate the Game Frontend and client, we will create two C# console applications. Name them “Game Client” and “Game Frontend.” They will represent our client and server, respectively. If you’re unfamiliar with creating a C# application in Visual Studio, check out <a href="https://docs.microsoft.com/en-us/visualstudio/get-started/csharp/tutorial-console?view=vs-2017#create-a-projecthttps://docs.microsoft.com/en-us/visualstudio/get-started/csharp/tutorial-console?view=vs-2017#create-a-projecthttps://docs.microsoft.com/en-us/visualstudio/get-started/csharp/tutorial-console?view=vs-2017#create-a-project">Tutorial: Create a simple C# console app in Visual Studio</a>..</p><h4>Install Necessary Nuget Packages</h4><p>Once you have made the two console applications, we should install the gRPC Nuget packages. The packages to install are:</p><ul><li><a href="https://www.nuget.org/packages/Grpc/">gRPC</a> by The gRPC Authors</li><li><a href="https://www.nuget.org/packages/Grpc.Tools/2.33.1">gRPC.Tools</a> by The gRPC Authors</li><li><a href="https://github.com/protocolbuffers/protobuf">Google.Protobuf</a> by Google Inc.</li></ul><h4>Setup a Project for Generating Protos</h4><p>The next step is to create a folder in your solution in Visual Studio to hold the proto files. Right-click the solution, add a “solution folder”, and name it <strong><em>protos</em></strong>.</p><p>These next steps can be a bit tedious if you’ve never edited a .csproj file. Here is what you need to do:</p><p>(Here are two snippets you’ll use during this process)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/90779898a0d55b43741e8549022ec216/href">https://medium.com/media/90779898a0d55b43741e8549022ec216/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c1a7a148108de9e335904f8d1cd4b97/href">https://medium.com/media/2c1a7a148108de9e335904f8d1cd4b97/href</a></iframe><ol><li>Right-click the client project and select <em>Unload Project</em>.</li><li>Right-click the client project and select “edit client.csproj”.</li><li>Scroll down and find the item group that contains the “Program.cs” within it.</li><li>Add the snippet for the client.csproj above the “Program.cs” item group</li><li>Save and close the client.csproj file</li><li>Repeat steps 1–5 for the server.csproj file (using the server.csproj snippet for step 4).</li><li>Right-click each of the projects and select <em>Reload Project</em>.</li><li>Right-click each of the projects and add a folder to each named <em>models.</em></li><li>Right-click both projects and build them (you will get a couple of errors for a missing file, but we will resolve them).</li></ol><p>To recap, we have defined for the project both the proto file locations and where the generated .cs will be saved.</p><p>Now we are all set up to create a game frontend. If you haven’t cloned Open Match, please do. Locate messages.proto (open-match/api/messages.proto), which we will be using to create a ticket (in a later blog post), and copy it into the protos directory you’ve made. An additional dependency is required, located in <em>third-party/google/rpc/status.proto, </em>so be sure to place that file in the protos directory as well.</p><p>Great! Now that you’ve finished the initial setup, let’s implement the proto file we need to define our messages and services for the game frontend.</p><h3>Implementing the FindMatch RPC service</h3><p>To kick things off, create <em>gamefrontend.proto </em>in the protos folder, which will be used to implement the gRPC service you’ll need to communicate with Open Match and the game client. Here is a snippet of code to paste in the file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c50dd2b32954e7bd79b7b6aea30b06cf/href">https://medium.com/media/c50dd2b32954e7bd79b7b6aea30b06cf/href</a></iframe><p>We import the messages.proto to get some of the essential definitions needed to submit requests to Open Match. The FindMatch service handles a request containing a player id (and any other relevant info required to matchmake) and returns an Assignment, the game server address the client will use to connect for the game.</p><p>Save the file and build the client and server to generate the classes (gamefrontendgrpc.cs and gamefrontend.cs) needed to implement our services.</p><p>To begin implementation, right-click, and add a class to the server project named <em>gamefrontendservice.cs</em>. Copy the code snippet below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c2bc7dd0934fe5ba169775efc7a38a15/href">https://medium.com/media/c2bc7dd0934fe5ba169775efc7a38a15/href</a></iframe><p>In the snippet above, we add a reference to our OpenMatch and Gamefrontend namespaces. This allows us to implement our FindMatch service using message definitions. We accomplish the following in this code:</p><ol><li>Define our FindMatch Service functionality.</li><li>Accept the ID of the game client requesting a match (for player info lookup).</li><li>Generate a dummy IP address that the game client will connect to.</li><li>Create an Assignment message containing the dummy IP address.</li><li>Return the Assignment as a response.</li></ol><p>Now that we’ve implemented the service let’s finalize our Game Frontend server-side code.</p><h3>Wrapping up the Game Frontend (Server-side)</h3><p>Begin by opening Program.cs for the Game Frontend. In this application, we want to create our server and bind our FindMatch service. We also define the ports our server will run on (localhost on port 50051 for now). Here is a snippet that accomplishes these goals:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7958516a60d57cdcd57e376f7bb4b8a5/href">https://medium.com/media/7958516a60d57cdcd57e376f7bb4b8a5/href</a></iframe><p>Now that we’ve completed our server-side code, let’s write our client-side code to connect and submit a match request.</p><h3>Game Client (client-side)</h3><p>This client code is used to implement the game clients that will be submitting requests to the Game Frontend service. Open Program.cs for the Game Client application and paste the following snippet:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c1546f451344f1c9ada426b7f8de185d/href">https://medium.com/media/c1546f451344f1c9ada426b7f8de185d/href</a></iframe><p>We accomplish the following in this snippet:</p><ol><li>Establish a connection with the Game Frontend.</li><li>Generate a player id for player data lookup.</li><li>Submit a FindMatch request to the Game Frontend.</li><li>Process the response and output the Assignment received.</li></ol><p>We need to load player data when submitting our ticket to Open Match, so we’ll handle it on the server side. To perform a lookup for the player data, we provide the game client/player id as part of our request. We sit back and wait for the Game Frontend (and Open Match) to assign the client a game server address.</p><h3>Wrapping up</h3><p>Now that we have finished building out the Game Frontend let’s do a quick test. Run and start your Game Frontend application first. It will begin listening for incoming connections/requests. Next, start your Game Client application to connect and await for an assignment (which should happen pretty quickly). When it does, you should see output similar to this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/0*-8fEbVGWvaSr188B" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/0*FMXfpHNQFDbBC83J" /></figure><p>This is a simulation of what we should expect from the full Game Frontend service, and it’s a great stopping point until the next blog post, in which we’ll connect our Game Frontend with Open Match.</p><p>You can find the source code for this sample: <a href="https://github.com/jonfoust/GameFrontend/tree/csharp-gamefrontend">GitHub</a></p><p>If you have any questions or comments, feel free to message me on <a href="https://twitter.com/syntxerror1">Twitter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=214aefbeb106" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Open Match: Writing a Skill Based Match Function]]></title>
            <link>https://jonfoust.medium.com/open-match-writing-a-skill-based-match-function-b2bc8678bd71?source=rss-3227692b2dda------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2bc8678bd71</guid>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[matchmaking]]></category>
            <dc:creator><![CDATA[Jon Foust]]></dc:creator>
            <pubDate>Tue, 06 Oct 2020 00:52:07 GMT</pubDate>
            <atom:updated>2021-04-05T21:42:34.615Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’re still following along, we’ve explored Open Match services and how they help build your game’s matchmaker. Skill based matchmaking is very common for online multiplayer games, so let’s explore how to write a skill based match function. We’ll go over a few setup steps and considerations to ensure you’re providing the Match Function all the data to connect players. Full disclosure: This blog post will provide dummy data (I’ll explain where it’s used and why) to represent your player information throughout the matchmaking process. Your game may have player data stored externally from Open Match.</p><h4><strong>Profiles and Ticket Pools</strong></h4><p>In my previous <a href="https://medium.com/@jonfoust/open-match-deep-dive-794fcc3b9e9">blog post</a>, I discussed what Profiles and Ticket Pools are. Profiles set the criteria, such as a game mode, for our matches. Open Match uses one to three types of filters to create the criteria for profiles to populate ticket pools. To specify skill ranges, <a href="https://github.com/googleforgames/open-match-docs/blob/master/site/content/en/docs/Reference/api.md#openmatch.DoubleRangeFilter">DoubleArgFilters</a> are used to set min and max values for a given DoubleArg. If a ticket fits the criteria, it’ll enter a collection of tickets that have also met the match criteria called a ticket pool. Our Match Function will look through ticket pools to select tickets for matches. Here’s a snippet using a max and min DoubleArg value to define a skill range for a profile:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e099922632864d1a747898d4d513b0a2/href">https://medium.com/media/e099922632864d1a747898d4d513b0a2/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ad0a584886d2c205c21fcb721b8e366c/href">https://medium.com/media/ad0a584886d2c205c21fcb721b8e366c/href</a></iframe><p>The snippet above is creating overlapping profiles based on skill. Overlapping profiles occur when profiles intersect based on filters (such as skill). Tickets that end up in multiple ticket pools are considered for numerous matches and will likely find a match faster. To achieve overlapping profiles, make min/max DoubleArgFilters intersect with one another. Here’s an example (from Open Match <a href="https://openmatch.dev/site/docs/guides/evaluator/#case2-overlapping-matchprofiles">Documentation</a>):</p><ul><li>Profile1 has a Pool that filters all Tickets with skill levels 0 to 5.</li><li>Profile2 has a Pool that filters all Tickets with skill levels 2 to 8.</li><li>Profile3 has a Pool that filters all Tickets with skill levels 6 to 10.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/0*XMwQ0Halg_7bP3k6" /><figcaption>Profiles will generate ticket pools based on filters. Tickets may end up in multiple ticket pools.</figcaption></figure><p>Overlapping profiles are great but will cause collisions when tickets are selected for multiple matches. We’ll explore how to decouple these collisions later on. Now that we’ve set up our ticket pools, we should finally get into writing our Match Function.</p><h4><strong>Match Function</strong></h4><p>Now that we’ve configured our profiles to filter tickets according to skill ranges, we can pass the profiles and ticket pools to the Match Function to select a group of tickets to generate a Match Proposals. Match Proposals hold all information which will be used to generate a match such as the tickets, game mode, match profile, etc.</p><p>The following Match Function uses skill to group players together. It accomplishes the following:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/159e403806b67e8c0fa1ad46a4267225/href">https://medium.com/media/159e403806b67e8c0fa1ad46a4267225/href</a></iframe><ul><li>Checks if the current ticket pool has enough tickets to satisfy a match proposal</li><li>Sorts tickets so consecutive tickets are closer in skill</li><li>Removes tickets from pool</li><li>Returns Match Proposals to be streamed to Open Match</li></ul><p>This is a great first step for your Match Function. If this is the behavior you want, congratulations, you’ve written your first Match Function! This match function works best with Match Profiles that aren’t overlapping. Our profiles overlap, so let’s settle any colliding proposals.</p><p>Open Match provides an Evaluator that is responsible for removing collisions and streaming proposals back to Open Match. To add this to your match function, you can add an extension which adds Evaluation criteria for the default Evaluator.</p><p>The following snippet is the complete match function with evaluation criteria. It adds the following functionality:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d1f229df0738d6b3aace3df9403d12c2/href">https://medium.com/media/d1f229df0738d6b3aace3df9403d12c2/href</a></iframe><ul><li>Generates a score which represents the quality of the match</li><li>Appends the quality score to the match proposal</li></ul><p>The Default Evaluator will look at match proposals and any criteria to choose the best matches first. It will choose matches with better quality first to ensure a balanced, enjoyable experience. Once you’ve finished implementing your matchmaking logic, you will deploy your Match Function service on a Kubernetes offering of your choice (such as GKE).</p><h4><strong>The Matchmaking Request</strong></h4><p>With your matchmaker up and running, you might be wondering what submitting a request will look like. A ticket represents a player or group’s matchmaking request. Tickets allow you to add attributes to your ticket which represent player data, including:</p><ul><li>Skill</li><li>Role</li><li>Game mode</li><li>Region</li><li>Ping</li></ul><p>Here’s what a ticket could look like for your skill-based Match Function:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cec55d143560e7a55dc0be5db56049ec/href">https://medium.com/media/cec55d143560e7a55dc0be5db56049ec/href</a></iframe><p>Open Match tickets accept numerical search fields as DoubleArgs. You can provide a key-value to represent this field. Here we specify the string <em>skill</em><strong><em> </em></strong>as our key and a randomly generated float as our value. We are randomly generating a float here to simulate a skill rating accessed from externally stored player data. To stay true to typical <a href="https://www.khanacademy.org/math/statistics-probability/modeling-distributions-of-data/normal-distributions-library/a/normal-distributions-review#:~:text=Normal%20distributions%20have%20the%20following,the%20center%20of%20the%20distribution&amp;text=7%25approximately%20equals%2C%2099%2C,standard%20deviations%20of%20the%20mean">skill level distribution</a>, I thought it would be best to normalize skill levels within a given range. To do so, I’ve added a method to randomly generated a number within the range 0–5 with a normal distribution of 3 called <em>generateSkill</em>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2fbfc98a33e72a80ad163700738d137f/href">https://medium.com/media/2fbfc98a33e72a80ad163700738d137f/href</a></iframe><h4>Wrapping up</h4><p>Skilled based matchmaking is a challenging feature to implement because matchmaking logic is very game specific. I hope you’ve gained a bit of insight into writing match logic and you’re inspired to explore Open Match further and make your matchmaker your own. As always, thanks for tuning in and I’m here to answer any questions so reach out to me on <a href="https://twitter.com/syntxerror1">twitter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2bc8678bd71" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Open Match Deep Dive]]></title>
            <link>https://jonfoust.medium.com/open-match-deep-dive-794fcc3b9e9?source=rss-3227692b2dda------2</link>
            <guid isPermaLink="false">https://medium.com/p/794fcc3b9e9</guid>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Jon Foust]]></dc:creator>
            <pubDate>Fri, 11 Sep 2020 22:35:18 GMT</pubDate>
            <atom:updated>2020-09-11T22:35:18.878Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’re still following along from my previous <a href="https://medium.com/@jonfoust/open-match-overview-6f1cd612c81a">blog post</a>, this is all about Open Match. Open Match is a flexible, scalable, and extensible matchmaking framework that grows with your game. To accomplish this, we utilize <a href="https://kubernetes.io">Kubernetes</a>, <a href="https://redis.io/">Redis</a>, and <a href="https://grpc.io/">gRPC</a>. Here is a breakdown of how Open Match uses these technologies to assist in your matchmaking.</p><p><strong>Flexible, Scalable, and Extensible</strong> — If you’re familiar with Kubernetes, these are buzzwords for this open-source software. Kubernetes allows you to containerize and manage the services for your matchmaker. Before we understand the role Kubernetes plays in Open Match, we should explore the Open Match services to see where Open Match benefits from container orchestration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/0*Yq_D408DOwPvUQDR" /><figcaption>Open Match Architecture</figcaption></figure><p>All matchmakers have standard functionality, such as receiving requests for matches, performing matchmaking logic, and assigning you to a game server. Open Match was built with this in mind and included that functionality as part of its Core services. Let’s examine these services.</p><h4><strong>Open Match Frontend Service</strong></h4><p>When you make your initial matchmaking request from your game, the Frontend service is responsible for handling it. The Frontend service is accountable for this and other requests, including creating or deleting a Ticket and getting details of a Ticket. Once a request is received, it’ll generate Tickets and store them in a state store(in this case, Redis). Tickets are stored as key-value pairs that allow quick reads/writes to improve access throughout the various services.</p><h4><strong>Open Match Backend Service</strong></h4><p>The Backend service is responsible for generating matches and assigning dedicated game servers to Tickets when the Director invokes it. The Backend service will return assigned Tickets to the Open Match Frontend.</p><h4><strong>Open Match Query Service</strong></h4><p>In my previous post, we talked about profiles. Profiles set the criteria for matches using filters for strings, tags, and float ranges. When a Ticket fits within one of these filters you have defined, it will enter a Ticket pool for the Profile. The Query service triggers the match function, which selects Tickets from these Ticket pools to generate proposed matches.</p><h4><strong>Custom Open Match Services</strong></h4><p>We’ve covered the typical matchmaking functionality and how Open Match core services provide the tools to build them. But how do you implement the unique match logic for your game? The custom Open Match services are what your matchmaker will need to place players in fair and enjoyable matches.</p><h4><strong>Match Function Service</strong></h4><p>The match function service is the custom logic you provide Open Match to create your matches. The Query service triggers the match function service to look at the Ticket pools and generates matches.</p><h4><strong>Evaluator</strong></h4><p>You may want to provide some additional evaluation for match quality when you have complex search fields(latency, skill level, queue entry time, and game mode), overlapping match profiles, and complex match function logic. Open Match ships with a default evaluator that weighs all matches equally but has the functionality to support a custom evaluator for your complex matchmaking needs. Custom evaluation can include prioritizing latency and skill for matches and assigns the proposed match a score. Matches with the highest quality are prioritized and ensure that your matchmaker gives your users the best experience.</p><h4><strong>Benefits of Kubernetes and Open Match</strong></h4><p>Now that we’ve covered all the Open Match services that will make your matchmaker a hit with your players, let’s talk about the advantages of using Kubernetes for Open Match.</p><h4><strong>Scalability</strong></h4><p>Your multiplayer game has become a hit sensation, causing a surge of players way beyond your expectations. We’ve heard all the stories of matchmaking not being able to meet player demand. Imagine hundreds of thousands (possibly millions) of players hitting your Open Match cluster deployed in US-West to put this in perspective. With the help of Kubernetes, you can automatically scale horizontally by increasing the number of pods should a service’s RAM utilization go over 60%, and back down once it has normalized(or below 60% in this example).</p><h4><strong>Run Open Match Anywhere (you can run containers)</strong></h4><p>A feature of Kubernetes is it works with any container runtime. Various cloud providers have Kubernetes runtimes/offerings, allowing you to run publicly (in the cloud). You can also run Kubernetes locally on-prem. A hybrid deployment will enable you to run on a mix of cloud providers and on-prem. Being able to run Open Match with on-prem, publicly, or on hybrid environments gives developers the power to deploy their matchmaker or services optimally or where their players are available regionally.</p><h4><strong>Self-healing</strong></h4><p>If your matchmaker suddenly goes down, Kubernetes can repair the services that fail or restart containers after failed health checks. Because Open Match services communicate with one another, several issues would arise if, for example, the Query service went down. Kubernetes would quickly restart the entire container without exposing your matchmaker to your players, getting them back in your game in no time.</p><h4><strong>Wrap-Up</strong></h4><p>There you have it! Open Match is an excellent solution for anyone who wants to run on a matchmaker on a global scale without having to build from scratch. It grows with your game, is highly available, and offers the customizable options to make it your own.</p><p>Look forward to more Open Match content coming soon, including:</p><ul><li>How to write a match function</li><li>How to submit a matchmaking request from your game</li></ul><p>For Open Match content, check out:</p><ul><li><a href="http://open-match.dev">http://open-match.dev</a></li><li><a href="https://github.com/googleforgames/open-match">https://github.com/googleforgames/open-match</a></li></ul><p>If you have any questions, feel free to reach out to me on <a href="https://twitter.com/syntxerror1">Twitter</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=794fcc3b9e9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Open Match Overview]]></title>
            <link>https://jonfoust.medium.com/open-match-overview-6f1cd612c81a?source=rss-3227692b2dda------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f1cd612c81a</guid>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[matchmaking]]></category>
            <dc:creator><![CDATA[Jon Foust]]></dc:creator>
            <pubDate>Sat, 25 Jul 2020 01:20:13 GMT</pubDate>
            <atom:updated>2020-07-25T01:40:31.413Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IGcgcU9yS8yB-XeP" /></figure><p>Open Match is an open-source, scalable, flexible, and extensible matchmaking framework that grows with the needs of your game. It provides the tools to control how your players are connected for a fair and enjoyable experience while removing concerns about scaling to handle an unexpected surge of players. Open Match provides you with the tools to build a matchmaker and allows some customization of services such as your database to cache players.</p><p>Open Match has core services that accept custom requests or are configurable via extensions that allow you to make matchmaking work for you. These services handle match requests, implement your matchmaking logic, and connect players to available matches/servers. Without getting technical in this blog post, let’s explore what makes Open Match function.</p><h4>Tickets</h4><p>Tickets represent matchmaking requests for a player or group of players. Game clients will create these Tickets, which are handled by Open Match’s Frontend service. A Ticket’s lifecycle for the process continues until:</p><ul><li>It receives an Assignment or game server address</li><li>The game client/player cancels the matchmaking request</li><li>Tickets’ lifespan has exceeded the maximum wait time in the queue.</li></ul><p>Tickets are the most fundamental structure of Open Match that will go through most of its services to match players.</p><h4>Profiles</h4><p>Profiles are the template for match criteria. They specify the attributes of games players will join. If you’re looking for a snipers only, free-for-all, or competitive match, you can create Profiles that look for different attributes in Tickets to meet those match requirements. Once Tickets have met these requirements, the Profile will store them in Ticket pools. Your match function will look through these pools of Tickets to generate match proposals.</p><h4>Match Functions</h4><p>Match functions are the logic that connects players in Open Match. Open Match will run these match functions on groups of Tickets to match players together based on match criteria set in Profiles. You can deploy numerous match functions for specific game modes, skill rankings, and competitive matches.</p><h4>Director</h4><p>The Director is one of the customizable components that allows you to create Profiles that will generate match proposals. The Director will send a request to Open Match for matches, and once found, will set Assignments for the Tickets. Assignments are game server connections for matches. The Director will update each Ticket with an Assignment, and the players will enjoy their match.</p><h4>Evaluator</h4><p>The Evaluator can be customized to deal with Tickets that meet multiple match requirements. Players will typically have faster queue times if they meet multiple match Profiles. This idea in Open Match is known as creating overlapping Tickets. The issue with Tickets match meeting numerous proposals is it causes collisions. The Evaluator will handle these collisions and choose the best match for the player/Ticket. Open Match comes with a Default Evaluator, but you can create a custom evaluator to de-collide the Tickets.</p><h4>How to get started</h4><p>Open Match recently went <a href="https://github.com/googleforgames/open-match/releases/tag/v1.0.0">1.0 in June</a> and is looking for contributors. If you would like to get started, check out the following resources:</p><ul><li><a href="https://open-match.dev/site/">Open Match Site</a></li><li>Check out the <a href="https://open-match.dev/site/docs/getting-started/">Getting Started</a></li><li>Join the Community <a href="https://join.slack.com/t/open-match/shared_invite/enQtNDM1NjcxNTY4MTgzLTM5ZWQxNjc1YWI3MzJmN2RiMWJmYWI0ZjFiNzNkZmNkMWQ3YWU5OGVkNzA5Yzc4OGVkOGU5MTc0OTA5ZTA5NDU">Slack Channel</a></li><li>Join the <a href="https://www.youtube.com/playlist?list=PLhkWKwFGACw0EAYIK1YoSl0gE5Wdx-dbh">Monthly Community Meetings</a></li><li>Check out the Open Match Google Cloud <a href="https://cloud.google.com/blog/products/gaming/open-match-1-0-ready-for-deployment-in-production">Blog Post</a></li></ul><p>Feel free to reach out to the Open Match community in Slack or <a href="https://twitter.com/syntxerror1">me</a> on Twitter with any questions!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f1cd612c81a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bridging the Language Barrier for Gamers]]></title>
            <link>https://jonfoust.medium.com/bridging-the-language-barrier-for-gamers-2d7ce46da616?source=rss-3227692b2dda------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d7ce46da616</guid>
            <category><![CDATA[pub-sub]]></category>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Jon Foust]]></dc:creator>
            <pubDate>Tue, 14 Jan 2020 20:14:16 GMT</pubDate>
            <atom:updated>2020-01-14T20:14:16.907Z</atom:updated>
            <content:encoded><![CDATA[<h4>Using PubSub and Translation API’s</h4><p>After creating the chat app described in my previous <a href="https://medium.com/@jonfoust/creating-a-chat-using-pub-sub-c89ef5595d3f">post</a>, I decided to continue adding features to it. In that post, I dive into using <a href="https://cloud.google.com/pubsub/">Cloud PubSub</a> and creating a simple app by navigating the <a href="https://console.cloud.google.com">Cloud Console</a>. I’ve been playing more multiplayer games and once again was inspired to add some new cool things to the chat app. We saw that Google Cloud makes it easy to add one-to-one chat to a multiplayer game… but you won’t want to stop there. You’re used to the finer things in life and you’re not going to be satisfied unless we go further. So let’s push past possible to awesome! We will focus on connecting the chat with thousands of other users (and you won’t be talking to yourself any more) and utilizing ML to make things a bit more universal.</p><p>Now that we’ve got chat rolling by following along with my previous post, it’s time to add more subscribers! In that post, we had one subscriber listening to one topic. If you want to add additional subscribers or players, instead of subscribing to the same subscription for the topic, each subscriber must create a subscription for the topic. This is a good option. Otherwise, load balancing happens and subscribers will essentially get messages as they come. What promptly happens when you add more subscribers to the same subscription is that each subscriber receives a subset of the messages — definitely not ideal.This is the bad option.Players will receive scattered messages that seem to not make sense and only one teammate will potentially know the enemy is on the left.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/346/0*nusMUEC7jeUlm6Dt" /></figure><p>Here, subscriber Y and Z both have separate subscriptions to Topic C. If they had not, they would receive only a subset of the messages. To avoid that, we have to create a new subscription programmatically in each client to the topic. You can do that in various ways but here is an example:</p><p>(Assuming you have a username to reference)</p><pre><em>// Append “UGC_Sub” to username to create new subscription name</em><br>string subName = username + “<strong>UGC_Sub</strong>”; </pre><pre><em>// Subscribe to the topic.</em><br>SubscriberServiceApiClient subscriber = SubscriberServiceApiClient.Create();<br>SubscriptionName subscriptionName = new SubscriptionName(“univgamechat”, <strong>subName</strong>); // Second Addition</pre><pre>try<br>{<br> subscriber.CreateSubscription(subscriptionName, topicName, pushConfig: null, ackDeadlineSeconds: 60);<br> Console.WriteLine($”Subscription {subscriptionName.SubscriptionId} created.”);<br>}<br>catch (Grpc.Core.RpcException e)<br>when (e.Status.StatusCode == Grpc.Core.StatusCode.AlreadyExists)<br>{<br> Console.WriteLine($”Subscription {subscriptionName} already exists.”);<br>}</pre><p>Output to be expected:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/0*MNQMSveqL1SOD7V-" /></figure><p>Great! You’ve made your chat available to a larger audience and each user will be able to receive all messages but what if someone doesn’t speak your language? What if they’re afraid of speaking another language in fear of mistakenly insulting someone or being insulted themselves? What if you just want everyone to feel comfortable? Fear not. I will show you how technology has advanced so quickly that we’re on the brink of living in a sci-fi movie.</p><pre>PubsubMessage message = new PubsubMessage<br>{<br> <em>// The data is any arbitrary ByteString. Here, we’re using text.</em><br> Data = ByteString.CopyFromUtf8(“Hello, Pubsub”),<br> <em>// The attributes provide metadata in a string-to-string dictionary.</em><br> Attributes =<br> {<br> <strong>{ “User”, username }</strong><br> }</pre><pre>};</pre><pre><em>// Create Translation Client</em><br><strong>var translationClient = TranslationClient.Create();</strong></pre><pre><em>// Translate to Spanish</em><br>Console.WriteLine($”Received message {msg.MessageId} published at {msg.PublishTime.ToDateTime()} from {msg.Attributes[“User”]} translated to Spanish”);<br>Console.WriteLine($”{msg.Attributes[“User”]}: ‘<strong>{translationClient.TranslateText(msg.Data.ToStringUtf8(), “es”).TranslatedText}</strong>’”);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kG24kDwQbZnr0f17" /></figure><p>Thanks to these five (bolded) lines of code(!), your game is now richer and you have a huge global community that can enjoy an inclusive chat experience. Let that sink in for a moment. We don’t take enough time to appreciate how easy today’s tools are. If your expectations are based on the days when mobile phones were large enough to count as exercise equipment, you still expect to put in a lot of fuss for a bit of dazzle. But as the developer community grows and builds on one another’s work, the universe of what’s possible expands quickly. Expect things to be a little easier than you think. Never be scared to dive in!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d7ce46da616" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using GCP NuGet Packages with Unity]]></title>
            <link>https://jonfoust.medium.com/using-gcp-nuget-packages-with-unity-8dbd29c42cc4?source=rss-3227692b2dda------2</link>
            <guid isPermaLink="false">https://medium.com/p/8dbd29c42cc4</guid>
            <category><![CDATA[unity]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[google-cloud]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Jon Foust]]></dc:creator>
            <pubDate>Mon, 05 Aug 2019 16:36:45 GMT</pubDate>
            <atom:updated>2019-08-05T16:36:45.156Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve been working with some Google APIs in Unity, and while it has been fun, it was not an easy task getting them to work. I’ve decided to pass along my steps to working with Google APIs and Unity in part to answer questions/requests I frequently received at game conferences. In writing this post, I assume you have already created created a project in Unity and are just looking to integrate Google APIs. If not, there are many <a href="https://www.youtube.com/user/Unity3D/playlists?view=50&amp;sort=dd&amp;shelf_id=27">tutorials and courses online</a> on getting started with Unity and creating your first project.</p><h3>Importing NuGet Packages</h3><p>To get started with Google APIs in Unity, you need to open up a C# script from Unity for editing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-FX2Q6G-dGQlzDLw2oVkOg.gif" /><figcaption>Creating a Scripts Folder and Creating a C# Script</figcaption></figure><p>Open or create a C# script within Unity to launch the project solution in Visual Studio(you may use another editor but this process should be the same).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c594mAuHXMlNvrOsgdZmIQ.gif" /><figcaption>Opening the Script in Visual Studio</figcaption></figure><p>Once your script opens, the next step is to locate where to add NuGet packages to your solution. The locations are different on Windows and macOS(Project &gt; Add NuGet Packages &gt; Select desired package &gt; Add Package):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OSptxPM7Zh7CUpzhpUpZ6A.gif" /><figcaption>Opening NuGet Package Manager in Visual Studio for Windows</figcaption></figure><p>Using the package manager is very simple, but if you feel more inclined to use the package manager console feel free to. Once the package manager is open, click the Browse tab and type in “Google”. When the search results have populated, select an API (make sure it is a “recommended version client library”) and click Install.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pJ7TG39rmlLCb0BvcgqFZQ.gif" /><figcaption>Installing the NuGet Package</figcaption></figure><p>This will install all libraries necessary to run the chosen NuGet package. Close the manager and save your project. Next, switch over to Unity to prepare for the next step.</p><h3>Copying Library Files to Unity’s Asset Folder</h3><p>You’ll notice upon returning to Unity an error message(s) in the console window(you may have to go the <em>Console </em>tab in the Unity editor).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1dMaxS8EvgFhcGvl8jrF5g.gif" /><figcaption>Error in Console Window in Unity</figcaption></figure><p>According to <a href="https://docs.microsoft.com/en-us/visualstudio/cross-platform/unity-scripting-upgrade?view=vs-2017">Microsoft’s documentation</a>, “ Unity projects require a special process to add NuGet packages. This is because when you open a project in Unity, its Visual Studio project files are regenerated, undoing necessary configurations”. This causes many problems for us since NuGet packages are usually downloaded and pretty much turnkey. To use the downloaded library file, create a folder in your <em>Assets </em>folder named <em>Plugins</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m599i945g95UTwlor1P0dg.gif" /><figcaption>Creating a Plugins Folder</figcaption></figure><p>Next, following the error list in Unity, navigate to the <em>Packages</em> folder in your Unity project (this folder will have all the NuGet packages you’ve downloaded). Once you have located the library you intend to use, <strong><em>copy</em></strong> the file into your newly created Plugins folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JOPutrus3cpQcxD3VTCZmw.gif" /><figcaption>Copying a Library to the Plugins Folder</figcaption></figure><p>The next step is to create the <strong><em>link.xml</em></strong> file that will preserve all library data when migrated to Unity’s <a href="https://docs.unity3d.com/Manual/IL2CPP.html">platform</a>. Unity’s platform (written in C++) creates binaries for the platform of your choice, so to make sure our libraries do not lose any information, this step is necessary. Make sure to save this file in your project’s root folder. Within the link.xml file, you want to have something similar to the following to ensure that you retain the libraries’ full contents:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*obXf7ZID3kAMfmFbHFOB3A.gif" /><figcaption>Creating the link.xml File and Adding Library Information for Unity Bytecode Stripping</figcaption></figure><p>The next few steps may take a bit of your time. After completing the above series of steps, you’ll notice that new errors have populated the console window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YsWITiWZromWk7JDUTCFsg.gif" /><figcaption>Oh no! More Errors!</figcaption></figure><p>Downloading NuGet packages typically downloads all the additional libraries necessary for them to function(this is because of <em>reflection</em>). You may notice within the <em>Packages</em> folder the amount of libraries downloaded alongside the Google NuGet package you’ve acquired. Copying the files into the Plugins folder (and editing your link.xml) must be done for all packages/libraries you downloaded and want to use. This <a href="https://docs.unity3d.com/Manual/IL2CPP-BytecodeStripping.html">Unity doc</a> can help (look for the section titled “How to deal with stripping when using reflection”).</p><h3>Wrapping Up</h3><p>Once you’ve finished adding the library to the link.xml file and there are no longer any error messages in the Unity console window, your next step is testing. Depending on the API you’ve chosen this may be a bit difficult but the best way to test is to either use the API on a game element or print to the Unity console. I used the Translate API to translate “hello” to Spanish and print to the console.</p><p><strong>Sources</strong></p><p><a href="https://docs.microsoft.com/en-us/visualstudio/cross-platform/unity-scripting-upgrade?view=vs-2017">Microsoft Documentation on Unity and .NET Framework 4.x</a></p><p><a href="https://docs.unity3d.com/Manual/IL2CPP-BytecodeStripping.html">Unity Bytecode Stripping with IL2CPP</a></p><p>If it did not work, feel free to send me a message on <a href="https://twitter.com/syntxerror1">Twitter</a> and I will try to help out.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8dbd29c42cc4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Year One at Google]]></title>
            <link>https://jonfoust.medium.com/year-one-at-google-c63f38c2272b?source=rss-3227692b2dda------2</link>
            <guid isPermaLink="false">https://medium.com/p/c63f38c2272b</guid>
            <category><![CDATA[celebration]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[developer-relations]]></category>
            <dc:creator><![CDATA[Jon Foust]]></dc:creator>
            <pubDate>Mon, 20 May 2019 16:50:35 GMT</pubDate>
            <atom:updated>2019-05-20T16:50:35.394Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eXoJww_J8KwD-aOQDfjkqQ.jpeg" /><figcaption>Check out my view!!!</figcaption></figure><p>So I’ve hit my first Googleversary working as a Developer Advocate and thought it would be a great idea to write a post about how it has been working at Google so far. I’ll touch on my journey, my team, responsibilities and work-life balance.</p><h3>Orientation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4QX3MS0DEnWtwl1WHXR0AQ.jpeg" /><figcaption>When I was a Noogler #TBT</figcaption></figure><p>My first day at Google was pretty long, full of information and icebreakers. After receiving your equipment, you meet other Nooglers in your orientation class and sit awkwardly at a table until some kind extroverted soul sparks conversation. Luckily I was paired with two other Nooglers who have grown to become very good friends. The on-boarding process is pretty straight forward and involved mandatory classes for your org and other optional but super interesting classes spread out across several days. Spending time with your orientation class is normal for the first couple days but eventually you drift apart (*insert tiny violin*) but you join your team for the real fun.</p><h3>Meeting My Team</h3><p>I would love to say that I got to meet my team but no one was in the office for two weeks! Now before you jump to conclusions, being a Developer Advocate requires quite a bit of travel and my amazing team was doing amazing things. There were a couple people in the office and I was welcomed with open arms… until I realized I didn’t have a desk assignment. There was a mix-up but luckily things like this doesn’t bother me much. It also helps that your first six months are typically a ramp up period.</p><p>Joining Google Cloud DevRel(Cloud Developer Relations) has been amazing. I was asked “what do you really enjoy doing?” and I answered “Well before this call I was playing some Overwatch to calm my nerves”. No one actually plays Overwatch to “relax” or “calm their nerves” by the way. Needless to say, from that statement forward I became aligned with the Languages and Verticals team. We support communities for many programming languages and verticals. I have supported .NET communities but mainly focus on Cloud Gaming.</p><h3>Ramping Up</h3><p>I spent my first 6 months ramping up on Google Cloud Platform, game design with Unity, playing pool before going home, and getting lost in the massive NYC office. Also part of the ramping up process was navigating Google and finding decision makers for products you support. During this time, I met with teammates who also support languages, verticals and products in other offices via video conferencing, PM’s for gaming, and my managers and directors. I was also introduced to a great mentors, who helped with the navigation and understanding fundamentally how we support our gaming communities. With the help of my mentor, and my managers, I was able to focus on building great solutions and offer support for gaming communities.</p><h3>Drinking From the Firehose</h3><p>If you’re not familiar with the saying, <em>Drinking from the Firehose</em>, it means take on a large(often overwhelming) amount of something quickly. In this context, I was taking on the vast portfolio of Google Cloud products and services. I was learning how to use them(using .NET client libraries mainly), all the teams working in gaming, and various methods of advocating. I also learned of new announcements that would shape a lot of the work I do. One announcement that had an impact on my projects is <a href="https://unity3d.com/company/public-relations/news/unity-technologies-and-google-cloud-announce-strategic-alliance">Unity’s announcement of a strategic alliance with Google Cloud</a>. Since the alliance was formed, I was able to work on GCP + Unity tooling. I’ve been having a great time working on it but the on-boarding was tedious. It took around two months to ramp up but doing so helped with my personal brand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4A6U9AnIQ1smLjIjA5WV9A.jpeg" /><figcaption>At my first Google I/O playing with Stadia</figcaption></figure><p>I have an analogy that may go over many heads but it happened to me so here it goes. Have you had a family member teach you how to swim by throwing you into the middle of a pool? I have! Obviously I am perfectly fine but the thing is I learned to swim diving in head first (although I did not dive in voluntarily). This is the feeling I had going to my first conference, Google Cloud Next 2018. Here I was assigned to staff several booths throughout the duration of the Next and had little knowledge of the actual products(I later learned I wasn’t the only one). I was given training but with little experience using the products made answering detailed questions a challenge. The part about the analogy I left out was that what I did not realize was throughout the panic of being thrown into the pool, I could stand on my tip-toes and would’ve been fine. I had something to rely on but I did not realize it in the midst of a conference with 20,000+ attendees. Part of my on-boarding classes was building solution architectures for mock client projects. Simply taking a step back and thinking about all our offerings made answering questions simpler. There was also a large amount of support from my surrounding teammates which speaks to the culture we have within Google DevRel.</p><h3>Google Cloud DevRel Culture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CneYwU-SFf1jzEIAZLdCOg.jpeg" /><figcaption>(Most of) Google DevRel</figcaption></figure><p>The culture practiced by Google Cloud DevRel is one I am very thankful to have joined. Being able to support communities in areas you’re passionate about will help you connect with anyone. The team is soundly focused on that but it has to start from somewhere else. Being apart of this team for a year, I’ve realized that there really is no “<em>I“ in team</em>. Much like a lot of the culture practiced at Google, there is a lot of collaboration going on. I can rely on some of my teammates who are experts in a product or some area of computing/engineering. Within the company there is a lot of transparency and everyone makes themselves available to help. I can book time on a calendar of any employee but they will kindly turn down or request more information on the context of the meeting if they don’t accept right away. I really enjoying being able to set up a meeting and just ask to pick someone’s brain. The DevRel team is more likely to collaborate and accept meetings which is great since we approach our content from the user/developer perspective. Aside from seeing my teammates over video conferencing, we all enjoy seeing each other in person. It is like a family reunion when you meet up after a while at conferences or offices.</p><h3>The Struggles</h3><p>Now I painted a perfect picture for my first year but there are some things I did struggle with. I can say the thing I struggled with the most is dealing with <a href="https://en.wikipedia.org/wiki/Impostor_syndrome">imposter syndrome</a>. I immediately began to compare myself to my teammates when I joined (the first day!). It wasn’t productive because since my teammates and mentors were already well known and figured out their DevRel narrative. Everyone “does DevRel” a different way. Luckily, getting over imposter syndrome in DevRel is relatively easy. Once you’ve given your first talk all of that stress/uncertainty disappears.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4INsxEfKWL0qhacV2ONP5g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w8H0518gtmCeODUcjMF1FA.jpeg" /><figcaption>Giving my manga translation talk at NYC &amp; London GDG Meetups (I don’t know what to do with my hands)</figcaption></figure><p>My first talk was a manga translator (something I enjoy) that could translate images on the web with a draggable transparent window. Think of it like Google Lens but for the web. I was behind on a series and reading the untranslated chapters was impossible. Translation on web pages does not work on images in Chrome either. This project was well received and the first successful moment I had since I joined which gave me a big self-esteem boost. Everything else that followed snowballed.</p><p>Another of my struggles had to be adjusting to travel. Within my first six months I traveled roughly once every 1.5 months which isn’t too bad. The last six months I have spend roughly 55 days away from home which is quite a bit considering as of today it is 134 days into the year. Now being away from home isn’t too bad when you get to see new places and meet new people. Although adjusting to timezones can be quite the challenge as well. My actual problem with travel is I’m never comfortable on flights. Definitely a personal problem but sooner or later I will get that wonderful upgrade and sleep like a baby.</p><h3>Work-Life Balance</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*VBiGej_Ou8dm1WQgjTwg6w.jpeg" /><figcaption>(Part of) The Google Volleyball team: division championship photo</figcaption></figure><p>Work-Life balance is something I do not struggle with. I think there are too many ways to take a break or separate from work(for me at least). When I first joined, I would play pool before heading home from the office. Once you start meeting new friends and hang out with teammates you find more things to do. Google has many recreational activities you can join free of charge and I joined softball and volleyball. I play video games during lunch, board games Thursday nights, and video games daily before bed while still maintaining to support communities and my daily responsibilities. The great thing about working on this team is if you need a break, take it! It is easy to experience burnout so self-care is preached and practiced. Being able to separate yourself is the key to maintaining healthy work balance (in my opinion).</p><h3>Wrapping Up</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4o_05axzLVrA7SpAgfY4eg.jpeg" /><figcaption>Enjoying myself while speaking on a gaming panel</figcaption></figure><p>Well there you have it… Year one in the books! Now that I’ve hit the ground running I can’t wait to see what the next year will have in store. Feel free to check me out on the weekly <a href="https://gcppodcast.com">Google Cloud Podcast</a> or <a href="https://twitter.com/syntxerror1">ask me any questions</a> and I’ll happily answer them when I can.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c63f38c2272b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Chat Using Pub/Sub]]></title>
            <link>https://jonfoust.medium.com/creating-a-chat-using-pub-sub-c89ef5595d3f?source=rss-3227692b2dda------2</link>
            <guid isPermaLink="false">https://medium.com/p/c89ef5595d3f</guid>
            <category><![CDATA[google-cloud-pubsub]]></category>
            <category><![CDATA[chat]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Jon Foust]]></dc:creator>
            <pubDate>Mon, 18 Mar 2019 22:24:05 GMT</pubDate>
            <atom:updated>2019-03-18T22:24:05.277Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve been getting back into playing multiplayer games lately and I’ve started looking for interesting things to build while playing. One game I have enjoyed in particular has 16 players all spamming chat playing detective to find a group of evildoers among us. I was inspired to build a chat for games and began researching methods for sending and receiving messages. Requirements included:</p><ul><li>One-to-One (Direct) and One-to-Many messaging functionality</li><li>Transmission method that did not require a full server to be developed</li></ul><p>I began to explore some solutions in the space and I stumbled upon <a href="https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern">Pub/Sub</a>. Using <a href="https://cloud.google.com/pubsub/">Google Cloud Pub/Sub</a>, the road-map for creating a chat is:</p><ol><li>Create a topic</li><li>Players subscribe to topic to receive messages</li><li>Players publish messages to topic</li><li>Messages are delivered to subscribers of the topic</li><li>Messages are acknowledged by each subscriber</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*_2drqPRB-gUIktuOLXmsVQ.png" /><figcaption>Google Cloud Pub/Sub Architecture</figcaption></figure><p>Looking at the architecture above you can get a visual idea of the flow of our solution. As <em>publishers</em>, players publish messages to a topic within Cloud Pub/Sub. Pub/Sub will handle messages and any <em>subscribed </em>players will receive the message.</p><p>Let’s start building out the game chat and take a deeper look at Google Cloud Pub/Sub.</p><h3>Getting Started with Google Cloud PubSub</h3><p>To use Google Pub/Sub, create a new project on <a href="https://console.cloud.google.com">Google Cloud</a> Console. Take note of the Project ID after successfully creating your project. You’ll be using it later in the solution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*aia1deII_FhSIDKJR7x8sQ.png" /></figure><p>Once the project is created, enable the Pub/Sub API in the <a href="https://console.cloud.google.com/apis/library">API Library</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_MeQGlMPmvhN28xvqDIRFw.png" /></figure><p>Pub/Sub requires authentication for use so select <em>Create Credentials.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YHOztCqGp6uRlTMqjm6BIg.png" /></figure><p>For <em>role</em> it is recommended you add the proper role permissions for each API (in case your service account file becomes compromised) but for this example use Project-&gt;Owner. Name your service account download the service account key file. Store it in a safe location you can find easily.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*dsWf5cnIDZCsYOfEMqak5Q.png" /></figure><p>To use this service account, set an environment variable using the commands in the images below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*Qrd8_B11hTmH9T0F0nlU_w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*5AlORVCu1kDlO_srk7ROBw.png" /></figure><p>Once we have completed these steps, we are ready to build out our chat.</p><h3>Building Our Chat</h3><p>We will go through all of the steps to add Pub/Sub functionality to your chat. To add in Pub/Sub functionality, I have followed the <a href="https://googleapis.github.io/google-cloud-dotnet/docs/Google.Cloud.PubSub.V1/">Google PubSub C# client library reference</a> with application specific modifications. I’ve created a C# console application in Visual Studio for the chat. I’ve also added the <strong><em>Google.Cloud.PubSub.V1</em></strong> NuGet package and included it within my source file.</p><h3>Create a Topic</h3><p>The first step using Pub/Sub is to create a <strong><em>Topic</em></strong>. We can do so with these four lines of code:</p><pre>PublisherServiceApiClient publisherService = await PublisherServiceApiClient.CreateAsync();<br>TopicName topicName = new TopicName([YOUR PROJECT_ID], &quot;General&quot;);<br>publisherService.CreateTopic(topicName);</pre><p>The code above creates a topic for the General channel (topicId = “General”) utilizing the project ID from the Google Cloud Console. Note that in a normal chat application, you wouldn’t want your users to have the ability to create topics freely. Now that you’ve created your channel the next step is to subscribe to the topic you’ve created.</p><h3>Subscribing to a Topic</h3><pre>SubscriberServiceApiClient subscriberService = await SubscriberServiceApiClient.CreateAsync();<br>SubscriptionName subscriptionName = new SubscriptionName([YOUR PROJECT_ID], &quot;generalsubscription&quot;);<br>subscriberService.CreateSubscription(subscriptionName, &quot;General&quot;, pushConfig: null, ackDeadlineSeconds: 60);</pre><p>The code above creates a subscription for the <em>General </em>topic named <em>generalsubcription</em>. This will allow you to receive messages from the topic either using a pull or push method. The difference between the two mechanisms are:</p><ul><li>Pull subscription requires the subscriber’s client to initiate requests for messages.</li><li>Push subscription will allow Cloud Pub/Sub to initiate requests to subscriber clients to deliver messages.</li></ul><p>Find more information on pull/push subscription <a href="https://cloud.google.com/pubsub/docs/subscriber?authuser=1&amp;hl=id">here</a>.</p><h3>Publishing a Message to Pub/Sub</h3><p>Now that we have created a subscription, we will publish a message to our General topic. The code below publishes a message that says <em>“Hello, Pubsub”</em> to Pub/Sub.</p><pre>// Publish a message to the topic using PublisherClient.<br>PublisherClient publisher = await PublisherClient.CreateAsync(&quot;General&quot;);<br>// PublishAsync() has various overloads. Here we&#39;re using the string overload.<br>string messageId = await publisher.PublishAsync(&quot;Hello, Pubsub&quot;);<br>// PublisherClient instance should be shutdown after use.<br>// The TimeSpan specifies for how long to attempt to publish locally queued messages.<br>await publisher.ShutdownAsync(TimeSpan.FromSeconds(15));</pre><h3>Pulling Messages from Pub/Sub</h3><p>Using the pull subscription approach, there must be a call to the Pub/Sub server to receive messages. To illustrate this, below is a call to the Pub/Sub server to initiate the request to the <em>generalsubscription </em>on the <em>general</em> topic.</p><pre>await subscriber.StartAsync((msg, cancellationToken) =&gt;<br>{<br>    Console.WriteLine($&quot;Received message {msg.MessageId} published at {msg.PublishTime.ToDateTime()}&quot;);<br>    Console.WriteLine($&quot;Text: &#39;{msg.Data.ToStringUtf8()}&#39;&quot;);</pre><pre>subscriber.StopAsync(TimeSpan.FromSeconds(15));<br>    // Return Reply.Ack to indicate this message has been handled.<br>    return Task.FromResult(SubscriberClient.Reply.Ack);<br>});</pre><p>The asynchronous calls used in the code above have several advantages, such as:</p><ul><li>Allows for messages to come from multiple subscriptions without disrupting the application/game</li><li>If your application allows, creating a subscription for another user without any overhead and as low latency as possible</li></ul><p>It is also important to note that our subscriber stops after receiving one message using<em> subscriber.StopAsync</em>. Feel free to remove this to continue listening but stop listening for messages at some other point in your code.</p><p>Before executing our code, add these two lines to the end of the program:</p><pre>// Tidy up by deleting the subscription and the topic.<br>subscriberService.DeleteSubscription(subscriptionName);<br>publisherService.DeleteTopic(topicName);</pre><p>This will ensure you delete the topic and subscription and avoid getting an error should you wish to run it again because of an existing topic. Run the code and check out the results in your console.</p><p>There you have it! After execution, you should see a message in your console that you received a message posted seconds ago and another message which is an echo of <em>Hello, Pubsub</em>. Had 15 others subscribed to this topic, you would have recreated the game chat I described earlier. There are many other areas to explore to give this solution additional features found in other chats. Stay tuned for more developments and improvements.</p><p>.NET Pub/Sub Client Library Reference: <a href="https://googleapis.github.io/google-cloud-dotnet/docs/Google.Cloud.PubSub.V1/">.NET Reference</a></p><p>Check out Google Pub/Sub Documentation here: <a href="https://cloud.google.com/pubsub">Cloud Pub/Sub</a></p><p>Full Google Cloud <a href="https://cloud.google.com/docs/authentication/getting-started">Authentication Guide</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c89ef5595d3f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unity for Beginners… From a Beginner]]></title>
            <link>https://jonfoust.medium.com/unity-for-beginners-from-a-beginner-f42003eb3af8?source=rss-3227692b2dda------2</link>
            <guid isPermaLink="false">https://medium.com/p/f42003eb3af8</guid>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[unity]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[unity3d]]></category>
            <category><![CDATA[introduction]]></category>
            <dc:creator><![CDATA[Jon Foust]]></dc:creator>
            <pubDate>Wed, 28 Nov 2018 22:03:28 GMT</pubDate>
            <atom:updated>2018-11-28T22:05:03.707Z</atom:updated>
            <content:encoded><![CDATA[<h4>Part 2: The Unity Editor</h4><p>If you read through <a href="https://medium.com/@jonfoust/unity-for-beginners-from-a-beginner-9e2eaef57873">Part 1</a> of this series, and now you’re continuing with Part 2, then it is apparent you have a fairly strong interest in Unity from a beginner’s perspective. After spending some extended time with Unity and online courses, I noticed that one resource missing for beginners is a tour of the editor itself. I’ve looked far and wide but I haven’t found one that doesn’t overwhelm new creators. So, with the aim of addressing this need, here is my walkthrough of the Unity editor.</p><p>Unity does a great job of organizing various windows that are essential for game development. The layout of these windows is completely customizable. Feel free to organize the windows to your desired layout by moving them or adding them to existing windows as tabs (like you would have in an internet browser). Here is the layout I have been using for a while:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QtUxY6MQvf2fL0RN7DtDYA.png" /></figure><p>This layout has served me well for designing, editing, and updating live. For now, follow along to learn the purpose of these windows and then create a layout that works best for you. I’ve adapted this layout from a great Udemy course that was created by Jonathan Weinberger; check the link at the end of this post for more details.</p><h4>Project/Assets</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ePDAwhK9KBurQ6bsLeveAw.png" /></figure><p>Assets are your collection of game entities. If you’re organized, you can use the Assets View (shown here at the bottom right) to quickly identify your scenes, materials, prefabs, scripts, sprites, and so on. These assets become game objects in your scene or components to add functionality to your objects. Word of advice: Make use of subdirectories to organize your assets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nuNr13kOcWdUN6QuvKM3ew.gif" /></figure><h4>Scene</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VJdoEH9a7K7dEpUxCtdcNw.png" /></figure><p>The Scene window (shown in this layout across the top) is probably going to be the first thing you notice when you begin a project (whether 2D or 3D) because it is very large and hard to miss. You can drag and drop elements from the Asset window into your Scene window to place players and enemies, design your levels, and create a user interface (UI) for your game. You can edit the size of anything within the scene directly… or you can use the Inspector window to be more precise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y2vdydbQtggMDt8oAYXeLA.gif" /></figure><h4>Inspector</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ww9xwRCAPVWSIRYn2y0BlA.png" /></figure><p>The Inspector window (highlighted here on the right) helps you manage the properties of game objects, components, materials, prefabs, etc. Precisely altering the size, position, and rotation of game objects is easier to do with this window. Once you’ve gained experience with game design, the Inspector window helps in creating complex game objects. Components such as RigidBody, Physics, and Scripts add functionality to your game objects. My favorite feature of the Inspector is the availability to make changes and view object values at run-time (when your game is running after clicking the play button).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nDofjlZuts7jeewLxygE-A.gif" /></figure><h4>Hierarchy</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DSGd2lGfYmhrTv8BaXqgTw.png" /></figure><p>When you’ve begun adding elements to your Scene, they will become visible within the Hierarchy window (shown here in the upper right). If you’re wondering why it is called a “Hierarchy” window, it is because you have the ability to create <em>child</em> game objects. These child objects are linked to their parents, such that the parent higher-level object is broken down into objects making it less complex and easier to maintain. Selecting any item in this window will highlight it within the Scene and pull up its properties and components within the Inspector.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DGf7CExin-txdKNqsyLDAA.gif" /></figure><h4>Game</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kkjgyZnbunDcIkTO0E0pyg.png" /></figure><p>Once you’ve managed to put together a functional game, it is time to see it in action. The Game window gives you the ability to play within the Unity editor. This capability supports quality assurance testing as well as debugging. From the Hierarchy window, select a game object to pull up its properties within the Inspector. You can monitor and make changes to the object while playing, but these are not permanent so if you are happy with the changes be sure to update them when the game is no longer running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uw3_azBOy3Q5VyiUg61yBg.gif" /></figure><h4>Conclusion</h4><p>There you have it! Unity provides you with complete control over your project through a set of dedicated windows that can be positioned in any layout you choose. There are many more windows that you can use but these are the most common of the bunch. You can start by using just these windows to build something great, and then explore further to get even more out of Unity.</p><p>Find more resources here:</p><p><a href="https://docs.unity3d.com/Manual/index.html">Unity Manual</a></p><p>Credit — Unity Partnered Course: <a href="https://www.udemy.com/the-ultimate-guide-to-game-development-with-unity/">The Ultimate Guide to Game Development with Unity</a> by Jonathan Weinberger</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f42003eb3af8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unity For Beginners… From a Beginner]]></title>
            <link>https://jonfoust.medium.com/unity-for-beginners-from-a-beginner-9e2eaef57873?source=rss-3227692b2dda------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e2eaef57873</guid>
            <category><![CDATA[unity]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Jon Foust]]></dc:creator>
            <pubDate>Fri, 24 Aug 2018 20:47:17 GMT</pubDate>
            <atom:updated>2018-08-25T01:31:48.472Z</atom:updated>
            <content:encoded><![CDATA[<h4>Part 1: “Why use Unity?”</h4><p>If you’re reading this then you may have stumbled across this post in an effort to begin a journey in game development. I’m here to help you gain some understanding of the elements of game design. I mean let’s be serious… You wouldn’t show up to play a sport without the proper equipment or without knowing the rules! But chances are you don’t yet know the rules of the land so expect to suck at game development, at least at first. You shouldn’t feel too bad because you’re new to this (as am I). Hopefully, you’ll find something here to help you get a running start on your own journey from what I’ve learned in my short three months in game design.</p><p>Before I start getting too technical, let’s address the prerequisites for getting into game development. The main ingredient is that you just need a passion and desire for creating games! If you code and want to make something fun then you can get into game development. Into art or graphic design? There is definitely a place for you in game development. There is also a place for those who enjoy writing. What’s a game without a script/story? Perhaps video games are your hobby and you have the desire to make something your own. That is enough. You don’t need to be an expert in 3D graphics, Infra/Ops, or game design to have fun.</p><p><strong>Selecting a Game Engine</strong></p><p>If you’re a beginner then you likely do not have a full development team to work with. So, you are responsible for every part of your game, including the three main areas of design, art, and development/programming. Since I have a computer engineering degree, my expertise falls within the development/programming area. Your experience may put you in another area or none, but you’ll most likely require the help of a game engine. A game engine is a software application that provides the tools necessary to create games effectively. This can include rendering, physics, collision detection, animation, and more. Selecting the right game engine may make or break your creation based on the features it provides. For example, one very important feature is what deployment platforms it can target. Whatever your target platform may be, you have the ability create one project and deploy to all the targets supported without making major changes to your project.</p><p>I’ve included a list of a few game engines for comparison below (there are many others):</p><p><strong>Unity</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*pK8PEsw3k4oBGYhOHkih0A.png" /></figure><ul><li>Uses C# and JavaScript</li><li>Runs on Windows and OSX</li><li>Used to create 2D and 3D games</li><li>Deployment platforms: Desktop, Mobile, Console, Augmented Reality/Virtual Reality headsets</li></ul><p><strong>Unreal</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*tQTacA7yYr78DQvvAynx0A.png" /></figure><ul><li>Uses C++</li><li>Runs on Windows, OSX, and Linux</li><li>Used to create 2D and 3D Games</li><li>Deployment platforms: Desktop, Mobile, Console, Augmented Reality/Virtual Reality headsets)</li></ul><p><strong>Godot</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*fE0GQHopDdhQPgjH1YU4OA.jpeg" /></figure><ul><li>Uses C++, C#, GDScript</li><li>Runs on Windows, OSX, Linux</li><li>Free and Open Source (Community Developed)</li><li>Used for 2D and 3D games only</li><li>Deployment platforms: Windows, OSX, Web,</li></ul><p><strong>GameMaker</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*HrwaC4hox7KVve544EgOng.png" /></figure><ul><li>No coding experience needed</li><li>Runs on Windows and OSX</li><li>Used to create 2D games and games with <em>limited</em> 3D</li><li>Deployment platforms: Desktop, Mobile, Console, <em>limited </em>Augmented Reality/ Virtual Reality headsets)</li></ul><p>It’s not hard to see <em>many </em>similarities between the game engines. For more details, check out this <a href="https://www.slant.co/topics/1907/~game-engines-for-beginners-and-non-programmers">article</a> and pick a game engine that best suits your experience and needs (non-programmers vs. programmers, languages, platform target, and 2D vs. 3D).</p><p>As a C# and C++ developer, I had the opportunity to play around with multiple engines (which I recommend) prior to supporting game developers in my work at Google. Unity has everything I was looking for in a development tool: 3D and 2D development, ease-of-use, and multiple platform target options which ultimately made the decision very easy. If you are stuck trying to decide among several engines, your best option is to think of a simple project and try to make the same project across your choices. If you have the time and the ability to do this, you will likely find the one that works best for you. If not, I encourage you to think about features that are most important to you.</p><p><strong>A Quick Look at Unity</strong></p><p>Just to give you a small glimpse of what Unity looks like, below are images of the Unity UI once you begin a 3D and 2D project, respectively. I will save a description of the mechanics of Unity and its UI for a future post; for now, just take a minute to examine these images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HpG2FrT8gJpwyENj" /><figcaption><em>Unity 3D Project</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*i0AMKiFrkvUfxdDl" /><figcaption>Unity 2D Project</figcaption></figure><p>The UI looks similar in many ways in both 2D and 3D projects, which offers developers a level of comfort when working with both project types. One noticeable difference is the center window. This is the main window in which you will develop your <em>Scene,</em> which contains all of your game objects, levels or playable area, and UI. There are noticeable differences between the two project types so we will briefly explore those.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/70/1*W6qdYclejZoiftP0DkNNDQ.png" /><figcaption>3D Axes Icon</figcaption></figure><p>In the 3D project, notice the icon in the top right. This is used to visualize the axes (X/Y/Z) for your scene. There is also a light source depicted by the sun icon and a main camera depicted by the camera icon, which represents the current/default source of light for your scene and the main camera (view for play area).</p><p>In the 2D project, notice there is no 3D axes icon nor a source of light. This makes sense since you will be playing from a flat viewpoint. Lighting in a 2D project is not included by default and must be added to the scene manually. Interestingly enough, there are three axes in a 2D game as well. You may be wondering why is there no 3D axes icon if there are three axes? That is because you cannot rotate around the z-axis in 2D. Try drawing two unique stick figures on a piece of paper and flipping that paper over. Now either you cannot see the image or the image will be completely reflected, which isn’t ideal for a 2D platformer (the figure would be moving in the other direction). The z-axis actually brings game objects closer or moves them farther away. The 2D camera also utilizes the z-axis. Try using your phone camera to take a picture of your stick figure masterpiece on the table. Now imagine changing the picture’s z-axis and your picture ends up on top of your phone. Now change the z-axis of the camera and your phone ends up under the table! This sounds crazy, but cool right? I will dive deeper into dealing with cameras and axes in a later blog post.</p><p><strong>Unity in Action</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wjGLe-sgKECUUUii" /><figcaption><em>2D Platformer example from Unity in Action</em></figcaption></figure><p>What kind of messenger would I be if I didn’t include something I’ve worked on myself? For the past few months, I’ve been reading Unity books, watching online material, and learning tactics for game design. The image above is from a chapter in <a href="https://www.amazon.com/Unity-Action-Multiplatform-game-development/dp/1617294969">Unity in Action</a>. It is a simple 2D platformer (platformers are among my favorite games so I was particularly excited for this) with moving platforms and obstacles to clear. If you’ve played a 2D platformer, then you are probably thinking that you’ve already been introduced to the main mechanics of a 2D platformer after following this example. Add a couple of enemies, wacky obstacles, typical in-game items for health and stamina, and maybe a boss or a hidden secret/area and you’ve made a pretty solid 2D platformer. I’ve also been following the <a href="https://www.youtube.com/user/Unity3D/playlists?shelf_id=3&amp;view=50&amp;sort=dd">Learn Unity</a> YouTube playlist, which includes many game tutorials for a variety of game genres. These resources were a great starting point for me and I can recommend them for you as well.</p><p>Looking for something a little more polished as an example of what can be made in Unity? Sorry I can’t deliver one I’ve made myself (yet) but here are a couple great examples of games made by others with Unity.</p><p><a href="https://unity.com/madewith/cuphead"><strong>Cuphead </strong></a><strong>[Xbox/Windows]</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9ZEiq9761mgw9tNO" /></figure><p>I have played and loved Cuphead. The premise of this impressive 2D shoot ’em up side-scroller is to repay a debt to the devil after a bad gamble. To do so you must defeat all the other debtors who owe the devil. This game is a challenge but amazing! The 1930&#39;s style artwork and animation are breathtaking. See the trailer <a href="https://www.youtube.com/watch?v=4TjUPXAn2Rg">here</a>.</p><p><strong>Pokémon Go [Android/iOS]</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NAfEP6id8tm_JmCT" /></figure><p>Pokémon Go is one of the most popular AR mobile games ever released. Bringing a modern approach to the popular adventure RPG from the ’90s, this game lets you catch, battle, train, and trade the hundreds of Pokémon discovered right in your backyard. The game was once so popular that it crashed when released in certain regions because it could not handle the unexpected amount of downloads/users. It still currently has roughly <a href="https://www.eurogamer.net/articles/2018-06-27-pokemon-go-player-count-at-highest-since-2016-summer-launch">147 million active daily users</a> (I myself being one of them).</p><p><strong>Getting Started</strong></p><p>If you’re now thinking about what you need to get started, I have good news. You don’t need much. At a minimum you need to be running Mac OS X or a 64-bit version of Windows. There are also Linux builds but they are not well supported at the moment. Plus, you will need a graphics(integrated or dedicated) with DirectX 10 capabilities. These are the bare minimums; depending on the complexity of your projects you may require a more powerful setup, such as a dedicated graphics card.</p><p>If you’ve made it this far, you’re still interested in game development, and attracted to the idea of using Unity as your gaming engine I recommend picking up a book or two on Unity or following along with some YouTube tutorials. Also, stay tuned here. I will continue to share my journey with Unity and other interesting things along the way on this blog. In the meantime, I’ve included a few links below that you can use to get started. I’ve included links to IDEs (Integrated Development Environments) that you can use to script the behavior of your gameplay. I have been developing in Visual Studio for many years so it is my choice for IDE. MonoDevelop has been used for years along Unity so it is very reliable as well. JetBrains Rider is a IDE specifically made for .NET thus making it a contender as well. Play around with the three of them and I am sure you will feel comfortable with one relatively quickly.</p><ul><li>Download Unity here: <a href="https://unity3d.com/unity">Download</a></li><li>Download Visual Studio IDE here: <a href="https://visualstudio.microsoft.com/">Download</a> (Community Edition 2017 is free)</li><li>Download JetBrains Rider here: <a href="https://www.jetbrains.com/rider/">Download</a></li><li>Download MonoDevelop here: <a href="https://www.monodevelop.com/download/">Download</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e2eaef57873" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>