0% found this document useful (0 votes)
119 views42 pages

Lecture1 by Mit cs50

This document summarizes a lecture on Flappy Bird. It introduces topics like sprites, infinite scrolling, procedural generation, state machines, and mouse input. It then demonstrates updates to a Flappy Bird clone over 12 iterations, covering additions like parallax scrolling, gravity, anti-gravity, infinite randomly-generated pipes, collisions, state machines, scoring, countdown, audio, and mouse control. It outlines future updates and assigns randomizing pipe gaps and intervals as well as implementing medals and pausing.

Uploaded by

Aayan Pratim Deb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
119 views42 pages

Lecture1 by Mit cs50

This document summarizes a lecture on Flappy Bird. It introduces topics like sprites, infinite scrolling, procedural generation, state machines, and mouse input. It then demonstrates updates to a Flappy Bird clone over 12 iterations, covering additions like parallax scrolling, gravity, anti-gravity, infinite randomly-generated pipes, collisions, state machines, scoring, countdown, audio, and mouse control. It outlines future updates and assigns randomizing pipe gaps and intervals as well as implementing medals and pausing.

Uploaded by

Aayan Pratim Deb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

GD50

Lecture 1: Flappy Bird


Colton Ogden
[email protected]

David J. Malan
[email protected]
Slides

https://cs50.github.io/games/lectures
Topics

● Images (Sprites)
● Infinite Scrolling
● “Games Are Illusions”
● Procedural Generation
● State Machines
● Mouse Input
Downloading demo code

https://github.com/games50/fifty-bird
Optional Reading, ftw
● How to Make an RPG, by Dan Schuller
○ https://howtomakeanrpg.com/

● Game Programming Patterns, by Robert Nystrom


○ http://gameprogrammingpatterns.com/
Our Goal
bird0
“The Day-0 Update”
bird0: New Functions

● love.graphics.newImage(path)
○ Loads an image from a graphics file (JPEG, PNG, GIF, etc.), storing it in an object we can draw
to the screen.
Demo time!
bird1
“The Parallax Update”
Demo time!
Games Are Illusions

Shesez (Boundary Break)


https://www.youtube.com/channel/UCHTnEwQKNwm49CQeCVZogMw
https://www.youtu.be/HUgE9L7V4oY
bird2
“The Bird Update”
Demo time!
bird3
“The Gravity Update”
Demo time!
bird4
“The Anti-Gravity Update”
http://game.engineering.nyu.edu/projects/exploring-game-space/
Demo time!
bird5
“The Infinite Pipe Update”
Demo time!
bird6
“The PipePair Update”
Dead Zone Spawn Zone
Demo time!
bird7
“The Collision Update”
Demo time!
bird8
“The State Machine Update”
Flappy Bird State Machine

TitleScreenState CountdownState PlayState

ScoreState
Demo time!
bird9
“The Score Update”
Demo time!
bird10
“The Countdown Update”
Demo time!
bird11
“The Audio Update”
Demo time!
bird12
“The Mouse Update”
bird12: New Functions

● love.mousepressed(x, y, button)

-Callback fired by LÖVE2D every time a mouse button is pressed; also gives
us the (X, Y) of where the mouse cursor was at the time of the button press.
Demo time!
Next Time...

● Sprite Sheets
● Procedural Layouts
● Levels
● Player Health
● Particle Systems
● Fancier Collision Detection
● Persistent Save Data
Assignment 1

● Make pipe gaps slightly random.


● Make pipe intervals slightly random.
● Award players a “medal” based on their score, using
images.
● Implement a pause feature.
See you next time!

You might also like