• Register

The lights have gone out and the boogeyman is out to get you!

Report RSS The Technical Side of things

Christopher Ueda, a unity developer for Goon Studios, starting a development blog from a software engineer's prespective.

Posted by on

Hello everyone!

I'm Christopher Ueda, a Unity developer for Goon Studios, and I will be writing in this blog about our development from a software engineer's perspective.

At Goon Studios, we develop games using the Unity game engine, which allows us to rapidly prototype and visualize our designs as we implement them. The back-end programming required for a framework is already done for us, so we can drag, drop, test and play as soon as we get the assets from other members of our team.

To start things simply, let's take a look at Unity and how we work within it to create objects in the game.

Here's our titular hero, posing for the camera:

bloggey01

As you can see, there are two screens, one showing the editor and one showing what the scene will look like in-game. We can change things in the editor to behave as we like, then press the Play button up top to test our game.

In the image below, I've selected the boy in the Hierarchy (where all the objects in our current scene are listed) and a whole slew of things appear on the right side, in a panel called the Inspector. The Inspector screen is like a control panel - it's where all the magic happens. We can change the boy's look, the way he moves, and how he interacts with the world right in that panel. Adding components is easy - the "Add Component" button brings up a menu filled with premade components to use.

bloggey02

That green capsule surrounding the boy in the Scene view is a "CharacterController" component. We add Components to a base object to make it do various things. In this case, the CharacterController lets the boy collide with things. We can change the size in the Inspector panel. Inputting different values into Radius and Height give us a different shape for the boy. Note that we don't actually see this capsule in the game, but it is there. Its properties are very important, as they control whether the boy jumps over the enemies - or into them.

You may have noticed that there are many other Components in the Inspector window for this boy, with names prefaced by "Gs_". These are scripts, custom code that we've developed for the game that aren't included with Unity by default. This is where the programming comes in. Unity supports Javascript and C#, both popular programming languages, and provides libraries for both. Clicking on one of those script Components will open up a text editor which allows for code editing.

In code, we can refer to the just about any element of an object by name, and change its values as necessary. By customizing code for our game, we can make just about anything happen. For example, since we want the boy to be hurt by enemies, we can tell a script to keep track of the CharacterController and tell us if anything collides with it. However, if the boy collides with a star, we want the boy to instead pick it up and increment his star counter. (And if the boy collects 100 stars... and so on and so forth.)

Through a combination of the Scene and Inspector views, with a bit of scripting, we can build up the scene to become a playable level. Tie a few scenes together, and a game is born!

Thanks for reading our first technical entry. Please let us know where your interest lies - ask a question and we might answer it in the next entry!

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: