Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Game Math and Physics Basics in 2D
Rating: 4.1 out of 5(22 ratings)
289 students

Game Math and Physics Basics in 2D

Learn Useful Computer Game Math
Created byT O
Last updated 8/2018
English
English [Auto],

What you'll learn

  • describe unit vectors
  • describe vectors in general
  • describe scalars
  • describe distance
  • describe speed
  • describe velocity
  • understand coordinate transformations
  • describe world space
  • describe object space
  • describe forces
  • describe acceleration
  • describe displacement
  • describe the z axis in unity vividly
  • describe rotations
  • work with square roots as needed
  • describe vector components
  • describe magnitudes
  • describe motion on a circle
  • understand angles
  • add vectors
  • subtract vectors
  • multiple vectors by scalars
  • find unit vectors
  • find vectors of a desired magnitude and direction
  • understand weighted averages
  • describe average speed
  • describe average velocity
  • and many others!

Course content

2 sections79 lectures8h 9m total length
  • Displacements/distances along x7:22

    Explore one-dimensional motion in Unity by comparing displacement vectors to distances along the x axis, using position x changes and arrows to illustrate left and right movement.

  • Displacements/distances along y3:08

    Explore vertical displacements and distances using displacement vectors and arrows for up and down movement. Distinguish displacement from distance: vectors carry direction, while distance is a scalar.

  • Unit vectors along each axis in 2D space3:47

    Examine relative positions and distances in 2d space, showing there is no absolute origin and how displacement is described from each object's perspective.

  • Relative positions along coordinate axes3:47

    Investigate relative positions along coordinate axes, noting that there is no absolute origin, describe displacement from each object's perspective, and measure the single distance between objects.

  • World space vs. object space, part 16:15

    Explore world space versus object space in 2D game math by examining local coordinate systems, global origin, and how positions and relative measurements vary across objects.

  • World space vs. object space, part 24:49

    Explore world space versus object space through a local coordinate system, translating positions from an alien's perspective and understanding relative coordinates and measurements in 2D.

  • Vector components in mathematical form12:00

    Learn 2D vector components using unit vectors along the x and y axes, building any vector as a linear combination with clear horizontal and vertical components.

  • Vector components in unity, 2 objects6:12

    Relate the positions of the spaceship and Earth using a displacement vector and its x and y components in a 2D Unity context.

  • Displacements for tilted objects3:20

    Explore how a tilted object affects displacement vectors, and use basic trig to resolve their earth-frame and ship-frame components in the ship's local coordinates.

  • Displacements and scenes translations5:06

    Explore how translating a scene horizontally or vertically affects the displacement vector and its components, and see that the vector remains unchanged when the entire scene moves together.

  • Z axis basics with physical model5:07

    Explore the z axis in Unity as perpendicular to the screen and learn how z values and rotation about the z axis determine object placement in the x y plane.

  • Effect of rotation on one object6:25

    Rotate the Earth object about the z axis to illustrate 2d rotations; observe the local coordinate system shift and the rotation values in the inspector.

  • Vectors/vector components under rotations8:25

    Explore rotating two objects about their midpoint and observe the joining vector’s length remains invariant while its direction changes; learn to restore original orientations.

  • Vector components in unity, 3 objects7:30

    Explore how displacement vectors and their components define relationships among three colored objects in 2D space, including position, overlap, and rotation transformations.

  • Difference between distance and displacement vector length8:27

    Compare distance and displacement vector length in 2d motion by applying the pythagorean theorem to the x and y components of the displacement, illustrating their difference.

  • 0 magnitude displacements vs big distances5:58
  • Distance at tiny scales8:58

    Explore tiny-scale 2D motions, calculating distances with small x, y changes and the Pythagorean theorem for rigid shapes; learn to sum segment distances and the role of computers.

  • Angle basics in unity9:51

    Explore how to relate objects using vectors and angles in unity, measuring angles from the positive x axis with a protractor and computing vector length with the Pythagorean theorem.

  • Magnitude and angle of displacement on unit circle9:57

    Describe a displacement on the unit circle using a magnitude and angle, then convert to x and y components. Relate cosine and sine to coordinates, e.g., 30° gives x=√3/2, y=1/2.

  • Vectors from unit vectors11:23

    Explore how to express a doubled unit vector as a displacement with clear horizontal and vertical components, using 45-degree geometry, unit vectors, and the distributive property.

  • Components from angles and length7:44

    Learn how a 2d position vector uses magnitude and angle to derive its x and y components from the origin, e.g., x = sqrt(3)/2, y = 1/2 at 30 degrees.

  • Unit vectors from math7:15
  • Vector addition for displacements, graphical rules7:39

    Explore graphical vector addition of displacements in 2d by tracing individual motion vectors along paths to obtain the resultant displacement.

  • Vector addition math9:07

    Explore vector addition by adding the x and y components to form the resultant. Link the graphical path to the underlying math and verify the x and y sums.

  • Graphical vector subtraction8:00

    Master graphical vector subtraction by visualizing the vector from V1 to V2, then add it to V1 to reach V2 using the origin and Unity examples.

  • Mathematical vector subtraction7:43

    Explore how to subtract two 2D vectors by decomposing them into horizontal and vertical components, compute V1−V2 and V2−V1, and verify the results graphically.

  • Midpoint of a segment5:25

    Learn how to find the midpoint of a segment by averaging x and y coordinates, revealing the centroid for two points and extending to three objects in two-dimensional space.

  • Centroids of point distributions6:52

    Locate the centroid of three points by drawing medians to find their intersection, then average x and y coordinates to get the centroid, e.g., (8/3, 4/3) and (0, -1/3).

  • Weighted average, basic demo2:25

    Explore how a weighted average explains balance by adding mass to one side and observing the shift of the balance point. Prepare for unity-based modeling next.

  • Weighted average, multiple objects, unity9:18

    Compute the center of mass for two masses via a weighted average of mass and position, giving the balance point on a fulcrum. Extend to x and y coordinates.

  • Simulation of coordinate translations, horizontal and vertical line segments4:56

    Learn coordinate translation moves objects in 2d by applying x plus one for horizontal shifts and y plus two for vertical shifts, illustrated with points A, B, C, and D.

  • Diagonal translations on coordinates4:06

    Illustrates diagonal translations by showing how moving along a diagonal changes coordinates: x+3,y+4, then x-6,y+7, aligning motion with final positions.

  • 2D balance point, physical model4:40

    discover the balance point of a two-mass distribution in 2d and see how translating the masses along the x and y axes shifts the balance point.

  • Rotations and translations6:25

    Rotate the ship by 45 degrees, then translate to new coordinates, transforming from a local ship coordinate system to world space using the local x and y axes.

  • Constant speed in 2D, line segments6:28
  • Square roots in more detail3:01

    Learn to simplify square roots by factoring into a largest square and a factor, then distribute the root across factors; sqrt(24)=2 sqrt(6), sqrt(15) stays sqrt(15), sqrt(18)=3 sqrt(2).

  • Constant speed, diagonal movements5:44

    Explore constant speed motion along diagonal paths in 2d game math, using the distance formula and pythagorean theorem to show speed equals total distance divided by total time.

  • Constant velocity in 2D, horizontal and vertical7:58

    This lecture defines constant velocity in 2d as displacement over time and shows it as a vector with x and y components in horizontal and vertical motion.

  • Constant velocity, slanted segments6:41

    Explore constant velocity in diagonal motion by using displacement vectors and components; compute velocity as displacement divided by time, demonstrating 1 m/s in both x and y directions.

  • Speed vs. velocity for line motions4:52

    Explore the difference between speed and velocity, with speed as distance over time and velocity as displacement over time. Compute velocity components and the speed magnitude using the Pythagorean theorem.

  • 0 velocity2:29

    Explore zero velocity, displacement vectors, and the distinction between velocity and speed through a 2d game physics example, showing how displacement can be zero while speed remains nonzero.

  • Average concepts6:32

    Learn how averaging replaces varying daily rates with a single uniform rate while preserving the cumulative result. Use calories per day as an example in game math and 2D physics.

  • Average speed in 2D, horizonital segments5:12

    Explore average speed in 2D motion across two horizontal segments, comparing speeds of one and three meters per second, and show how averaging yields a constant two meters per second.

  • Average speed, slanted segments5:19

    Explain average speed for a two-segment journey, compare leg distances and speeds, and compute the overall rate by averaging leg speeds, illustrating constant speeds per leg.

  • Average velocity in 2D, horizontal segments5:26

    Compute the average velocity in 2d by averaging the two leg velocity vectors, (v1 + v2)/2, with horizontal segments showing x components and zero y components.

  • Calculations involving speed and velocity4:38

    Explore how to compute distance and displacement from speed and velocity vectors using units, time, and vector components, including negative directions and unit cancellation.

  • Average velocity for slanted movements7:05

    Learn how to compute average velocity for diagonal motion by averaging the two leg velocities to obtain a single constant velocity vector of 1.5 m/s horizontal and 3 m/s vertical.

  • Displacement vector from given velocity2:25

    Multiply velocity components by time to get the displacement vector: x = -4 m/s × 25 s = -100 m, y = 10 m/s × 25 s = 250 m.

  • Desired velocity from object to object6:24

    Compute the displacement from point a to point b, find its magnitude with the Pythagorean theorem, form a unit vector, then scale by the desired speed to obtain velocity vector.

  • Constant acceleration changing speed6:30

    Explore constant acceleration and how speed grows or decelerates over time, starting from an initial speed and measured in meters per second and meters per second squared.

  • Visualizing acceleration7:04

    Visualize acceleration in 2-d motion by interpreting speed changes over equal time intervals, using meters per second, with the Pythagorean theorem for diagonal paths.

  • Average acceleration3:31

    Apply the average acceleration formula from the change in speed over a time interval. Observe how speeds rise from 10 m/s to 40 m/s over 10 s, yielding 3 m/s².

  • Constant acceleration changing velocity3:06

    Shows how two-dimensional acceleration vectors change velocity vectors by updating each component over time; uses an example with the horizontal (x) and vertical (y) components to illustrate one-second updates.

  • Visualize acceleration6:58

    Visualize how the velocity vector changes under acceleration in 2d, with a constant horizontal component and a vertical component that increases or decreases, measured in meters per second per second.

  • Position vector7:28

    Compute the final position by adding the initial position to velocity multiplied by time. Use consistent units, such as meters and seconds; for example, (1,2) + (2,3)×2 = (5,8) meters.

  • Final velocity vector3:41

    Compute the final velocity vector as v_final = v_initial + a t, treating velocity and acceleration as vectors. Use a time-based example to confirm unit consistency with meters per second.

  • Basic vertical acceleration5:21

    Explore basic vertical acceleration by releasing an object and observing gravity causing downward acceleration and velocity. There is no horizontal acceleration, and velocity vectors point straight down as time passes.

  • Physical introduction to forces5:38

    Explore the force vector concept by observing how direction and magnitude affect motion, and learn to add and balance multiple forces to predict a resultant.

  • Cancelling horizontal/vertical forces5:33

    Balance forces by applying equal opposite horizontal and vertical components to keep an object stationary. The lecture shows vector addition and how opposite forces cancel to a zero net force.

  • Cancelling slanted forces5:30

    Explore balancing forces in two-dimensional space by applying angled vectors and calculating their components to cancel each other, achieving a zero resultant force.

  • Cancelling four forces graphically4:51

    Visualize four force vectors and apply the graphical tip-to-tail method to sum them. The resultant is the zero vector, showing forces cancel in pairs.

  • Unbalanced forces7:49

    presents graphical vector addition by moving forces without changing length or direction, showing that the cumulative result equals a single resultant vector and predicting motion.

  • Summation notation applied to forces4:00

    Explore how summation notation adds force vectors by x and y components to produce the resultant force in newtons.

  • Finding a missing vector graphically6:01

    Visualize balancing two force vectors in 2D by placing them tip-to-tail and adding a third vector to return to the start, confirming a zero net force with components.

  • Finding a missing force mathematically3:50

    Find a missing force vector by solving for its x and y components; x = -3, y = 0, then verify via component sums in newtons.

  • Finding a force in a given direction5:27

    Compute the displacement from A to B, normalize to a unit vector, and scale by the desired magnitude to obtain the force in that direction.

  • Force equals mass times acceleration7:35

    Explore the force-acceleration relationship F = ma, showing how mass and force determine acceleration and its vector form in newtons and meters per second squared.

  • Velocity from force11:37

    Explore how force produces acceleration and shapes velocity in 2D, using F=ma and v = v0 + a t, then find speeds at t=1 s and t=5 s from components.

  • Position vector from initial position, velocity and acceleration14:06

    Explains how the position vector evolves from initial position, velocity, and acceleration using r(t)=r0+v t+a t^2, showing linear and quadratic contributions to the trajectory.

  • Projectile motion summary5:47

    Explore how a kick sets an initial velocity and shapes a projectile's trajectory under gravity, with and without friction, using a position vector with a g t^2 term.

  • Projectile motion specific example4:02

    Shows a projectile motion example using 30 m/s horizontal, 40 m/s vertical, and 9.8 m/s^2 gravity; after 1 s, position is 35 m in x and −4.9 m in y.

  • Decomposing projectile motion into individual functions4:29

    Decompose projectile motion into independent x(t) and y(t) functions, showing how time governs horizontal and vertical components to define the trajectory.

  • Understanding x(t)5:28

    Understand how x(t) describes an object's horizontal position over time, derive x(t)=30 m/s·t, and read off position from time using the slope of the x–t graph.

  • Understanding y(t)7:44

    Explore the two-dimensional motion of a projectile by analyzing y(t) and x(t) as separate time-based components of the position vector, including max height and horizontal range.

