Apr 132012
 
Megabite #28 - Saving and Loading (part 2)

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 [...]

Apr 062012
 
Megabite #27 - Sending a message

In this brief tutorial, I wanted to show some quick code examples which will allow your scripts to easily communicate with each other by means of executing each other’s functions.  Without going into descriptions of more intermediate topics such as classes, methods, or other terminology that might be difficult to understand, what I will do here is [...]

Mar 232012
 
Megabite #25 - Understanding Variable Types

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 [...]

Mar 092012
 
Megabite #24 - Saving and Loading (part 1)

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 [...]

Mar 022012
 
Megabite #23 - Understanding Local vs World

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 [...]

Feb 242012
 
Megabite #22 - Hashtables

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 [...]

Feb 232012
 
Megabite #21 - Working With Simple Arrays

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 [...]

Feb 172012
 
Megabite #20.5 - Delayed

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 [...]

Feb 032012
 
Megabite #19 - Working with Grids (part 1)

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 [...]

Jan 272012
 
Megabite #18: Procedural Generation (part 2)

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 [...]

Jan 202012
 
Megabite #17: Procedural Generation (part 1)

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 [...]

Jan 062012
 

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 [...]

Dec 302011
 
Megabite #14 - Adding Music and Sound Effects into a Game

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 [...]

Dec 022011
 
Megabite #10 - Creating My First AI System

Over this holiday break, I was able to do something exciting – create a working AI for a top-down game I’ve been working on.  While it isn’t perfect, I’ll share with you the steps and the code that I used in order to get the functionality that I wanted.

Nov 182011
 
Megabite #8 - Importing Your Wares Into Unity3d

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

Nov 112011
 
Megabite #7 - An Android Game From Scratch (part 3)

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…

Oct 142011
 
Megabite #3 - Smooth Operators

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 [...]