Fireship · @fireship
Unity in 100 Seconds
Uploaded March 7, 2022 · Length 2:45
Summary
unity game engine basics: building a 2d game in 100 seconds
- unity game engine
- 2d game development
- c sharp programming
- game development basics
- unity tutorials
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
unity a cross-platform game engine for
- 0:02
building 2d and 3d experiences made
- 0:04
famous for democratizing the immense
- 0:06
challenge of game development it was
- 0:08
created in copenhagen denmark and first
- 0:10
released in 2005. today it's the magic
- 0:12
behind many popular games like the 2d
- 0:15
among us
- 0:17
the 3d monument valley augmented reality
- 0:19
apps like pokemon go first-person
- 0:21
shooters like escape from tarkov as well
- 0:23
as interactive simulations and
- 0:25
animations beyond the gaming industry
- 0:27
the engine itself is written in c plus
- 0:29
plus but allows developers to write
- 0:31
their code in the more approachable c
- 0:32
sharp in addition it provides a powerful
- 0:35
graphical editor allowing you to draw
- 0:36
shapes work with cameras and apply
- 0:38
materials without having to write a
- 0:40
single line of code every game object
- 0:42
can have a variety of components like a
- 0:44
mesh to define its actual physical shape
- 0:46
a mesh renderer to apply materials and
- 0:48
lighting to an object and physics
- 0:49
components like rigidbody and colliders
- 0:52
that simulate things like gravity and
- 0:54
collisions in the real world and finally
- 0:56
you can extend an object with your own c
- 0:58
sharp code to make it do something
- 0:59
interesting like take hit points when it
- 1:01
runs into a bad guy to build your first
- 1:03
video game right now install unity hub
- 1:05
create a new project then open up the
- 1:07
editor you'll be greeted with a 3d scene
- 1:09
that contains a light source and a
- 1:11
camera a scene is like a game level that
- 1:13
you're developing while the camera is
- 1:14
the point of view of the player to
- 1:16
create a game of dodgeball let's add a
- 1:18
plane to be the ground a cylinder for
- 1:20
the player and a sphere for the ball
- 1:22
select an object then hit y on your
- 1:24
keyboard to move rotate and scale it to
- 1:26
your liking hit the play button and
- 1:27
notice how these shapes don't do
- 1:29
anything but if we add a rigid body to
- 1:31
the objects all of a sudden they're now
- 1:32
impacted by the laws of gravity
- 1:34
currently they look pretty boring but we
- 1:36
can make them look cool by creating a
- 1:37
material and then drag it onto the
- 1:39
shapes and now to make this game
- 1:41
playable let's add a script component to
- 1:42
it and then open it in vs code it
- 1:44
contains a class with two methods to
- 1:46
implement your code start is called once
- 1:48
at the very beginning of the game while
- 1:50
update is called on every frame while
- 1:51
the game is being played and there's
- 1:53
also fixed update that runs at the same
- 1:55
frame rate as the physics engine now to
- 1:57
move our player around we can define a
- 1:58
public property for the rigid body which


