Unity Game Development Concepts

GaloreOmaha avatar
GaloreOmaha
·
·
Download

Start Quiz

Study Flashcards

10 Questions

What is the main function of a shader in Unity?

Defining how objects will be drawn

In Unity, why are most 3D models made up of triangles?

They provide the most efficient graphics calculations

What is the purpose of a normal map in Unity?

To simulate surface details through shading

What does 'Skinned Mesh Animation' involve in Unity?

Moving each vertex of a 3D model based on an internal skeleton

How does Unity handle lighting in 3D compared to 2D?

3D lighting is calculated based on sprites

What is required to have an animated object in Unity?

A rigged model, animation for the rigged model, an animator component on the Game Object, and an Animator Controller

Which type of light in Unity casts light from a single point outward in a sphere around it?

Point light

What does the Singleton pattern ensure in Unity?

It ensures only one object of a certain type exists throughout the game

In Unity, what does Dynamic Friction refer to?

Friction of a moving body

What is the difference between Discrete and Continuous collision detection in Unity?

Discrete is checked once per frame, Continuous checks once per frame and also in between frames for collision

Study Notes

Rigging and Animation

  • Rigging a model means setting up an internal skeleton that can be manipulated by an animator to move the model.
  • To have an animated object in Unity, you need:
    • A rigged model
    • Animation for the rigged model
    • An animator component on the Game Object
    • An Animator Controller assigned to the Animator
  • The Animator Controller holds all the separate animations and acts as an interface for your code.

Lighting

  • There are three basic light types in Unity:
    • Directional (e.g. sun)
    • Point (e.g. hanging light bulb)
    • Spot (e.g. spotlights)
  • Directional lights cast light evenly across the scene and don't fade at a distance.
  • Point lights cast light from a single point outward evenly in a sphere and fade out the further you get from the source.
  • Spot lights cast light from a single point outward in a cone shape and fade out the further you get from the source.

GameObjects

  • The DontDestroyOnLoad function can be used to move a GameObject between scenes without destroying it.
  • Example: DontDestroyOnLoad(gameObject);
  • A singleton is a code pattern that ensures only one instance of a GameObject exists.
  • Example: public class ScriptName : MonoBehaviour { static scriptName instance; ... }

Physics

  • 3D physics is similar to 2D physics, with the addition of the Z axis.
  • 3D and 2D physics do not collide.
  • By default, Unity uses Discrete collision detection, which checks for collisions once per frame.
  • Continuous collision detection checks for collisions once per frame and also checks in between frames, but takes a big performance hit.

Physics Materials

  • Dynamic Friction is the friction of a moving body.
  • Static Friction is how much friction must be overcome to start an object moving.
  • Bounciness determines how much an object should bounce.

First Person Controls and Materials

  • To rotate a game object towards the mouse's current position, you must first convert it to the same coordinate space.
  • PlayerPrefs is not safe for saving important data.
  • Materials use shaders to set properties of how the object will be drawn.
  • Shaders can use various images, such as textures, provided by an artist.
  • A normal map is a flat image that can be applied and interpreted in the shader.

2D and 3D

  • Unity was built for 3D, but 2D was supported in Unity 4.
  • 2D uses Orthographic Camera, while 3D uses Perspective Camera.
  • 2D uses sprites, while 3D uses models.
  • 2D lighting is calculated on sprites, while 3D lighting is calculated on models.
  • Every 3D model is made up of lots of smaller flat triangles, known as polygons.
  • Polygons are used because they are the most efficient for graphics calculations, textures, lighting, and shadows.

3D Animation

  • Skinned Mesh Animation is the practice of moving each vertex of a 3D model relative to an internal skeleton.
  • Rigging is the process of setting up how each point should move relative to the skeleton inside.

Learn about game development concepts in Unity, including PlayerPrefs, rotating game objects towards mouse position, different coordinate spaces, multiple scenes, 2D and 3D differences, cameras, sprites, models, lighting calculations, and more.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Untitled
13 questions

Untitled

AmiableWolf avatar
AmiableWolf
Mixed-Dimension UI Design for Unity Games
4 questions
Unity Animator Controller
3 questions
Use Quizgecko on...
Browser
Browser