CS50 2D - Lecture 0 - Pong

CS50 (Harvard University)
CS50 (Harvard University)Apr 21, 2026

Why It Matters

Understanding Pong’s core systems equips aspiring developers with transferable skills for building diverse 2D games, accelerating entry into the game‑development industry.

Key Takeaways

  • Pong illustrates core 2D game mechanics for beginners
  • Course uses Lua and LÖVE framework for rapid prototyping
  • Collision detection, state management, and sound are built into Pong
  • VS Code extension streamlines running LÖVE projects with single keystroke
  • Mastering Pong prepares students for more complex games like Breakout

Summary

The opening lecture of CS50 2D uses the classic game Pong to introduce students to 2D game development, emphasizing the Lua language and the LÖVE (Love2D) framework as the primary tools. Colton Ogden explains how the course will recreate iconic titles, starting with Pong’s simple yet comprehensive set of mechanics. Key concepts covered include drawing shapes, handling delta‑time and velocity, managing game states, applying object‑oriented patterns, detecting 2D collisions, and integrating sound effects. These fundamentals are demonstrated through a live demo of a fully functional Pong clone, showing paddle movement, serve logic, scoring, and victory conditions. The codebase revolves around a single main.lua file, mirroring traditional entry points in other languages. Ogden highlights the convenience of a VS Code extension that lets developers run LÖVE projects with a single keystroke, streamlining the development workflow for beginners. By mastering Pong’s architecture, students acquire a reusable foundation for more sophisticated projects such as Breakout, Flappy Bird, and even modern indie titles, illustrating how a minimal engine can scale to professional‑grade games.

Original Description

This is CS50 2D’s very first lecture on Pong — learn 2D game development fundamentals using Lua and Love2D, covering game loops, input, collision, OOP, states, and sound integration.
To take the course for a certificate, register at cs50.edx.org/2d.
***
This is CS50, Harvard University's introduction to the intellectual enterprises of computer science and the art of programming.
***
HOW TO SUBSCRIBE
HOW TO TAKE CS50
Harvard Extension School: https://cs50.harvard.edu/extension
Harvard Summer School: https://cs50.harvard.edu/summer
HOW TO JOIN CS50 COMMUNITIES
HOW TO FOLLOW DAVID J. MALAN
***
CS50 SHOP
***
LICENSE
CC BY-NC-SA 4.0
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License
David J. Malan
malan@harvard.edu

Comments

Want to join the conversation?

Loading comments...