Requirements

  • It's helpful to have the latest version of the Unity installed.
  • You should already know how to work with signed numbers.
  • You should already have seen the concept of a two dimensional coordinate space.

Description

1. Friends, please take the time to review the curriculum carefully before buying so you can see exactly whether this is the right course for you. Please do not join until you have completed this step.

2. Please watch the free preview videos so you can see whether the presentation style works for you. Please remember  I am just one person, and I make my videos often after I have been working for many hours already.  Please do not join until you have completed this step.

3. If something needs fixing, please let me know. Again, I'm just one person and not a big team of people. I will try to fix it as quickly as possible. Thank you.



Course Overview: 

1. This course is for those who already know how to make a simple 2D project in unity. I'm assuming you can figure out how to do this. Please remember, however, that using Unity is NOT the main objective of this course.

2. This course focuses only on two dimensional math and physics concepts related to game programming.

3. In some of the videos you see how to use unity.

4. In some of the videos I use physical demonstrations to illustrate mathematical concepts related to game development.

5. In some of the videos I write by hand on paper because this is faster than writing on the computer screen.

6. You should be mentally prepared to work with square roots, vectors and units of various kinds like m/s and m/s^2 and kg.

7. I draw a lot in this course to illustrate various vector concepts. In other words, I use a variety of teaching methods.

8. There are a variety of exercises placed throughout the videos. Please try to complete every exercise. Practice, of the right kind, counts!:)

9. These videos focus primarily on understanding the concepts of vectors, distances, angles, transformations, speeds, velocities, accelerations, forces, and related concepts.

10. You should already be able to solve basic linear equations like 2+4+x=10  and you should understand how to compare numbers with ratios, as in 10kg/2kg. I do, however, still explain these too.

11. Please be sure to read the curriculum with meticulous care before enrolling so you can be sure this is truly the right course for you.

12. If you are already a great physics/math expert, please do not join this course. It will not help you.

13. For the hearing-impaired, closed-captions are added automatically. I do not have control over those, so they might not be perfect.

14. Thank you for reading, and see you inside!


Who this course is for:

  • This is a course for those are interested in understanding the mathematics of 2D game development.
  • This is a course for those who are interested in understanding the basic physics of 2D game development.