Save this video — free

CS50 2D - Lecture 4 - Super Mario Bros.

CS50 · 1:38:29 · Watch on YouTube

CS50 2D - Lecture 4 - Super Mario Bros. Watch on YouTube →

Overview

CS50's Lecture 4 explores the creation of a Super Mario Bros.-inspired platformer, introducing concepts like tile maps for level design, 2D animation for characters, and procedural level generation. The lecture covers implementing camera scrolling with `love.graphics.translate`, character movement and animation using sprite sheets, and state machines for entity behavior. It details collision detection using a 'point-to-tile' method for tile maps and AABB for game objects, and demonstrates procedural level generation with varying terrain, chasms, and interactive elements like breakable blocks and gems.

Key takeaways

Chapters

0:00 Introduction to Super Mario Bros. and Virtual Worlds
3:44 Tile Maps for Level Representation
7:11 Implementing Static Tile Rendering (Tile 0)
10:09 Scrolling Levels with `love.graphics.translate` (Tiles 1)
14:54 Introducing a Movable Character Avatar (Character 0)
18:25 Character Movement and Camera Tracking (Character 1 & 2)
21:40 Implementing Character Animation (Character 3)
23:29 Animating Movement and Flipping Sprites
25:11 Implementing Jumping Mechanics (Character 4)
27:15 Introduction to Procedural Level Generation
29:07 Utilizing a Creative Commons Tile Set (Level 0)
31:41 Generating Levels with Pillars (Level 1)
35:28 Creating Chasms via Level Generation (Level 2)
38:26 Collision Detection with Tile Maps (Point-to-Tile)
50:06 Player Collision Logic and States
55:06 Entities and Entity State Machines
1:00:06 Game Objects vs. Entities
1:06:59 Implementing Interactive Game Objects (Gems and Blocks)
1:15:14 Snail AI and State Management
1:20:06 Assignment 4: Level Progression and Power-Ups

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.