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

HTML5 Game - Improving the Tank's Controls

284 views
•
December 24, 2019
by
Web Dev Cody
YouTube video player
HTML5 Game - Improving the Tank's Controls

TL;DR

This video demonstrates improved tank and cannon rotation mechanics for a more realistic gameplay experience.

Transcript

so in this video of the html5 game series I'm going to be showing you how to do the rotation of the body and the cannon separately and then also I added on the ability to rotate the tank so the controls are a little bit different from the last video and basically if you press D it's going to rotate the tank to the right and then a is going to rotat... Read More

Key Insights

  • 🎮 The video showcases improvements to tank control mechanics, emphasizing realism in user input.
  • 🎮 The separation of gun and body rotations allows for more complex and flexible control schemes in the game.
  • 👨‍💻 GitHub is used to house all versions of code, promoting community engagement and iterative development.
  • 🛄 The mouse movement directly influences cannon aiming, creating an interactive aiming system.
  • 👾 The coding approach encourages users to understand vector math in game development for movement and rotation.
  • 👻 Adjustments to rotation speed can easily be made through variable manipulation, allowing customization.
  • 👾 Drawing order is a significant aspect of game design, influencing how components interact visually.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: What are the new controls introduced for the tank in this video?

The video introduces realistic tank controls where pressing 'D' rotates the tank to the right and 'A' rotates it to the left. The 'W' key moves the tank forward, while the 'S' key moves it backward. This control scheme aims to mimic real tank movements, giving players a more immersive gaming experience.

Q: How does the code handle the rotation of the tank and cannon?

The code separates the rotation mechanics for the tank body and the cannon. The gun rotation is based on mouse movement, while the body rotation depends on user input (A and D keys). The update function manages these rotations and ensures the drawing order respects their relationship, with the gun drawn after the body.

Q: Why is the drawing order important in this game?

The drawing order is crucial because it determines the visual layering of the tank components. The gun must be drawn after the tank body to ensure it appears on top. If the order were reversed, the cannon would be hidden beneath the tank, affecting the gameplay presentation and user experience.

Q: What changes were made to the input handling for the tank's movement?

The input handling was modified to allow the tank to rotate in different directions based on both movement and direction. When moving forward or backward, the tank's body rotation is adjusted to give a more intuitive response that matches player expectations based on the direction of movement.

Summary & Key Takeaways

  • The video focuses on enhancing tank controls, introducing separate rotation mechanics for the tank body and cannon to create a more realistic experience.

  • Input controls have been updated, with keys D and A for right and left rotations respectively, and W and S to move forward and backward.

  • All code changes and progress from the series are available in a GitHub repository, allowing viewers to interact with the evolving game project.


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 Web Dev Cody 📚

I got my first DDoS (and what you can do to help prevent it) thumbnail
I got my first DDoS (and what you can do to help prevent it)
Web Dev Cody
How I setup pagination in my Next.js app (with Drizzle ORM) thumbnail
How I setup pagination in my Next.js app (with Drizzle ORM)
Web Dev Cody
How I'm doing authentication on my simple Go app (with Fiber) thumbnail
How I'm doing authentication on my simple Go app (with Fiber)
Web Dev Cody
Live Coding a Shopping Cart using React thumbnail
Live Coding a Shopping Cart using React
Web Dev Cody
How Does the MacBook Air M1 Compare for Coding? thumbnail
How Does the MacBook Air M1 Compare for Coding?
Web Dev Cody

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.