Products
Features
YouTube Video Summarizer
Summarize YouTube videos
Web & PDF Highlighter
Highlight web pages & PDFs
Chat with PDF
Ask any PDF questions with AI
Ask AI Clone
Chat with your highlights & memories
Audio Transcriber
Transcribe audio files to text
Glasp Reader
Read and highlight articles
Kindle Highlight Export
Export your Kindle highlights
Idea Hatch
Hatch ideas from your highlights
Integrations
Obsidian Plugin
Notion Integration
Pocket Integration
Instapaper Integration
Medium Integration
Readwise Integration
Snipd Integration
Hypothesis Integration
Apps & Extensions
Chrome Extension
Safari Extension
Edge Add-ons
Firefox Add-ons
iOS App
Android App
Discover
Discover
Ideas
Discover new ideas and insights
Articles
Curated articles and insights
Books
Book recommendations by great minds
Posts
Essays and notes from readers
Quotes
Inspiring quotes collection
Videos
Curated videos and summaries
Explore Glasp
Glasp Newsletter
Weekly insights and updates
Glasp Talk
Interview series with great minds
Glasp Blog
Latest news and articles
Glasp Use Cases
Learn how others use Glasp
Build & Support
Glasp API
Access Glasp's API for developers
MCP Connector
Connect Glasp to Claude & ChatGPT
Community
Glasp Reddit Community
Students
Student discount and benefits
FAQs
Frequently Asked Questions
AboutPricing
DashboardLog inSign up

Q&A #1: Side-Scroller in p5.js

60.5K views
•
May 27, 2016
by
The Coding Train
YouTube video player
Q&A #1: Side-Scroller in p5.js

TL;DR

Programming a side scroller with simulated gravity for jumping using forces.

Transcript

"I'm attempting to create a moderately functional side scroller using different" "forces and whatnot but the acceleration of my object seems immediate and abrupt" "going from 0 to acceleration to an immediate constant acceleration" ect noises "i'm looking for advice how to simulate" "gravity so that jumping can be implemented such as when a user ... Read More

Key Insights

  • 👾 Simulating gravity and jump forces are essential for creating realistic jumping mechanics in a side-scrolling game.
  • 🎮 Forces like mass, acceleration, and velocity are fundamental concepts in game development for controlling movement.
  • 🎑 The translate function can be used to manipulate the view of the game scene, creating the illusion of movement while keeping the character in place.
  • 👾 Edge detection and collision handling functions are crucial for ensuring proper boundaries and preventing falls in the game world.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: How can gravity be simulated in a side-scrolling game for jumping mechanics?

Gravity can be simulated by continuously applying a downward force to the character to create a natural jumping motion when a key is pressed.

Q: What role do forces play in implementing movement in the game?

Forces, such as gravity and jump forces, are used to manipulate the character's acceleration and velocity, creating realistic movement in the game.

Q: How can the background be made to appear as if the character is moving without physically changing its position?

By using the translate function to move the view of the scene based on the character's position, the background can be made to give the illusion of movement while keeping the character stationary.

Q: How can obstacles and collisions be handled in the game to prevent the character from falling through the floor?

By implementing edge detection and collision handling functions, the game can ensure that the character remains within the boundaries of the game world, preventing falls and maintaining gameplay integrity.

Summary & Key Takeaways

  • Implementing gravity in a side-scrolling game for jumping obstacles.

  • Using forces to apply continuous and instantaneous movements.

  • Exploring concepts like force, mass, acceleration, and Newton's laws in game development.


Read in Other Languages (beta)

English

Share This Summary 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Explore More Summaries from The Coding Train 📚

ITP/IMA Winter Show 2019 thumbnail
ITP/IMA Winter Show 2019
The Coding Train
Classifying Poses with ml5.js Part 2 thumbnail
Classifying Poses with ml5.js Part 2
The Coding Train
9.4: Genetic Algorithm: Looking at Code - The Nature of Code thumbnail
9.4: Genetic Algorithm: Looking at Code - The Nature of Code
The Coding Train
ITP/IMA Winter Show 2018 thumbnail
ITP/IMA Winter Show 2018
The Coding Train
Text Generation using Spell with Nabil Hassein thumbnail
Text Generation using Spell with Nabil Hassein
The Coding Train
Coding Challenge #126: Toothpicks thumbnail
Coding Challenge #126: Toothpicks
The Coding Train

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Apps & Extensions

  • Chrome Extension
  • Safari Extension
  • Edge Add-ons
  • Firefox Add-ons
  • iOS App
  • Android App

Key Features

  • YouTube Video Summarizer
  • Web & PDF Summarizer
  • Web & PDF Highlighter
  • Chat with PDF
  • Ask AI Clone
  • Audio Transcriber
  • Glasp Reader
  • Kindle Highlight Export
  • Idea Hatch

Integrations

  • Obsidian Plugin
  • Notion Integration
  • Pocket Integration
  • Instapaper Integration
  • Medium Integration
  • Readwise Integration
  • Snipd Integration
  • Hypothesis Integration

More Features

  • APIs
  • MCP Connector
  • Blog & Post
  • Embed Links
  • Image Highlight
  • Personality Test
  • Quote Shots

Company

  • About us
  • Blog
  • Community
  • FAQs
  • Job Board
  • Newsletter
  • Pricing
Terms

•

Privacy

•

Guidelines

© 2026 Glasp Inc. All rights reserved.