In part 1 of “Saving and Loading” (Megabite #24), I showed how PlayerPrefs and PlayerPrefsX could be utilized to save things quite easily into a Unity-based game. In this edition, I will show how to create a save file on a hard drive – this is more complex, and also more versatile. Again, there is no [...]

Manipulating time in Unity3d is quite a bit of fun. When I first created the project you can see below, I wanted to see how difficult it would be it institute something similar to what we see in Braid – basically a button that can turn back time. For my purposes, I wanted to start [...]

Some users, especially those new to Unity3d, may have issues understanding variables and declarations within a script. I wanted to take a moment to explain in-depth the different types of variables, how they work, and what your own best practice should be for the usage of each. Public First, we’ll speak about public variables. When using [...]

The problem with saving and loading as it pertains to newer programmers is often a lack of understanding. Like pathfinding or AI, it’s one of those things that needs to be customized to each game. In the older days, games did not take up a great deal of RAM while running. As such, it wasn’t [...]

A basic understanding of how coordinates work can go a very long way in Unity as well as other gaming engines. On a basic level, the world coordinates are the ones that an object defaults to if it’s not attached as a child of another object. If it is, it then is subject to coordinates [...]
In the last Megabite, I covered simple arrays – again, arrays are a huge deal and make coding and variable storing a much easier and more dynamic process. One thing that an array lacks though is a searchability. From an array, you can get the amount of entries or the values of individual entries, but [...]

Arrays are an incredibly valuable method of storing variable data in the world of programming, and a great way of accessing that data in very useful ways. In this article, I want to touch on the basic array options that Unity3d gives you access to, and also explain why you would want to use such [...]

This post is simply to serve as an update for my Megabite readers. For those who might have missed it, our site here was attacked this past week by hackers, and I spent a majority of my free time fixing it, updating it, adding security measures, etc. Long story short- I don’t have my full [...]

This Megabite, the 20th in the series, will focus on a question asked by a reader. D Hunter asks: … I’d love to know how to script a player-controlled ship you can walk around while it’s moving (like on autopilot). I’ve been struggling with this and it’s hard to find resources on that particular issue. [...]

Theres an obvious popularity in the world of independent development when it comes to grid-based games, or worlds constructed of blocks or squares. Because Unity has no easy one-click functionality for such a thing, I wanted to start a project and show the world how I went about achieving something similar without using a voxel [...]

I busted tail to attempt some code for my loyal Megabite readers this week, and in the end I decided to scrap it. Why? Well, my idea was to show that Unity was capable of procedural terrain generation on a massive scale (which it is), but what I came up with pales in comparison to [...]

I had a big plan for this week’s Megabite, but my demonstration wasn’t quite ready in time. Fortunately though, it was on this very same topic, and it gives us all something else to look forward to next friday. In this article, I’m going to answer the question that I’ve gotten a few times regarding [...]

When I first began with Unity, I noticed a great deal of things in tutorials were coded within the Update() section of a script. As you may already know, this portion of a script will execute once per frame. Depending on the framerate of a user, this could be a good thing or a bad [...]
In episode #10, I covered my first attempt at creating an AI system on a 2d plane. Now, just 5 episodes later, I’m happy to report that I’ve been extremely happy with the advancement through the weeks and have adapted the original code to something more universal and configurable. Infact, the same code is used [...]

Unity makes everything in the world of sound fairly easy to understand and manipulate to your liking. Even so, there are a lot of settings that should be understood before diving in to the audio components to help with performance and overall game size. Import First, you’ll want to import sounds into your project. While [...]

In Megabite #11, I discussed how to do the basic layout features for both GUI and GUILayout. In this release, what I’ll be discussing is a bit more in-depth (You will want to already have a basic understanding of the previous article.) The first thing I want to talk about is GUILayout.Window, which is a [...]

I have yet to have any real problems with the Unity asset importing features, but the reason I wanted to write this article was to explain some of the quirks that might make things easier for new Unity developers. In this article, the two major things I want to cover are:
* Importing textured 3d models into your game
* Importing sound files and using them correctly

Continuing on from the last lesson, in this article we will make our game much more finalized and playable. What we should currently have is a sphere as a game piece, a board for the sphere to roll on, and a hole for the ball to fall into. All in all, what we have is quite basic, but it’s the framework that will allow us to really customize things how…

Like the rest of the Megabite series, I will be instructing by using Unity3d, which has proved itself to me time and again over the past few projects. Most recently, I was able to use the trial of Unity Android to get myself published onto the Android Market, and though in my case the game was [...]

UPDATE: Thanks to some amazing Reddit users, the code here has been updated for extra security. Connecting your Unity web application to html or PHP files is actually quite easily done. This could be useful for a great many reasons including: score lists, login/password, progress saving, etc. In this Megabite article, I will be [...]

In this installment, I wanted to talk about writing code. Though a great deal can be accomplished in unity using the standard assets and visual tools, code is where it all comes together and it will be a integral to any good project. Instead of small examples of working code, I think the easiest way [...]

In the first installment of Megabite, we covered some of the framework and terminology that makes up Unity3. These, of course, are simply the boring pieces of framework that make up the foundation of getting yourself started. (Be sure to start there if you are planning to follow along) We’ll pick up where we left [...]

I don’t make any claim toward mastery of computer programming or game creation, but with the rise of indie games there seems to be much more of a question as to how one can create the game of their dreams – their very own indie game. For this tutorial, I will be covering some basic [...]






