Building a Better Jump J. Kyle Co-founder, Minor Key Games.

Slides:



Advertisements
Similar presentations
Projectile Motion.
Advertisements

Section 3-5: Projectile Motion
7-2 Projectile Motion. Independence of Motion in 2-D Projectile is an object that has been given an intial thrust (ignore air resistance)  Football,
Agenda 1) Warm-Up 5 min 2) Vocab. Words 10 min 3) Projectile Motion Intro. 15 min 4) Pre-Lab Vectors 15 min 5) Vector Lab 30 min Spring scale.
Motion in Two Dimensions
Projectile motion Chapter 4, Section 4 Lecture 08 General Physics (PHYS101)
Physics  Free fall with an initial horizontal velocity (assuming we ignore any effects of air resistance)  The curved path that an object follows.
Ideal Projectile Motion
Projectile Motion.
Projectile Motion Instructional Objectives: Students will be able to: –Define Projectile Motion –Distinguish between the different types of projectile.
AIM: How can we describe the path of an object fired horizontally from a height above the ground? DO NOW: A ball rolls off a table top with an initial.
Erin Catto Blizzard Entertainment Numerical Integration.
Kinematics of Two-Dimensional Motion. Positions, displacements, velocities, and accelerations are all vector quantities in two dimensions. Position Vectors.
1 Non Linear Motion 2 Definitions: projectile - An object that is thrown,tossed, or launched. trajectory - The pathway of a projectile. Usually follows.
Projectile Motion Part 1
Projectile Motion ► All objects move in air along a similar path. Explain the shape of that path. ► What is this curve called? (math class)
Projectile Motion I 9/30/13. Bellwork What is free fall? The motion of an object under the influence of the gravitational force only (no air resistance)
Physics pre-AP. Equations of motion : We assume NO AIR RESISTANCE! (Welcome to “Physicsland”), therefore… The path of a projectile is a parabola. Horizontal.
Projectile Motion /all-videos/extreme-grocery-shopping /all-videos/extreme-grocery-shopping.
Projectile Motion Projectile Fired Horizontally. A cannonball shot from a cannon, a stone thrown into then air, a ball rolling off the edge of table,
Chapter 6 Forces In Motion
Projectile motion.
PROJECTILE MOTION An object launched into space without motive power of its own is called a projectile. If we neglect air resistance, the only force acting.
Projectile Motion Also known as two dimensional motion or trajectory problems.
General Physics Projectile Motion. What is a Projectile? Name examples of projectiles. A projectile has a constant horizontal velocity. A projectile has.
2 Dimensional (Projectile) Motion
1 Motion in Two Dimensions Using + or – signs is not always sufficient to fully describe motion in more than one dimension Using + or – signs is not always.
Motion in Two Dimensions
Aim: How can we solve problems dealing with horizontally fired objects? Do Now: An object falls freely for 75 m. How long does it take to reach the ground?
Chapter 6 Motion In Two-Dimensional. Motion in Two Dimensions Using ________signs is not always sufficient to fully describe motion in more than one dimension.
Simultaneous Independent Vector Analysis
Motion in Two Dimensions Chapter 7.2 Projectile Motion What is the path of a projectile as it moves through the air? ? . What forces act on projectiles?
CHAPTER 6 MOTION IN 2 DIMENSIONS.
Two-Dimensional Motion Chapter 3. A little vocab  Projectile = any object that moves through space acted on only by gravity  Trajectory = the path followed.
Kinematics in Two Dimensions; Vectors
Notes: Projectile Motion. Projectiles are... Objects thrown or launched into the air Objects thrown or launched into the air While in the air, gravity.
Quadratics Review y = x 2. Quadratics Review This graph opens upwards y = x 2.
Projectile Motion. Projectile- only force on object is gravity Trajectory- projectile’s path Independence of Motion – Velocity and acceleration are vectors.
Motion in Two Dimensions Chapter 7.2 Projectile Motion What is the path of a projectile as it moves through the air? Parabolic? Straight up and down?
Motion in Two Dimensions
Unit Two Chapter 3, Part 2 Projectile Motion. A projectile is an object upon which the only force acting is gravity.
2D Motion 2015 cjcb Angled Projectile Motion. RECAP: What is Projectile Motion? Projectile motion is the motion of an object that is being thrown or launched.
Non Linear Motion.
Physics.  A projectile is any object that has been launched with no means of controlling its own flight…it is in free-fall motion while at the same time.
Projectile Motion The motion of a falling object with air resistance and gravity acting on it.
 How do you find the x and the y component of velocity?  Is there such a thing as centrifugal force (pulling to the outside)?  How often does centripetal.
