Class Hours: 10:05 – 2:40
Mr. Bohmann | wbohmann@ewsd.org
10:05 Today’s Notes & Attendance
- Friday we are going to play (and publish) your breakout games
- Next week you will begin thinking and drafting your very own game – start thinking
10:10 Breakout

I was working on the Breakout game after you all left yesterday. Some tips to make your ball move better and not lose momentum:
- Turn off gravity
- Zero out linear and angular drag
- Freeze rotation
- On your bouncy material, turn off friction and make the bouncy to 1
This morning we are going to continue working on your breakout game. You are good if you have:
- One Level
- Custom pixel art for your blocks and game design
- A Score
- A win condition (clear all the bricks) (so we’ll probably need to count the number of bricks)
- A lose condition (hit the killbox and lose a turn or health goes to zero)
Your game is even better if you have:
- Sound !
- A title screen (we did an example on Tuesday)
- A Game Over Screen
- Invoke or Instanitiate something – so I have a demo for you here

Notice in the code above, are respawning the ball after 2 seconds. This give the player a moment to prepare. The function CreateNewBall has a spawn location set up using a location on x and y. This is a nice approach that does not require a spawn point to be declared.
10:50 Morning Break (10 minutes)

11:00 Game Publishing
Credit Scenes
In Unity it is very simple to create a rolling credit scene to honor yourself or your development team.
To create a credits scene, just create a new empty scene and add a UI Text object.
Then position the Text object so that the top of the text area is at the bottom of the scene. This means that the Text object is not visible when the scene first loads. You can then write a script to slowly move the text object up the screen.
void Update()
{
transform.Translate(Vector3.up * Time.deltaTime * 50.0f);
}
//This simple line of code will move the whole UI Text object up the screen each time
//Update() is called, many times per second. You can adjust the speed by making the
//numeric value at the end (e.g. 0.7f) larger or smaller.
A splash screen is shown when a game first starts. Splash screens will usually display some combination of graphics and text to introduce the game or show author and publisher information. A splash screen can also be used to hide the time that it takes to initially load the game onto memory.

Unity has a default splash screen that is shown each time a Unity game is launched. The screen shows a “Made with Unity” graphic for a brief time. You will not see this screen until you have built your game for publication. Unity Play a publishing platform for WebGL builds (which Unity does well).
You don’t normally see the splash screen until you build a game for publication. However, you can click the “Preview” button under the Splash Screen panel to see how your splash screen will look within the Unity IDE.
Game Icons
Every Unity game program has a game icon. This image identifies your program on the player’s computer or device. By default, Unity creates a small version of their own logo as your game’s icon. You will want to customize this icon to better identify your game. If publishing on the WebGL format, you will likely not have the ability to customize in the Icon area. It will use your chosen default icon.
11:30 Materials in Unity

(on Right) which looks sharp and 3 Dimensional especially in the light
Let’s look at how to create and use materials, which can be used to add colors, patterns, and surface textures to objects in your game. Materials determine how the surface of a model will be rendered.
Depending on the Unity template you install, your shaders may impact your materials choices and level of detail.
A Shader is a small program in a game engine that renders pixels and vertices. Basically how to render graphics data. The Unity Core has the standard shader.

By default (and depending what type of project you load) most materials are assigned to the Standard Shader. A Shader is built in program that calculates the appropriate level of light, dark and color during the render of your scene. Basically how the pixels of the surface of the model should look.
Unity has other built in shaders:
- FX: Lighting and glass effects.
- GUI and UI For user interface graphics.
- Mobile: Simplified high-performance shader for mobile devices.
- Nature: For trees and terrain
- Particles: Particle system effects.
- Skybox For rendering background environments behind all geometry
- Sprites For use with the 2D sprite system
- Unlit: For rendering that entirely bypasses all light & shadowing
- Legacy: The large collection of older shaders which were superseded by the Standard Shader
Materials are used in conjunction with shaders. Most shaders come with a list of material parameters.
- Albedo is color or can be an image
- Metallic and Smoothness refer to how metal like an object is and how much light refraction
- Normal Maps can be used to make a surface look like it has a texture or bumps when light hits it
- Height Maps or Bump Maps are used like a normal map and will give additional definition to a surface, The map itself is a greyscale Texture that stores height data for an object. Each pixel stores the height difference perpendicular to the face that pixel represents.
- Occlusion Map is a greyscale image, with white indicating areas that should receive full indirect lighting, and black indicating no indirect lighting.
- Displacement Maps actually move or simulate how the normals receive light (think of displacement = move) this is more resource heavy
- Secondary Maps (or Detail maps) allow you to overlay a second set of textures on top of the main textures listed above. You can apply a second Albedo colour map, and a second Normal map.
Some Vocabulary Terms:
Specular: relating to or having the properties of a mirror
Occlusion: to obscure (think shadows)
Normals: refers to a vector that is perpendicular (or “normal”) to a surface at a specific point. We refer to normal maps as “normal maps” because they store information about a 3D model’s surface normals.
A Reference Link to Making Materials
Normal Maps or Texture Maps are special kinds of image files that can control how bumpy or smooth a surface inside a scene can look when light interacts with it. There are many different types of maps that can be applied to an object to improve the realism of that object.
PBR stands for Physical Based Rendering. Unity, Unreal, Substance Painter and Blender use PBR workflows. If you want to read a really good article to learn more about PBR texturing and the host of different maps (like albedo, normal, specular, etc….) read this article.
Textures are applied to objects using materials. Unity can import textures from most common image file formats.
Sites for textures:

12:25 Lunch
12:55 Independent Reading

1:20 Afternoon Break (10 minutes)

1:30 Speed Design

1:50 Independent Production & Guided Support
BreakOut Games – Get them ready for Friday
2:38 Dailies
