Foundational concepts for greyboxing a prototype in Unity

GameDev Dustin
4 min readJan 5, 2022

--

Greyboxing refers to very early game design and implementation, where often there is very little finished visual effects for a game prototype.

Since game engines usually will create new primitive objects, such as cubes or capsules, in a grey color, well, you can see where the name comes from!

Before we get started on the actual greyboxing prototype, let’s cover some concepts so it’s clear what we are doing.

Materials

“In Unity, you use materials and shaders together to define the appearance of your scene.

Since we are only greyboxing, the materials used will be extremely basic!
We will literally just recolor the object from grey to blue or red (Wow! I know…) for identification purposes.

But for future reference, materials will often contain multiple image file references that you can read up on here:

https://dustinspears.medium.com/what-are-materials-in-unity-725431e1bf5e

Prefabs

“Unity’s Prefab system allows you to create, configure, and store a GameObject complete with all its components, property values, and child GameObjects as a reusable Asset.

The Prefab Asset acts as a template from which you can create new Prefab instances in the Scene.”

Prefabs are simply game objects with a templating purpose.

If you have 10 or 100 of an identical game object in your scene, prefabs allow you to make changes to all of them simultaneously rather than one by one.

Scenes

“Scenes are where you work with content in Unity.
They are assets that contain all or part of a game or application.

For example, you might build a simple game in a single scene, while for a more complex game, you might use one scene per level, each with its own environments, characters, obstacles, decorations, and UI.”

Scenes are a good way to divide our game up in to manageable chunks and to avoid forcing the user’s machine (pc, smartphone, tablet, etc) from having to hold the entire game in memory at one time.

For example, a game may have a scene for the main menu and then for each “level” of a game.
This will vary by type of game, it may also be a new scene for each location or “world” within your game.

This could also include cinematic scenes that trigger in between gameplay.

Scripts

“The behavior of GameObjects is controlled by the Components that are attached to them…

Unity allows you to create your own Components using scripts.

These allow you to trigger game events, modify Component properties over time and respond to user input in any way you like.”

“A script makes its connection with the internal workings of Unity by implementing a class which derives from the built-in class called MonoBehaviour.”

Scripts are C# based files where you instruct the computer how to behave in a given circumstance, usually related to a particular game object.

You can attach multiple scripts to a game object as needed.

Unity scripts all derive from the Class type “MonoBehaviour” which by default will load with the following two methods:

// Use this for initialization

void Start () {

}

// Update is called once per frame

void Update () {

}

Any code you write in the “Start” method will trigger and run when the script becomes active.

For example, if your script is attached to the player character object, this code will not run until the character game object is instantiated (fancy word for created) into the scene.

Once the game object is instantiated, code in the “Start” method runs immediately.

The “Update” method runs much more frequently!

Do not put unnecessary code in here, as it will run literally every rendered frame of your game.

If your game is running at 60 frames per second, the “Update” method will execute 60 time per second!

You will often use the “Update” method for things like player movement and updating game state in general.

Unity integrates with Visual Studio’s “intellisense” feature which makes writing code much easier w/ autocompletion, definitions, and error checking.

That’s all for this article.
We’ll dive into greyboxing a top down space shooter in the next article.

--

--