<?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 Joe Kuka on Medium]]></title>
        <description><![CDATA[Stories by Joe Kuka on Medium]]></description>
        <link>https://medium.com/@joekuka?source=rss-2a337dbe5141------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*y6zNB1DB817Ltgcmv900Rw.png</url>
            <title>Stories by Joe Kuka on Medium</title>
            <link>https://medium.com/@joekuka?source=rss-2a337dbe5141------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 08:37:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@joekuka/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[What’s in my List<> again?]]></title>
            <link>https://joekuka.medium.com/whats-in-my-list-again-f64a15dd0338?source=rss-2a337dbe5141------2</link>
            <guid isPermaLink="false">https://medium.com/p/f64a15dd0338</guid>
            <category><![CDATA[made-with-unity]]></category>
            <category><![CDATA[codinglife]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[gamedevhq]]></category>
            <dc:creator><![CDATA[Joe Kuka]]></dc:creator>
            <pubDate>Fri, 16 Apr 2021 01:44:36 GMT</pubDate>
            <atom:updated>2021-04-16T01:44:36.176Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever arrived somewhere to do a bit of shopping and realized that you have forgotten your list? But then you decide “it’s okay I can remember it” and continue on with your shopping. If I had to guess, I would assume your experience would end up quite like mine and you end up buying half of the store and doing twice as much work than you probably should have…In our day to day lives a list can be a very useful tool that helps us to maintain a goal, track our progress, or even constantly evolving. One of the most import things about a list is you can change the size of it at anytime you want. Now what does all this nonsense have to do with programming? As a programmer we can use lists in the same way and often these can be more versatile than an Array[] even though they share some similar properties. So today lets take a practical look at how we can use a List&lt;&gt; and make an active targeting list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*tUJ6E4giuP4hbCbHvhxvwA.png" /></figure><p>Here we have 3 targets that we want to add to a list when they enter our target area. And then when they leave our target area we want to take them out of the list. Maybe we have some other code we want to implement like how to damage the target, or having the target fire back when its in our active target zone. This can get a little crazy when you have many targets in the target zone at the same time, and one of the best ways to handle this is with an active list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*aQG1N00y2P-o6lqf8os5hQ.png" /></figure><p>So as our targets move towards the target area there are a few things we are going to need to make this work. We are going to need Colliders on all objects with is trigger so we can detect collisions, and at least one of these will need a rigidbody. It helps if you have gravity turned off on the rigidbody otherwise when you press play your object is going to fall straight down. We also need to write a little bit of code so our list can be implemented properly. Make sure to add “using System;” up top or you will not be able to use the list functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*GtNNwN1jSlSSbY5qIuDm0w.png" /></figure><p>Here are a few of the basics to get you started with writing and initializing your list. followed by the code below of how to add and remove an object.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*cLgBlJsWRiIM9EOviEXlfQ.png" /></figure><p>Now to make this work there are several ways, but for this example and to keep it simple I am using the “OnTriggerEnter” and “OnTriggerExit” methods. These are very handy and will detect collisions for you so long as you have an active collider with “Is Trigger” set to on. What this method is saying is “detect a collision and return the object I have collided with”. Now lets build a basic prototype to use this with and test it out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*aEjnVE3P7d3mRFJYHVvdpw.png" /></figure><p>As you can see for our prototype I am using a few different objects with a big slightly transparent green field so we can watch our object move through the target area. So keeping with our code here as soon as a target enters the green area we should see it in our list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*kDqrGzoXbdKU977ZTNjTnA.png" /></figure><p>Ted has entered the target area and is added to our list</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*2-YyoYUBsk232-7CKz_BIg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*9iy3fTxhVnb-sPpPWZJgYQ.png" /></figure><p>Ted has left our target area and now Bob is the active target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*wP4Qaig0fYCoZ3XvD7rW2A.png" /></figure><p>Lets put this all together so we can see it in action. In order to see our list in the inspector make sure you remember to add [Serialize Field] if you are using a private variable as you should be. Now that we have the basic code down and our list is visible, lets give it a run.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*ZQdt0J57rhfNtZMs9eVfVQ.gif" /></figure><p>Just for fun I added in a feature that will change our 3D object to green once it has gone through our target area just to make sure its working. Now if we only had the OnTriggerEnter function our list would look like below where all targets have been added. But that is not what we are trying to do with our list. So we add the OnTriggerExit and call ”.Remove” to create our active list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*qR_ao30ASOlV2DdmEh0a_g.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RzMF1z3g2fuHnP8BiJmHZg.gif" /></figure><p>And now we have a functioning target list that only displays our active target. Another example of this would be in a tower defense game as in the video below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*qBa7d1FyPXzV_noJvfb8sg.gif" /></figure><p>Here you can see that the enemy is fired upon once it is in a certain target radius, and it also fires back at the turret. I hope this helps to create a better understanding for one of the many ways we can use a list&lt;&gt;. Mahalo as always for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f64a15dd0338" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Interview Prep for Success!]]></title>
            <link>https://joekuka.medium.com/interview-prep-for-success-d5f85f173a42?source=rss-2a337dbe5141------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5f85f173a42</guid>
            <category><![CDATA[fibonacci]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[unity-game-development]]></category>
            <category><![CDATA[gamedevhq]]></category>
            <category><![CDATA[codinglife]]></category>
            <dc:creator><![CDATA[Joe Kuka]]></dc:creator>
            <pubDate>Tue, 13 Apr 2021 21:44:39 GMT</pubDate>
            <atom:updated>2021-04-13T21:51:43.039Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*3Jq6EeUrkCBpetJH8cw7dA.png" /></figure><p>This week I have started my job search and interview preparations. After speaking with a few industry pro’s the top recommendation from them was brush up on your “Whiteboard answers”. If you are relatively new to programming like I am you may be asking what that is, and so my goal this week is to solve a couple of very commonly asked interview questions.</p><p>First we need to know what a whiteboard question is. This is a questions designed for you to demonstrate your technical knowledge when presented with a coding problem. Whiteboard interviews are from what I am told very common and is really just a chance for the interviewer to see your problem solving skills. In most cases you will be asked to work out a solution for a coding challenge on the spot using a whiteboard. This demonstrates that you have problem solving skills, and also that you can do this task away from the comfort of a computer screen with all the handy auto-fill functions, tool-tips, and so on. In my search so far I found that one of the most commonly asked questions for a programming interview is something along the lines of the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*DUl-Wq4BgR77cENRKwcAvA.jpeg" /></figure><p><strong>Write a method Fib() that takes an integer<em> </em></strong><em>n</em><strong> and returns the </strong><em>n</em><strong>th Fibonacci ↴ number.</strong></p><p>Let’s say our Fibonacci series is 0-indexed and starts with 0. So:</p><p>I read this and realized 2 things, first I need to study more math questions, and second I had completely forgotten what the Fibonacci sequence was. You might be asking why this would be important in the world of programming, and I will do my best to answer that question at the end. But for now lets get started and take a deep dive into some math. So I started by looking up the Fibonacci Sequence and then went to work on figuring out our problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*M0JocbZzoW3pB-fZAdibxQ.png" /></figure><p>Okay now that we know what it is lets break it down a little further so we can write it in code form. Below is the same sequence but with a few added variables of (A,B,C). We will use these to represent our equation. Another important note is you will need to know the base cases in order for this to work. Base cases are the 2 static numbers that will never change and in which all other numbers in this sequence will com from. In the Fibonacci sequence those numbers are 0, 1 and we assign those to the variables of A,B.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*ZAiSszmCmgUNUViAtxVXDQ.png" /></figure><p>The formula we need to create is simply C = A + B, and then every time we use this formula we need to swap (A,B) so that (A = B), and (B = C). Are you Confused yet? Its okay because I was too. But lets look at the next picture which should help.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*BtdHnPpsgKg6ng-CQIfKDw.png" /></figure><p>Now we have a full picture of how this formula works, and can move on to the other thing we will need. We have a way to create our Fibonacci sequence, but now we need to find “n”. Looking back at our instructions, we know there are a few things we need to make this work, like a variable for (n), and an array or list of some sort to store our Fibonacci numbers.</p><p><strong>Write a method Fib() that takes an integer<em> </em></strong><em>n</em><strong> and returns the </strong><em>n</em><strong>th Fibonacci ↴ number.</strong></p><p>Let’s say our Fibonacci series is 0-indexed and starts with 0. So:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PiNSBFGNwR5VHdOnvYbvQQ.png" /></figure><p>I started by doing just that and created a variable for (n) called “_yourNumber” and then decided to use a List&lt;int&gt; because with a list it can dynamic and the size does not need to be established. This allows me to have a sequence of numbers as small or large as I want. I also decided to globalize a variable for the Fibonacci number we are looking for. Looking a bit further we can match up an Array[] of numbers as below to see how we are going to solve for “n”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*TLOM0HVvpICwNQ1iJKpr1A.png" /></figure><p>To help us better understand this I added an additional row to our previous charts that will represent the List&lt;int&gt; _fibNumbers. If we look at the chart below we can start to see how the numbers match up. So if we were looking for the <strong><em>n</em>th Fibonacci</strong> number and <strong><em>n = 4</em></strong><em>. </em>We can now see that would the number 3 in the Fibonacci Sequence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*d7dWSipDjUBcNGaaVm6-VA.png" /></figure><p>Now to create our method. Here we have our method of Fib(int <strong><em>n</em></strong>) as required and we are looking to get the equivalent Fibonacci number of n. So to do this we define our base cases of (a = 0), (b = 1), (c = 0). From here we need to assign our base case numbers to the list so we can then calculate the rest of the sequence with an algorithm. The way I chose to solve this was with a for loop “for (int i = 0; i &lt; <strong><em>n;</em></strong><em> </em>i++)”. Then we write our equation of (c = a + b), and because we are in a loop we can designate that we want we want to change the values of “a” and “b” each time. Before we exit our loop we need to assign the new values to our list by adding “c”. This will ensure that every time this loop is called it will create a new value for “c” and add it to the list until we have reached out desired number of “<strong><em>n”.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*T6_hMU1QuOaiY2yxLcR1FA.png" /></figure><p>Now that we have a list of our Fibonacci numbers that was generated up to the <strong><em>n</em>th </strong>we can assign that very number to our variable of “_fibNumber”. If you have used [Serialize Field] for all of your private variables then you are all set and the <strong><em>n</em>th </strong>value will now show up in the inspector once you have called your method. I used a global variable for the value of <strong><em>n</em>th </strong>because I wanted to give the user the power to choose what number they were looking for. by doing this and then passing “_yourNumber” in as the parameter it completes our equation and makes this method modular. The advantage to this is we have not hard coded in the <strong><em>n</em>th </strong>value which means we have control. You can also approach this from a different way and check to see if a particular number is a Fibonacci number. Simply add a variable for the number you wish to check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*vkAWhTyfXKbyW3iEWjmlrg.png" /></figure><p>Then we will need to write a couple methods to make this work. Without going too deep into the math aspect of the following methods, what we want to do is create a recursive method, or a method that calls itself creating a loop. Recursion is the parent of the Dynamic Programming solution. This is helpful because in order to solve a Dynamic Programming Solution we need to know how to solve a recursive problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nz1BseNJVHHGSHpd2GG4Hw.png" /></figure><p>I added the methods of “private bool IsPerfectSquare(int number)” and “private bool IsFibonacci(int number)”. These methods are return type methods meaning they will return a value, in this case a bool of true or false. They also require a number that we want to check to make them work. First we are checking to see if the number is a perfect square. Then we will use that method in our recursive method of “private bool IsFibonacci(int number)”. Finally using a simply “if” statement we check to see if our number is a number in the Fibonacci sequence.</p><p>Why is this useful you ask? Because recursive programing is a form of loops, and loops make things easier to work through. For example we could say solve for “Find our way home” and then create several “if” statements of “if” this then do that etc. or we could write a recursive algorithm that creates a list and continuously checks that list until we have found our answer. I had a lot of fun looking into this and will continue to read up on this topic since it is so vast, but I hope this helps you if you should be given this question for an interview. Mahalo for reading!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5f85f173a42" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I learned to use Unity 3D and write code in just 4 months!]]></title>
            <link>https://joekuka.medium.com/how-i-learned-to-use-unity-3d-and-write-code-in-just-4-months-c1f72f2c5337?source=rss-2a337dbe5141------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1f72f2c5337</guid>
            <category><![CDATA[day-63-of-100]]></category>
            <category><![CDATA[unity3d]]></category>
            <category><![CDATA[codinglife]]></category>
            <category><![CDATA[gamedevhq]]></category>
            <dc:creator><![CDATA[Joe Kuka]]></dc:creator>
            <pubDate>Sun, 04 Apr 2021 22:34:24 GMT</pubDate>
            <atom:updated>2021-04-04T22:34:24.284Z</atom:updated>
            <content:encoded><![CDATA[<p>Aloha and welcome to this weeks blog. For those of you that have been following my journey the last few months, Mahalo! And if this is the first post of mine that you are reading I would like to say Mahalo to you as well. This has been a lot of fun learning a new skill and putting it into practice, while also facing many challenges at the same time. Today marks the start of week 8 in my GameDevHQ Intensive Training Program, and day 63 of my 100 day challenge. For the 100 day challenge my goal has been simple, try to do something code related every day and be employed in the programming industry before I reach day 100. For today&#39;s blog I decided I should do a full review of my journey so far, and show you just what I have been working so hard on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bM-nEBu6LjgweAac1gPaEA.png" /></figure><p>I wrote my first line of code Thanksgiving week 4 months ago, and I have been going non stop since then. Learning and absorbing as much information I can find. Before that I had never heard of Unity3D, C#, JSON, JavaScript etc. I did not know what Visual Studio was, and I certainly did not know what it meant to be a Game Dev, or a programmer. What I did know is, it was time to learn something new and pursue a new career. As a 20 year restaurant industry veteran I have worked every position there is to work in a restaurant. I have been a dishwasher, line cook, server, bartender, sommelier, chef, manager, and many many more. You could say a cornucopia of experience, and even with all of that our world is changing and so was I. My dreams have changed and led me to this path of computer programing, where I have to be honest, this has been one Hell of a 4 month journey. I am still a Padawan and will always be learning, but lets dive in to what I have learned so far.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*lyH-eXCPrN9x4PvN-ntfHg.png" /></figure><p>Unity is a cross platform game engine used to develop video games, animation, engineering, automotive, virtual reality, and so much more. This engine is one of the most widely used in the world and to my great surprise was very straight forward to learn. There are many code editors you can use with Unity but I elected to use and learn Visual Studio by Microsoft. Being a beginner I would highly recommend this as one of its key features is an Auto Suggest based on the code you are writing. Pair that with an incredible helper tool that explains what you need to use in your code and its very powerful. Part of using this tool though is learning how to use it with Unity, and the program I joined would teach me just that by building video games.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/364/1*uQP45DnEowkEdhDNGumJPg.jpeg" /></figure><p>Here at GameDevHQ they do not spoon feed me the information, or have me forever watching YouTube videos, but learning to think like a programmer, and do my own research. I had to learn how to read and understand documentation, so I could then implement it into my project. Now this is not to say there is anything wrong with YouTube, as there is a lot of great information on there by many talented programmers. I just wanted to do something different, and want to succeed in this industry without the need to watch endless tutorials. On Day 1 I had a busy day downloading Unity, and Visual Studio and getting everything set up on my computer. Right at the start I needed to look up some documentation on how to setup the settings in Unity for Visual Studio, and then it was off to the races.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RluAjKyCIgsTeXtJjX9B6Q.png" /></figure><p>I open up Unity for the first time and this is what I saw… A blank project with a sample scene and a few different windows. I felt like I was immediately trying to read something in a foreign language. None of this made any sense to me, but after some reading and starting my GameDevHQ course I started to get it. So on the top we have the scene view that we use to build our projects and our games. Evey item we place and need to change, move or design will take place in that window. Below it is our game view that shows what the game would look like for the player. To the right is where it gets a a little crazy at first, as here we have the Hierarchy, Project window, and the Inspector. The Hierarchy shows you all GameObjects that are currently in your game, and when it comes to referring to any object in Unity every object is a GameObject. Then below that is the Project window that shows you all the file folders where your data is stores, things like Prefab GameObjects, scripts, audio, animation, images, and much much more. The Inspector to the right is quite possibly one of the most important aspects because this is what allows you to add GameObjects directly into your scripts or create ways for a developer to change settings to the game without needing to access the code directly. When you create a new script in Unity and open it for the first time it looks just like this….</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-SQNDAtoZeGWI8hdEJXRng.png" /></figure><p>Empty and waiting for you to fill it out. This had to be one of the most intimidating things I encountered starting out. Because I had never written code before and here is an empty script with words I did not understand, that even looked kind of scary since they started with VOID! What does it mean, and how do I fill this out!?! Well to answer that question as I would find out later “void” simply means without value, and the word “Start” followed by () means that this is method. You write the code you want to be executed into a method, and depending on when you want this code to be called will determine the type of method you use. There are many different method groups, some happen before others and some are only called when you say to call them. You can also create methods that ask for a variable or return a variable, which can be very handy. Now that I am getting my feet wet I dove right into the basics of how to create GameObjects in Unity by use of the Hierarchy, and then started learning how to write code to make them do things. In order for that to work you nee to create a C# script and attach it to your game object. Then using code you can tell it to do things like move, or disappear, and even control it with your keys like AWSD. The first game I set out to make was a 2D space shooter game, meaning that you are only moving on 2 planes of horizontal and vertical. This is a very similar effect as the old school video games where you only move left, right, up and down. This game had many challenges of learning how to create GameObjects, and then getting them to talk to each other. As a beginner it was difficult to wrap my head around that concept of script communication, and it feels so good when you make it work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mrIO9jUCau2QxUuzEvsH6A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FyT7mDcfCC94OYd7o9MOew.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AOFzflj3qqztFcoaH1cYYA.png" /></figure><p>Above are a few screenshots of the process I went through building this game. In the first pic you can see the background but just a white cube that represented our player. Then in the progressive shots you can see that the player became an awesome spaceship and even gets its own shield!! Below is a video of the finish game, and also one of my first times learning to do screen recordings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TBAcDl31kMsq4WM2iG0HRA.gif" /></figure><p>After This I decided in order to get serious I really needed to take this to the next step and signed up for an 8 week intensive with GameDevHQ. This would take me from just barely understanding game development to officially a Padawan in the world of Game Dev. I would be learning how to optimize my code by using an “Event” driven system, focusing on Object Oriented Programing, using an Interface, Dictionaries, custom classes, class inheritance, and many other cool things. So many challenges laid ahead including my first ever live code review and challenge. It took me 2 attempts to pass the challenge but looking back I am so glad I did. After my first attempt when my nerves got the best of me and to be honest I really did need some more work, I spent the whole week just non stop practicing ever code challenge I could find on GameDevHQ. Things like changing multiple GameObjects colors, or moving GameObjects in succession.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kiJt3Iel235mPjZi6wWB5Q.gif" /></figure><p>Then one of my personal favorites moving around obstacles using something called a NavMesh!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*6fWvTty1HrHm_jMrUIgx3Q.gif" /></figure><p>After that week of practice I met with success as my mentor said my code had greatly improved along with my confidence. I was in and super excited to start on this course. Below is a picture and video montage of the game I created during this course, and I hope you enjoy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fAsqLuHCQlf6R6kvEqQbDg.png" /><figcaption>First Day with the new project</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BsRCUfyKBEd1YIgNnzKOZg.png" /><figcaption>Building the Nav Mesh path</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*lprsoWy7AFW7rhE9WWohOQ.png" /><figcaption>Creating available Tower Locations</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YtRryWV-bvrjkmYhjl19ow.png" /><figcaption>Developing the decoy turrets and their attack radius</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*haTbFCgVqsyYg0OTQ-sfZQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/1*D4de8E7ipRl7LkuMP6uOrw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*AoRZLCG3b4A9QXYW1XS6Yg.png" /><figcaption>Particle beam effect letting player know where they can place their Turrets</figcaption></figure><p>So far for this project I had to learn many new concepts as show above. Things like how to implement particle effects, how to create what looks like an attack radius that is transparent, how to create the locations the turrets would be able to go, and creating a walking path for the enemies to use. All of this was something I have never done before, and had a challenge of its own in order to accomplish it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*q7BXL1bCXvRV79kfsITrMw.png" /><figcaption>Learning how to create a Dictionary</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*ynOgvM9rOZ153qQatC5CQg.png" /><figcaption>First Attempt at moving on a Nav Mesh</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*rUEWhkWShfeGXb-zocqzLg.png" /><figcaption>Optimized version of that same code</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i36wrBr2GoptwYy0gfTJcw.png" /><figcaption>Learning how to create PayPal Integration</figcaption></figure><p>And Finally one of the hardest challenges I would face was learning how to create a PayPal integration. For this I would have to read the provided PayPal documentation, learn to understand the basics of “Curl”, “JSON”, and how to convert those to C# and from C#. To be honest I had to ask for some help on this and will be needing to work on it more in the future. I also learned to use some of Unity’s really cool performance tools like the “Profiler” and how we can find exact instances in our game that are creating garbage collection or huge memory draws. This is supper important to do so we don’t create something that will crash a users computer. And to put it all together here are a couple of videos of the game I created during this course.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b3sDpQYt7U6a5oc1pXP5Yg.gif" /><figcaption>Here is a working Nav Mesh with enemy movement</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*5KsN0E4foNIFFh740TOA5w.gif" /><figcaption>Target Practice</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*SDoo56bwEgSqKTSDWn_rbg.gif" /><figcaption>We are on the march</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*4uJft78k-OZLCN98VILvxw.gif" /><figcaption>First attempt at turret placement</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*wZQQX1sqEhiJnFDrpZqKGg.gif" /><figcaption>Now we can upgrade our turrets</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*Nk-EXU-Fz_BOQXTdb_IDpg.gif" /><figcaption>The Mech portal is active</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*0ko9mXCtd3LXOirE2fkNyA.gif" /><figcaption>Playing with Shaders and health bars</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*HX0BUAlsTMyZtsCtqiJ6TQ.gif" /><figcaption>Its Play Time</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*Qkwe3cjYdaeKITpg7Q2Q7g.gif" /></figure><p>Now that the game is in its final stages its time to focus on my goal of finding gainful employment in the programing industry. This week is all about career prep and job hunting. I will be looking to update my resume, linkedin, my website, and applying to as many jobs as I can find. I still have lots to learn but I feel confident in what I know and think its time to grow my knowledge with a like minded company. Happy Easter to everyone and Mahalo for taking the time to read!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1f72f2c5337" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 6 of the GameDevHQ 8 week intensive]]></title>
            <link>https://joekuka.medium.com/week-6-of-the-gamedevhq-8-week-intensive-e31dd1a2989?source=rss-2a337dbe5141------2</link>
            <guid isPermaLink="false">https://medium.com/p/e31dd1a2989</guid>
            <category><![CDATA[8-week-intensive]]></category>
            <category><![CDATA[50-days]]></category>
            <category><![CDATA[gamedevhq]]></category>
            <dc:creator><![CDATA[Joe Kuka]]></dc:creator>
            <pubDate>Mon, 22 Mar 2021 20:53:10 GMT</pubDate>
            <atom:updated>2021-03-22T20:53:10.470Z</atom:updated>
            <content:encoded><![CDATA[<p>Its week 6 of the intensive and we are in the home stretch now. Looking back at last weeks post it seems my math was a bit off lol as today officially marks day 50 of my 100 day coding challenge as well. I have learned a huge amount in the last few weeks, and challenged myself in this new world of coding more than I thought I could. So today I wanted to review a few of the things I learned last week that I thought were cool, and show you how the game is coming along.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*HX0BUAlsTMyZtsCtqiJ6TQ.gif" /></figure><p>Week 5 focused on putting together most of our UI (User Interface). This is all of the parts of a game the user or payer is able to interact with. In our tower defense game that is the ability to place a gun turret, upgrade a gun turret, play, pause, fast forward, and restart the game. The UI also controls all of the on screen elements you see such as the armory, lives counter and war funds. In order to do this we need lots of script communication from our other manager classes. They will all tell our UI when to update the life count, or to update our warfunds when we purchase a turret. I also have it set up that when our enemies make it past all of the turrets they start to take life from the player. At certain levels of life the whole UI will change colors. The UI provided for us was original a blue color, and inn order to get the white color I jumped into Photoshop and added a fill/adjustment layer and then selected the hue/saturation option. With this layer mask you are able to adjust all colors or certain colors you want in many ways.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*mam6xeAPpW7xDq54q12yAA.png" /><figcaption>The color of our UI before the game starts</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*H8FtCMiroEyx4iCEOmF_WA.png" /><figcaption>Our Normal UI color</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*-fC0Qwn3ILCqWO05Amz5rw.png" /><figcaption>Taking Damage UI color</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/927/1*kzX6IYrOhPTo-6m6y1Xzsw.png" /><figcaption>Player health is very low</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*Qkwe3cjYdaeKITpg7Q2Q7g.gif" /></figure><p>These color changes can be very helpful to the player notifying them that maybe they should pause the game and move some turrets around to ensure no enemies get past them. All of these changes happen in real game time and the player has control over the game speed, and can even pause the game to make upgrades or place new turrets. Setting up most of our UI took some time, and lots of testing to make sure it was working the way I wanted it. I learned about button click events this week where you can create an event that happens when you click the button. This tool is very powerful as you don&#39;t even need to know how to write code to use it. Simply select the GameObject you want to access when the button is clicked, and then you can even select methods within that GameObjects script to activate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*xda0pVeEYpkX_erczanRvA.png" /><figcaption>When clicked, access the UIManager and start the restart Method</figcaption></figure><p>Another really cool thing I learned this week was how to build simple shaders. I have only just scratched the surface on this one but they are very awesome toold you can use to create visual effects, and even things like health bars. Pictured below is the health bar I created for our enemies and this was done by using a quad GameObject and a shader I created to apply to it. In a nutshell shaders work on a 0 -1 scale where 0 = no color and 1 = all color. You can make all kinds of custom adjustments to them as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*0ko9mXCtd3LXOirE2fkNyA.gif" /></figure><p>For this shader I created a color and then used several properties called nodes to get this draining health affect. All we are really doing is telling the code to go from 1 on the right to 0 on the left over a period of time or every time the enemy takes damage. As it does this the color changes and is removed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*L5otQxJqVo1bUA7g341n9Q.png" /><figcaption>Our Shader in the Inspector</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R9C1j9S50vCOGYOOjlD8qw.png" /><figcaption>Here I am creating the shader, and the logic that will allow us to have the declining health affect.</figcaption></figure><p>This week is focused all on optimization and I can honestly say I have a lot to do. One of the important things I have learned is that first you make the game work, and then you optimize it. This is especially important when learning how to code because when you are optimizing you will understand it better if you already know how your game is working. I can also happily say that even though I have spent many pain staking hours being stubborn and not asking for help I still have not simply given up and copied someone else&#39;s code. I prefer the trial and error method and writing my own code. Another thing I have learned and I struggle with is, “Its okay to ask for help sometimes”. There are times when you just need a second pair of eyes to look at your code and say “ahhhh you missed this thing” or “have you tried this?”. So many times it has just been the smallest thing messing everything up. One thing I do want to look into more is camera stacking to create different views and even things like a close up zoom for when the enemies come into the game. Mahalo for reading and as always Mahalo for your support. I hope everyone makes this a great week!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e31dd1a2989" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Week 5 of the GameDevHQ Intensive]]></title>
            <link>https://joekuka.medium.com/week-5-of-the-gamedevhq-intensive-68c88d70a9ce?source=rss-2a337dbe5141------2</link>
            <guid isPermaLink="false">https://medium.com/p/68c88d70a9ce</guid>
            <dc:creator><![CDATA[Joe Kuka]]></dc:creator>
            <pubDate>Tue, 16 Mar 2021 06:14:35 GMT</pubDate>
            <atom:updated>2021-03-16T06:14:35.798Z</atom:updated>
            <content:encoded><![CDATA[<p>Aloha everyone and happy Monday! I have not written in a few weeks about my progress and thought today would be a great day to review some of the things I have accomplished in my program. Today also marks day 52 of my 100 day coding challenge to myself which puts me at just over half way for both programs. The last few weeks have been especially challenging with the concepts I have learned and put to use. Week 3 focused mainly on a trigger system for enemy detection using OnTriggerEnter, OnTriggerStay, and OnTriggerExit. Week four went into some of our UI elements and creating a really cool dissolve shader effect for when the enemies die.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*S71cCLnOlyW_yvQYdvZ_Gw.png" /></figure><p>Here is a quick photo of my targeting system at work. If you look closely you can see a green and blue line that represents the targeting system for both the enemies and the gun turrets. The green dome shape is what is called a collider and it serves the purpose of detecting when something has, hit, or is within its boundaries. The OnTriggerEnter function is a great build in feature of Unity that allows you to detect these collisions from the collider. You can get so much information from that collision including the GameObject that collided with you. Then there is OnTriggerStay and this method works very similar to the update function. It is good for calling things like movement and ray-casting functions here as they need constant updating. And of course OnTriggerExit is called every time an object leave your collider. This can be very helpful when targeting because you would not want to target an enemy that is no longer within your collider.</p><p>On top of using those functions I also learned about OnMouseEnter, OnMouseDown, and OnMouseOver, and On Mouse Exit. These are very powerful built in functions that detect the mouse movement and can pass along information. With the on mouse over for instance, I can use this to detect which GameObject I am over, and then pass that information to anyone who would need it. Say for instance a UI manager wanting to know what object we are over and if it can be upgraded. Part of my continued journey has been learning to use Events more often and avoiding GetComponent as much as possible. This is part of creating optimized Object Oriented Programing.</p><p>To finish out week 4 there was lots of work with our UI system. I added the function of upgrading into my game. Now you can select an existing tower and upgrade that tower though our UI system. The amount of funds you have is also tracked the whole time. There were many challenges with this part and lots of connecting GameObjects to the UI manager. But I have to say I am feeling more and more confident using events now and besides a few little bugs that popped up today, my game is working great. Here is a sample of the upgrading process, and as always Mahalo for taking the time to read.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*wZQQX1sqEhiJnFDrpZqKGg.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68c88d70a9ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[We’re not in Kansas anymore Toto!]]></title>
            <link>https://joekuka.medium.com/were-not-in-kansas-anymore-toto-e9cf6fea838c?source=rss-2a337dbe5141------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9cf6fea838c</guid>
            <dc:creator><![CDATA[Joe Kuka]]></dc:creator>
            <pubDate>Mon, 01 Mar 2021 02:45:52 GMT</pubDate>
            <atom:updated>2021-03-01T02:45:52.654Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*32ltKKvuL0F-oq47ZCgWOQ.png" /></figure><p>Aloha everyone and welcome to the recap of Week 2! Today marks day 28 of the 100 Day challenge to work on something everyday with GameDevHQ, and just like the title of this article we are no longer in my comfort zone or at least, was not for most of the week. To say this week was challenging would be an understatement of the amount of time effort and frustrations that happened over the course of the week. Starting the week off, I was behind, and not just a little behind but way behind. There were a few concepts that I would really need to get through this week that I had not even learned yet, let alone tried to practice. Some of the key concepts for this week would be, delegates, and events, using scriptable objects (which are amazing BTW), and raycasting. All of these were brand new topics for me along with LINQ(Language Integrated Query), using Dictionaries and getting away from using the GetComponent call as much as possible. It took me the first 3 days of the week just to catch up on the much needed material and many many pages of notes lol.</p><p>Once I felt I was all caught up I began with this weeks tasks and it was no short list. Create locations where turrets can be placed, create camera movement functions using the WSAD keys and the mouse wheel for zooming in. And to be honest this was fairly easy having used similar functions before. Utilizing the Input setting built into Unity I quickly created logic that asaigned the WSAD keys to a “Horizontal Input” and a “Vertical Input”. Then After a google search on camera zooming I discovered there is a function on the camera called “Field Of View” and just like almost anything within Unity it can be adjusted if you can access it. After a little bit of research into mouse movement and figuring out there was even an Input setting for the “Mouse ScrollWheel”. The cool thing about these setting being built in means I can take them and assign them to certain things. with the scroll wheel for instance I was able to assign it to the camera field of view so every time you scroll you either zoom in or out in the game view. Check it out!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*PIlrJKgyseJasIX53QMeXw.gif" /><figcaption>Camera Movement with WSAD Keys</figcaption></figure><p>After this little confidence booster it was time to make my turrets and placement logic. I started out by creating available spots for my future turrets to be able to go. This was done with a 3D game object, and the turning off the MeshRenderer so it looked invisible. Since 3D object come with a collider I knew I could use that to detect when something was hitting it. Below is a picture of the future tower locations before I made them invisible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*lprsoWy7AFW7rhE9WWohOQ.png" /><figcaption>Available Tower Locations</figcaption></figure><p>After I had my tower locations set up, the next task was to put a particle beam effect on them so when activated they would look like beacons that tell the player you can put a turret here!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*AoRZLCG3b4A9QXYW1XS6Yg.png" /></figure><p>After this I created 2 scripts to handle the behavior of my tower locations and then the placement of the towers themselves. The main script I turned into a Manager class since it would be doing most of the work controlling what goes where. The other script lets my TowerManager script know if a location is available and turns the beacons on and off once a tower is placed. This was a ton of “if statements” and “Bool” checking going back and fourth. After a day and a half I had roughly 500 lines of code. You might say wow that’s impressive, but on the contrary it was very messy and counter productive with a lot of unnecessary logic. One of the things we are being encouraged to do is first make the program work and then optimize your code. This can be a little painful for me as I am so new and have been missing major opportunities for optimization, but after this week I am starting to see the picture a little better.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/229/1*wTxTQmcNAIrWp6tTVsGTgQ.jpeg" /></figure><p>After my Friday check in with our awesome Team Leader Dan I had a really good idea of how and where I could go about optimizing the weeks work. Enter my new nemesis….Delegates and Events. For those of you seasoned programmers out there you already know how amazing and useful these can be, but for me this was the equivalent of asking me to fly to the moon this week. Part of me thought it understood this concept and the other part kept saying “I swear this is rocket science!”. At the end of the day though it was not as bad as I had feared and I feel I have an okay understanding of it to start. To try and wrap this concept up in a nutshell to the best of my current understanding, and Event is when you declare something in one script, and then anyone in any script can listen for that event and decide what to do about it. This is so very useful because normally if you wanted to communicate between other scripts and other game objects you would need some direct reference to the GameObject you are trying to communicate with. This is done by either creating a global variable on your script and attaching the game object directly to it, or by using some form of GameObject.Find to locate the GameObject and then grab the component you need. For the instance of placing the tower though, I was able to create several events/ actions that told the other scripts things like, “We are looking for a location to place a tower, what do you have available?”, or “A tower has been placed, turn off your location”. There is of course so much more to this and as I learn it I will happily share it with you. In order to make the necessary parts work for this week, I needed to create the locations towers could go, and create the particle system that displays you can go here. We also needed a few GameObject decoys to show what you would be placing on your tower location, along with the potential attack radius they would have. and then of course the turrets themselves you would be able to place. This provided a great opportunity to use arrays, and even learn some optimized ways of sorting through them using customized methods! Here’s a look at the decoy turrets with their attack radius.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YtRryWV-bvrjkmYhjl19ow.png" /><figcaption>Decoy turrets with their respective attack radius</figcaption></figure><p>Since this week was so tough my Team Lead was kind enough to offer up an additional check in day on Saturday to help fine tune any optimization I was missing, and now 24 hours later I have finally converted all of my code to what I feel is a much better and much cleaner version of two days ago lol. I will touch on ray casting next week since most of my upcoming tasks are related to that. For now though I am going to call it a day and get some much needed rest in preparation for tomorrow. Mahalo for reading and for all of the continued support.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*4uJft78k-OZLCN98VILvxw.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9cf6fea838c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 21 of 100Days with GameDevHQ]]></title>
            <link>https://joekuka.medium.com/day-21-of-100days-with-gamedevhq-237cdd2f370?source=rss-2a337dbe5141------2</link>
            <guid isPermaLink="false">https://medium.com/p/237cdd2f370</guid>
            <dc:creator><![CDATA[Joe Kuka]]></dc:creator>
            <pubDate>Mon, 22 Feb 2021 01:00:22 GMT</pubDate>
            <atom:updated>2021-02-22T01:00:22.842Z</atom:updated>
            <content:encoded><![CDATA[<p>Week one has passed in my 8 week intensive, and today marks day 21 of my 100 day challenge. Last week was certainly not an easy week and was filled with tons of new concepts and of course challenges to overcome. The first of many challenges was to create a NavMesh for the enemies to move on, and then to create logic for how that movement would work. Such logic as how fast should the enemy move, and when they are spawned should they spawn right after each other or should there be a delay based on type of enemy? After that I had to determine what type of class structure I would be using, and if the class was a manager class or not. For example I currently have a class just to say what the Mechs are called, and a few specs about each of them. This class also inherits from the Item Class which is a class that every Game object will inherit. As the week progressed and the tasks started to add up I spent most of day 3 researching and learning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Ch58f8L5bE6XUCftBsgiA.jpeg" /></figure><p>This was very helpful because on day 3 in particular I decided to tackle several new concepts, Singletons, MonoSingletons, and Pooling. A Singleton in a nutshell is a way to define a script such as a SpawnManager script as “This is the only one of these” and it makes it so much easier to communicate with that script. A MonoSingleton is a way to define this same concept and then use it much like you would with script inheritance. Where instead of inheriting :Monobehaviour, you would instead inherit : MonoSingleton. This would include Monobehaviour and the defined traits of a Singleton. Once again just a nicer and cleaner way of script communication. I have read that it is possible to over use this function and I can see how someone might want to make everything into a Singleton, but at the same time I guess you have to ask yourself is it really necessary?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q68wBnsQ8DXmJcOylWAyWQ.jpeg" /></figure><p>Another Challenge for this week and first for me was to learan how to use GitHub, and GitBash. GitHub is called a repository where you can store your entire project, scripts, assets, and all the important files that make it work. The advantage to this is that you have a digital copy of whatever it is you are working on, but also it allows you to collaborate with others. For coding this is especially handy, as I can invite someone like my team lead to have access to my GitHub and they can in turn be able to see all the code I have written without calling me up and doing a screen share. If they wanted they could even adjust the code and then send it back to me for further work. You can imagine how useful that would be when working with people all over the world. Pictured above are the notes I have learned and use to succesfully navigate GitBash. Now unlike GitHub, GitBash does not store information but is merely the communication between the repository and my computer. We use GitBash to access our computers files and folders and then send the information we want to the repository and we can also pull information from the repository to our computer. I have not had any issues with this process yet “Knock on wood” but I have heard horror stories of people loosing entire projects by improper use of these tools.</p><p>One of the other majors challenges I dove head first into this week was Object Pooling. This is a concept where you create and re-use the same number of GameObjects, instead of Instantiating them every time you need one. For instance in my game I created a list of 10 enemies and when I need one I simply just activate it, and when I need it to die or its destroyed, I deactivate it. This way our game is less demanding on the system and we are able to continuously use the same game objects, with the effect of it looking like new ones are being made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*SDoo56bwEgSqKTSDWn_rbg.gif" /></figure><p>Here is a little video of the first wave from the pool. For the video I sped up the enemies a little bit and had them activate very close together. In real time though there will be more space between them in order to give the player a fighting chance. Finally at the end of the week we had our team meeting where I learned all about Scriptable Objects, and optimization. For the rest of today I plan on prepping for the week with some of the C# survival guide and getting up to speed on LINQ(Language-Integrated-Query) which is an optimized form of communication, and of course getting into Delegates and Events. This is a section that has been highly recommended by several individuals within the coding community and I cant wait to dive in. As always Mahalo for reading and all of the support. I am loving this journey and it has been exciting to share it with you all.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=237cdd2f370" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 16 of 100Days with GameDevHQ]]></title>
            <link>https://joekuka.medium.com/day-16-of-100days-with-gamedevhq-7d51ba412815?source=rss-2a337dbe5141------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d51ba412815</guid>
            <dc:creator><![CDATA[Joe Kuka]]></dc:creator>
            <pubDate>Wed, 17 Feb 2021 04:19:01 GMT</pubDate>
            <atom:updated>2021-02-17T04:19:01.691Z</atom:updated>
            <content:encoded><![CDATA[<p>This week marks a few milestones for me in my GameDev journey, the first and foremost is that I am and will continue to be a Game Developer for the rest of my life. I have enjoyed my journey of learning so much and if you had read my last post about the live coding challenge you would know that my confidence in this area has been somewhat lacking from the start. This was not because I believed I could not become a Game Developer, but it was merely because I let me insecurities of in-experience rule my thought process. Well I can tell you now with confidence that now only time stands between me and my goal of achieving a programing, or developer job by June of 2021.</p><p>The second milestone was my acceptance into an 8 week intensive course put on by the awesome team at GameDevHQ. It has only been two days but I have already learned multiple new things and put them into practice with the current game I am building, but more on that in a minute. First lets take a look at some code that I wrote yesterday…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*ynOgvM9rOZ153qQatC5CQg.png" /></figure><p>Picture here is the code I wrote for one of the challenges we would need to overcome. The challenge was to move a GameObject around an obstacle without hitting it and using something called a NavMesh. Being unfamiliar with using a NavMesh I decied to try and make this work using what I knew and already learned. The code on the left is exactly that, where the GameObject will move around the obstacle, but this has to be hard coded in. Imagine if there was 20 obstacles!?! I realized there was no way this would ever be efficient or passable even though it worked in this scenario. But if there was more than one obstacle my code would be a mile long accounting for each and every Vector3 positional change. So I next I looked up the documentation for NavMesh and learned that this is an AI system within Unity that can read a walk-able path and obstacles in its way. Then the computer will determine the most efficient path to its end destination. In order to make this work i learned that I needed to “Bake” a NavMesh which will tell the GameObject what surfaces it can walk on or not. Then I have to define any obstacles with some added components in the inspector, and lastly I needed a defined “Target” or end location. It was almost as if a light bulb turned on, and music sounded from the heavens. This whole time I have been learning the building blocks to make a foundation and now I am going to take that into hyperspace. I have heard this term many times before as I am sure you have as well, but this was one of the first times I have actually seen it in practice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*rUEWhkWShfeGXb-zocqzLg.png" /></figure><p>And now the optimized code that would allow my Game object do move from start to finish and avoid the obstacle. If you’re counting in the picture above it took a total of 9 lines of code including the method call to make the GameObject move to the target, not icluding the “variables” and “bools”. Now picture left we have done the exact same thing with a GameObject, a NavMeshAgent and 2 lines of code! I was simply amazed and so stoked I was able to pick this up so quickly. Below is a video of what I did with this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*6fWvTty1HrHm_jMrUIgx3Q.gif" /></figure><p>Now you might be wondering why would this be so useful? Besides that fact that I now know how to use AI and the possibilities are limitless, I am now able to implement that in my new project. For the 8 week intensive I will be completing a Game called Tower Defense. The premise is simple, the “Mechs” are coming to destroy us, so destroy the “Mechs” before they destroy you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fAsqLuHCQlf6R6kvEqQbDg.png" /></figure><p>Pictured above is the start of the project. In order to make this as real world as possible we are not starting from scratch on this project. This is because often times when you are given a project at a company it will be partly done and Its our job as the Dev to problem solve and make it work. Then we pass it off to the art department to make it look all pretty lol. As you can see we have a scene here of a city under siege, and the first challenge is to create a start, and end point for which the “Enemies” need to travel to. In the winding maze we will be adding some gun points or turrets. So I dove right in with all of my confidence and newly learned NavMesh technique. Everything was looking good, and then when I went to “Bake” the mesh, my walkable path was either non-existent or included everything. Neither scenario was very good because, on one the “Enemy” would walk a straight line and ignore the rock piles, and the other my “Enemy” would just get stuck. After a few hours of trial and error, I finally realized that in my scene there were two different surfaces that I was trying to make into a walk-able path. I remembered reading that a NavMesh works best on a level plane. So I created a 3D plane and placed it on top of the roads. and only the size of the area needed. Then to tackle my biggest problem…Making my game object walk only where I wanted it. In the above example it was easy as there was only one obstacle, and then it hit me! I needed more obstacles lol.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BsRCUfyKBEd1YIgNnzKOZg.png" /></figure><p>So this is what I came up with. I created a series of cubes, and made them static, froze them on all axis, and added whats know as a “NavMeshObstacle” to each cube. This tells the “NavMeshAgent” that is attached to our GameObject to avoid it. Once those were all in place I “Baked” my scene again and as you can see with the white areas I now had a path through the maze. And if you wondering how to get rid of all this clutter and make my scene nice and pretty again? Well that part was easy, as I learned a while back that I can apply textures to object and if you turn the “Skybox into a texture, you can use it like a mirror when applied to GameObjects. So I did this for the white area and then for all of my red cubes, I just deleted them as they were no longer needed. It is however important to note that you should only delete the cubes once you are fully satisfied with the path that your GameObject will walk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b3sDpQYt7U6a5oc1pXP5Yg.gif" /></figure><p>As you can now see, I have a functioning maze where a GameObject will follow the path I have set before it. And for a little taste of whats to come I created a little clip of the Mechs… Mahalo for reading!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*cuTyPo3PDd3nPORtwGxrYg.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d51ba412815" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mission Accepted!]]></title>
            <link>https://joekuka.medium.com/mission-accepted-e35771e774bd?source=rss-2a337dbe5141------2</link>
            <guid isPermaLink="false">https://medium.com/p/e35771e774bd</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[gamedevhq]]></category>
            <category><![CDATA[100daychallenge]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Joe Kuka]]></dc:creator>
            <pubDate>Fri, 12 Feb 2021 23:47:44 GMT</pubDate>
            <atom:updated>2021-02-12T23:47:44.012Z</atom:updated>
            <content:encoded><![CDATA[<p>Earlier this week I was in a last minute scramble as I prepared for my first ever live coding challenge, with the hopes of being accepted into an 8 week intensive with GameDevHQ. Before I tell you about that lets first look back at how this all started.</p><p>Two months ago I didn’t even know such a thing existed, let alone what C# was or Unity for that matter. I had and still am a life long restaurant professional and had only toyed with computers off and on my whole life. I did take a class once in HS where I got to build a computer, but lets be honest, it was HS and like most of my friends I spent more of the class time messing around than I did learning. Then in late October I received and email from the ACI program stating they would like to interview me for a unique opertunity with GameDEvHQ. I went and looked up the compnay website and remember thinking to myself “this looks really cool” as I would be building video games and learning how to create code and programing logic from scratch. Little did I know at the time how much I would enjoy this form of thinking and creativity, but I can say I sure do love this. Fast forward to Monday this week, and many hours of stressful frustrations wondering if I was indeed ready to embark on this new step of the journey. Have I indeed learned enough to start this course, and what would my mentors think of the code I was writing. At this point I had spent roughly 300+ hours learning everything I can about C#, Unity, and what it takes to be a successful programmer. I was feeling uneasy, but confident I could create logic and solve the presented problem. One thing I had not planned for though was the time constraint of 15 mins. Up until this point, my “learn at your own pace” sometimes snail speed process had merely been about just that, making sure I learned the material even if it took forever. I had the blinders up and was in full tunnel vision, not taking advantage of some very key assets that GameDevHQ has provided. But ready or not the time was nearing closer. As the hours turned into minutes something started to happen I had not expected, maybe its because I felt some of the other exams I have passed were more difficult than the 15 minute test I was about to experience. Or maybe because like many I have become slightly jaded to human interaction as we have all been forced to stay at home and or even work from home. This has changed the entire dynamic of how we interact with each-other, and all of the sudden I was nervous. I took a few minutes to take a quick walk and clear my mind, as I have many times before a difficult exam and for the life of me could not figure out why I was so nervous. After all the person watching me write code was not even in the same building, but someone else on this island, and I would not be able to see that person either. But none the less the nerves set in….</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*k2OjCpo4bYt4JEwq6RP-hg.jpeg" /></figure><p>As the zoom call started I tried to think about what I had accomplished already and that no matter what, I was further than I thought possible in this unknown industry, but the nerves were creeping in like the tide ebbing tide towards the shore. And then I heard the voice on the other end of the call “Hey Joe howzit” and for a moment the nerves were gone. That casual greeting reminded me that there is a real person on the other end of the line who at one point went through the same thing. I opened up my Unity Editor and located the test project on Filebase. Once downloaded I read the instructions which seemed easy enough. Then the voice said “you may start whenever you are ready”……..</p><p>Looking at the picture above Woody’s face is exactly how I felt in that moment haha, one part of my mind was saying “You got this” and the other part “I have no idea what I am doing”. For a moment I froze just looking at the instructions with my mind racing and wondering if the person watching me had already made up their mind “Nope hes OUT!”. Then I started to put things together, I created a C# script to attach to my GameObject, and copied the instruction so I could put them in my script as a comment for reference. Then once again everything went blank, and I couldn&#39;t help but wonder if I had not prepared enough or if I just wasn&#39;t ready. But I carried on and started to work through the problem, creating a coroutine and linking all the parts to my script would work. By the time I had finished ….30ish minutes later I did indeed have a program that worked as per the specifications, and I only needed a little help in creating it. I was proud that for my first timed challenge I was at least able to successfully complete it, even if it took me twice as long as it should have. My mentors who had helped and were watching my process both agreed that the logical thinking part was there, but the confidence and time needed a little work. They asked if I was able to do a second interview later in the week just to make sure I was ready before accepting me in.</p><p>I then spent the next 3 days preparing and reviewing everything they had given me, with hopes that I could achieve the expectation on my second interview. For my second interview I was going to be challenged by one of the founders of GameDevHQ and I will say that this is and was a little intimidating, even though he has been so incredibly nice and helpful. The intimidation comes from his expertise in the work of coding, and Unity. I mean this is the guy who wrote the program I am taking, and he makes this stuff look as easy as walking. Putting my insecurities in the back of my mind I put in some long days, averaging about 12 hours a day of writing code and trying to solve various problems. Having learned from my first live coding challenge I started timing myself and pushing myself to work faster, so that way even if my code was not as optimized as it could be, I would assuredly make it within the time limit. it also felt really good to write code almost as fast as I could think about it. Finally the time was here for my second interview, and even though I was not as nervous, I still felt a little unprepared. This might have been because I had just been stumped by one of the practice challenges and my thoughts were “If he gives me this challenge I’m Screwed”.</p><p>I loaded the challenge and took a look at my instructions. The game screen showed a level platform with about 25 white cubes on it, and the instructions were to change the color of the cubes to a random color, and then when a certain key was pressed to change the color back to their original color. “YES!!!” I know how to do this! I quickly created a C# script and determined the best place to attach it was to the main camera where I could add all the logic needed. Then I created an Array of GameObjects so I could reference all of my cubes, and also an Array of MeshRenderers I could assign to each cube. I then used GetComponent to say that each MeshRenderer was = to one of the cubes. I created a custom Method to handle all my GetComponents, and a custom Method to control the color change aspect. I then put my cubes Array into a for loop and told it to change the color of each cube to a random color. My heart was starting to pound as I felt that this was going very well. I had now written logic and code for roughly 25 game objects in a matter of minutes and knew that it was going to work. I pressed the Play button………….. and YES IT WORKED, every single cube changed its color to a random color. It was this beautiful rainbow of different cubes. Now I did need a little push with the last part due to time and I had not practiced changing GameObject back to their original colors, but with a little hint I was on my way to completion. After I had finished I heard the sweet words of “Congratulations” and then even learned a more efficient way to write the code I had just written. I am so stoked and so very proud to say with all the hard work and time I have invested so far I have now been accepted into the 8 week intensive program at GameDevHQ. The next 8 weeks are going to be nothing but eat, sleep, and breath all things programing as I take this next step towards the end goal, becoming a self taught computer programmer and getting employed in this field.</p><p>Here is a quick little video from one of my favorite challenges I did last night around 1am when I thought my brain was no longer working lol. Mahalo for reading and as always Mahalo for your support.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kiJt3Iel235mPjZi6wWB5Q.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e35771e774bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[1 Week down of the 100 days of GameDevHQ!]]></title>
            <link>https://joekuka.medium.com/1-week-down-of-the-100-days-of-gamedevhq-27f81c13c0a3?source=rss-2a337dbe5141------2</link>
            <guid isPermaLink="false">https://medium.com/p/27f81c13c0a3</guid>
            <dc:creator><![CDATA[Joe Kuka]]></dc:creator>
            <pubDate>Mon, 08 Feb 2021 23:36:53 GMT</pubDate>
            <atom:updated>2021-03-01T01:08:38.505Z</atom:updated>
            <content:encoded><![CDATA[<p>When I started this challenge a week ago I did not really have a clear path or line of sight for what I had hoped to accomplish, besides gainful employment of course. And now 1 week in and a few hours away from my first coding challenge I feel nervous but confident in my current abilities. I am still very much a Padawan but the amount I have learned in the last two months has been a lot more than I thought it was. For instance, I decided that as the first part of the challenge I would rebuild my 2D SpaceShooter game from scratch again lol. I wanted to see how much I could do using the methods I have learned at GameDevHQ, fromreading the Unity Manual, and Scripting API (Shocker that if you read the manual you can learn things right!?!). I have been simply amazed though that as I am writing this I am currently at a stage in the 2D game building process that previously took me 4 whole weeks and lots of frustrations…see image below lol.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*AwgWT1PL6E_3a4-1QSCuyg.png" /></figure><p>But during the course of this week those same frustrations turned into challenges and my whole mindset changed from “I Don’t Understand” to “Okay here is the problem, and how can I fix it”. This will effectively be the second time I have built this game from scratch and it has not come without its own bridges to cross or challenges to overcome. Part of that is I am still new and still learning so I did not remember how to do certain things. But with a little research and reading the Scripting API I kept on track. One of the biggest challenges I have faced this time around was mentioned in my last blog about script communication. This can be a very daunting task at first and down right might drive ya crazy, but once you figure it out, that ah-ha moment is absolute bliss, and possibly even euphoric. I had one of those this week, as I had mentioned and was struggling to get two of my scripts to communicate. I had a GameObject of “Enemy” and I turned that into a prefab so I could Instantiate it upon command. This is very helpful because you can use 1 single GameObject to clone itself and make as many as you want. The problem I was having was with the “Player script” not being accessible. More on that in a minute, but first lest talk about script communication a little bit.</p><p>Script communication is at its simplest the communication of 2 different GameObjects to one another. This would be the same as you talking to a friend over the phone while they are in another location that would not be able to hear you by earshot. You know where that person is, but you cant talk to them unless you call them on the phone. Script communication is much the same, as we have 2 GameObjects and we want them to communicate. In order to do this the first need to know about each-other. We can see that they both exist in the Unity editor, but the program itself does not know this until it has been told so. Lets take the “Enemy Script” for instance and say, we want to have the “Enemy” destroy itself when it collides with the “Player”. First we need to let the “Enemy Script” know that there is a GameObject out in the universe called “Player” and then we need to figure out how to obtain that GameObjects information. After that we lookup how to handle collisions in Unity to get Scripting API examples of how this is determined. One very very valuable thing I learned about this is the difference between GameObjects in the Hierarchy and prefab GameObjects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*V69M1FE6mOXnztfu_NDrhQ.png" /></figure><p>Pictured to the left is a look at my current Hierarchy for this game. Everything in this box is active on the screen unless it has been told not to be. For instance you can see that there are 4 GameObjects under the “Player” that are not highlighted. That is because the are set as (Not Active) so I can turn them on at specific points during the game, like when the player takes damage or collects the shield power up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/298/1*cEMQNu75l8KU6HCiMZBbAg.png" /></figure><p>Now to the left you can see the prefab GameObjects. These GameObjects can be called or Instantiated at any time you want and are very helpful to lessen the memory draw of the game. The issue I ran into is I could not get my “Enemy Script” that was attached to the “Enemy Prefab” to find the “Player” up in the Hierarchy. Everything I could find and read said that in order to make these two scripts communicate you need to do this, Create a local variable in the “Enemy Script”(lets call it: private GameObject _player;) to let the enemy know that the “Player” exists. then define what that variable is using the following code: _player=GameObject.Find(“Player”).GetComponent&lt;Player&gt;(); But every time I tried this I received that dreaded “NullReference”. What I didn’t know and have since then learned is that GameObject.Find only works if the GameObject you are looking for is directly attached. For example I could use that code to talk to a script on the “PlayerShield” since that GameObject is directly attached within the Hierarchy. What I learned is that when you need to find a GameObject outside of the Hierarchy you need to use the following code: GameObject.FindGameObjectWithTag(“player”) and this will allow you to find any game object that has the “tag” of Player! Important to note that one should make sure to add Tags to GameObjects to avoid even further frustrations lol. After I did that I was successfully able to eliminate all of my “NullReference” errors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tlF8a20GbkhB58abNUkArQ.png" /></figure><p>Taking a quick look at my “Player Script” today I had realized how much I have learned. 2 months ago I had never even written a single line of code, and now today on just my “Player Script” alone, I have over 200 lines of code using these variables. I also noticed that I had successfully used many different kinds of variables including, int(integer, or whole number), float(number with a decimal), bool(a true or false statement), GameObjects, Animations, Class Systems, the ability to switch between scenes by pressing a button, and much much more. One of my new favorite things that I found incredibly intimidating 2 months ago was “Arrays”. This is a list of similar type objects that can be called in order, forwards or backwards, at random, or by each individual item. I love these because they are particularly handy when dealing with things like say you have 20 different power ups that the payer can collect. Would it make sense to write code for each one 20 different times? Absolutely not! It would make sense to write code to say when the power up is collected do this, and then give a number of conditions for each one (also known as an IF statement or Switch Statement, wink wink). And now I love “Arrays” because they are so very useful. With my code challenge only a few hours away I think I am going to do some light review and relax, but I will leave you with a quick little video of my current progress. This rebuild is so much smoother than my first and as it should be. Mahalo for reading and make the rest of today a great day to learn something new!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TBAcDl31kMsq4WM2iG0HRA.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27f81c13c0a3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>