So now we got the player moving around where we want it, but we don’t want the player to being able to go everywhere. It wouldn’t make much sense for the player to be able to go off screen, so we need to create some boundaries to keep them from wandering off.
To do this, we’ll be needing to use some if/then statements to get the point we want to make to be understood by Unity. Right now, let’s determine where we want our boundaries to be. …
Pseudo code is basically just step-by-step directions for the making of the actual code. It’s to help make sure the coding process stays on track, and if multiple people are working on the same code, it helps to communicate what needs to be done.
When making pseudo code, it’s important to be concise, but clear and not generalized. It should describe the steps accurately, and be understandable to someone who might not know much about coding; it should add to the efficiency of the team rather than make it more confusing.
Writing pseudo code is just a good habit to form, it helps keeps your mind on track and your coding structured.
Now that we’ve delved into some C# and the interface of Unity, its time to finally start making things happen! Why not start with how we make things move?
Well first off, we’ll want to create an object. On the taskbar in Unity go to Gameobject > 3D Object > Cube. This will create a cube. Now we need to give it a script. On the project tab under Assets, you can create a folder specifically for scripts. Right click this folder, and create a new C# script.
Since we’ll be attaching the script to the cube, which should also…
As we’re getting used to coding, its good to practice and take part in challenges. In this challenge, we’re going to go through how to make a script run some calculations for us. Here’s what we need:
Variables are a part of well… a variety of things. In code the variable can refer to something like a character’s name, a weapon, a powerup, or a score, etc.
Anything that can hold information can be a variable.
When working on a script an important component to variables can determine who has access to the code. Setting a public variable allows anyone to see it, and if connected to Unity that variable could be accessed directly from the Unity program. Private, on the other hand, allows only the script itself to touch the variable.
How do you tell…
Now that I’m finally getting into Unity as part of my journey into Gamedev, finding an appropriate layout for my workspace could be very important in making my progress more efficient.
Let’s figure how we can change things around to give us most use of the space we have.
The first time we open Unity, we see this:
In the upper right hand corner, above the inspector, we can see a box saying “default.” Clicking this, you can select a number of prearranged layouts. Give them all a try, and see what you think. …
Before I started Unity Development, my knowledge surrounding Github and Git was very limited. Before now I only used Github to download files for various things, usually mods for videogames. But when it comes to making my own repositories and sharing code with others, I had no idea what was what. So what are these things?
Github is a site that hosts repositories of your project so that you can collaborate with a team without having multiple copies of said project. This prevents the possibility that these copies will later need to be merged and edited so that all the…
My knowledge surrounding git and repositories before this point in time was practically nonexistent. There’s a lot that I will still be learning, but here’s how to get started:
Today is my first post along my journey to becoming a Unity Software Developer.
Here is how I got here: