Skip to content

Instantly share code, notes, and snippets.

@Spartan322
Created January 3, 2020 05:48
Show Gist options
  • Save Spartan322/3f79e451e2a83773c4c13d3c4b36cda7 to your computer and use it in GitHub Desktop.
Save Spartan322/3f79e451e2a83773c4c13d3c4b36cda7 to your computer and use it in GitHub Desktop.

Core Genre: 2D Platformer

Input Types

  • Move Left
  • Move Right
  • Jump
  • Crouch

Mechanical Input

  • Ground Movement: Move player according to Left and Right Inputs if considered on ground
  • Air Movement: Move player less then Ground Movement according to Left and Right Inputs if not considered on ground
  • Ground Jump: Move player opposing gravity when Jump Input is active if considered on ground
  • Wall Jump: Move player away from a wall when Jump Input is just active and Movement Inputs correspond towards the wall when not considered on the ground
  • Double Jump: Move player opposing gravity once when Jump Input is active if not considered on ground

Definitions

  • "considered on ground": A player who is on the ground, or a player who is moving just off the edge of a platform (not specifically on the ground but was very recently touching the ground)
  • "Jump Input is active": When Jump Input is pressed or was already pressed but could not specifically perform an action that frame, thus being delayed some frames until it can successfully activate

Backend Systems

  • Gravity: Vector acceleration responsible for moving the player towards a down direction or the ground, opposing Jump movements
  • Wall Cling: A slowing of the player when not considered on ground but Movement is pushing towards the direction of a wall if there still is one in the Movement direction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment