Save this video — free

CS50 2D - Lecture 0 - Pong

CS50 · 2:33:37 · Watch on YouTube

CS50 2D - Lecture 0 - Pong Watch on YouTube →

Overview

CS50's Colton Ogden introduces 2D game development using Lua and the LÖVE framework, starting with a Pong implementation. The lecture covers core game development concepts like the game loop, coordinate systems, drawing shapes, handling input, collision detection, and state management, culminating in a functional Pong game with scoring and basic AI.

Key takeaways

Chapters

0:00 Introduction to CS50 2D and Colton Ogden's Background
0:26 Course Overview: From Pong to Modern Classics
5:21 Setting Up the Development Environment: LÖVE and Lua
8:04 Pong Fundamentals: Shapes, Collision, and States
9:53 Implementing the 'Day Zero Update': A Basic Window
15:06 Core Game Loop: Input, Update, and Render
20:06 2D Coordinate Systems and Basic LÖVE Functions
21:51 Creating the Initial Window and 'Hello Pong' Text
28:29 Understanding Lua's `end` vs. Parentheses for Function Calls
28:53 Implementing Retro Aesthetics: Low Resolution and Pixel Filtering
35:03 Handling Keyboard Input: Quitting with Escape
38:20 Applying Pixel Filtering and String Concatenation
44:14 Drawing Rectangles and Setting Colors
50:00 Implementing Paddles and Ball with Rectangles
54:26 Introducing Delta Time and the `love.update` Function
1:03:55 Moving Paddles with Keyboard Input
1:08:33 Clamping Paddle Movement within Screen Bounds
1:19:43 Ball Movement and Random Velocity Initialization
1:25:13 Implementing Game States: Start, Serve, Play
1:30:43 Object-Oriented Programming: Classes for Paddle and Ball
1:35:49 Class Structure: Init, Update, Render Methods
1:42:34 Adding FPS Counter and Setting Window Title
1:47:03 Collision Detection: Axis-Aligned Bounding Boxes (AABB)
1:51:57 Implementing Ball-Paddle and Ball-Wall Collisions
1:56:49 Scoring and Game States: Serve, Play, Done
2:01:51 Implementing the Serve State and Resetting Ball
2:05:54 Victory Condition and Game Reset Logic
2:09:10 Adding Sound Effects with LÖVE Audio
2:12:33 Generating and Integrating Sound Effects
2:15:13 Handling Window Resizing with `love.resize` and Push
2:21:59 Assignment 1: Implementing Basic AI for Player 2
2:23:25 Next Lecture Preview: Flappy Bird and Images

Keep these chapters and the full searchable transcript in your own library.

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, CS50.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.