Building a Better Jump J
(Constant acceleration)
Motion in Two Dimensions EQ: What is a projectile?
Linear Motion, Free Fall, and Vectors Combined!
Notes: Projectile Motion
Projectile Motion.
Chapter 5 Projectile Motion
Projectile Motion.
Compound motion Three types of motion: Vertical motion
Projectile Motion.
Projectile Motion.
Projectile Motion EXAMPLE
Motion with constant acceleration
Compound motion Three types of motion: Vertical motion
Projectile Motion SPH4U.
Projectile Motion.
Motion in Two Dimensions EQ: What is a projectile?
2 Dimensional Motion Or Projectile Motion
Projectile Motion Projectile Motion.
Topic 9.2 Space Projectile Motion.
Projectile Motion Objective: I will distinguish between the horizontal and vertical components of projectile motion and analyze the factors that influence.
Projectiles The only force acting on a projectile is the force due to gravity (weight).
Presentation transcript:

Building a Better Jump J. Kyle Co-founder, Minor Key Games

Hi ● I’m Kyle ● Hi Kyle XX

Motivation ● Avoid hardcoding, guessing games ● Design jump trajectory on paper ● Derive constants to model jump in code

Motivation ● Has this ever happened to you? ● There’s GOT to be a better way!!

Assumptions ● Model player as a simple projectile ● Game state ● Position, velocity integrated on a timestep ● Acceleration from gravity ● No air friction / drag

Gravity ● Single external force ● Constant acceleration over time

Integration ● Integrate over time to find velocity

Integration ● Integrate over time again to find position

Projectile motion ● Textbox Physics 101 projectile motion ● Understand how we got there

Parabolas ● Algebraic definition ● ● Substituting

Properties of parabolas ● Symmetric

Properties of parabolas ● Geometric self-similarity

Properties of parabolas ● Shaped by quadratic coefficient

Design on paper

Maths ● Derive values for gravity and initial velocity in terms of peak height and duration to peak

Initial velocity Solve for v 0 :

Gravity Known values: Solve for g :

Back to init. vel. Solve for v 0 :

Review

Time  space ● Design with x-axis as distance in space ● Introduce lateral (foot) speed ● Keep horizontal and vertical velocity components separate

Parameters

Time  space

Maths ● Rewrite gravity and initial velocity in terms of foot speed and lateral distance to peak of jump

Maths

Review

Breaking it down ● Real world: Projectiles always follow parabolic trajectories. ● Game world: We can break the rules in interesting ways. ● Break our path into a series of parabolic arcs of different shapes.

Breaks ● Maintain continuity in position and velocity ● Trivial in implementation ● Choose a new gravity to shape our jump

Fast falling PositionVelocity / Acceleration

Variable height jumping PositionVelocity / Acceleration

Double jumping PositionVelocity / Acceleration

Integration ● Put our gravity and initial velocity constants to use in practice ● Integrate from a past state to a future state over a time step

Integration

Euler ● Pseudocode pos += vel * Δt vel += acc * Δt ● Easy ● Unstable ● We can do better

Runge-Kutta (RK4) ● The “top-shelf” integrator. ● No pseudocode here. :V ● Gaffer on Games: “Integration Basics” ● Too complex for our needs.

Velocity Verlet ● Pseudocode pos += vel*Δt + ½acc*Δt*Δt new_acc = f(pos) vel += ½(acc+new_acc)*Δt acc = new_acc

Observations ● Similarity to projectile motion formula ● What if our acceleration were constant? ● We could integrate with 100% accuracy

Assuming constant acceleration

● Pseudocode pos += vel*Δt + ½acc*Δt*Δt vel += acc*Δt ● Trivially simple change from Euler ● 100% accurate as long as our acceleration is constant

Near-constant acceleration ● What if we don’t change a thing? ● The error we accumulate when our acceleration does change (versus Velocity Verlet) will be: ● Δacc * Δt * Δt ● Acceptable?

The takeaway ● Design jump trajectories as a series of parabolic arcs ● Can author unique game feel ● Trust result to feel grounded in physical truths

Questions? ● In practice: You Have to Win the Game (free game PLAY IT PLAY MY THING) ● The ● ●