Home | Schedule | Course Outline | Examples | Guides | Repository

Examples

Contents


p5.js

Where’s Sausage Dog?

Find a sausage dog amongst a bunch of other animals.

Tile-based world

A basic tile-based world implementation in p5.js.

Online, Source Code


Voices

Example programs using voice synthesis and voice recognition with p5.speech.

Voice output experiments testbed

Sample code for playing around with the possibilities of voice output

Voice input experiments testbed

Sample code for playing around with the possibilities of voice output

Slamina

Guess animal names pronounced backwards! With your voice!

Nonsense generator

Generates sentences of nonsense words out of syllables and speaks them.

Feelings

Talks in a way that makes you uncomfortable about its feelings in relation to the your interaction with the mouse, keyboard, and other things.

Perfect pitch

Sings a song with user-controlled pitch.

Backseat driver

A car that collects stars and is controlled with voice commands.

Re:programming

A program that helps you read affirmations about programming aloud.

Doctor, doctor

Two Eliza chatbots talking to each other forever.

Older Voices (with ResponsiveVoice and annyang!)

Example programs using voice synthesis with ResponsiveVoice and voice recognition with annyang!.

Slamina

Guess animal names pronounced backwards! With your voice!

Nonsense generator

Generates sentences of nonsense words out of syllables and speaks them.

Feelings

Talks in a way that makes you uncomfortable about its feelings in relation to the your interaction with the mouse, keyboard, and other things.

Perfect pitch

Sings a song with user-controlled pitch.

Backseat driver

A car that collects stars and is controlled with voice commands.

Re:programming

A program that helps you read affirmations about programming aloud.

Misheard dating profile

A voice-based dating profile that makes mistakes on purpose.

Doctor, doctor

Two Eliza chatbots talking to each other forever.


Data

Examples that use JSON data and/or the Web Storage API.

Spy Profile Generator

Generates a spy profile and saves it with a password for future access.

Imaginary sports

Generate imaginary sport names courtesy of random selection from JSON data files.

Beat poetry

A poet that reads out its own source code randomly piece by piece.

Weather report

A “personal assistant” that will only tell you the current weather in Montréal using the MetaWeather API.

Bad Tarot forever

A fortune teller that always has bad news thanks to JSON data about tarot cards.

Click attack

A simplistic clicking “game” that tracks your high score between sessions using the Web Storage API.


AI

Object Detector Framework

Basic framework code for using the Object Detector feature of ml5.js.

Handpose Framework

Basic framework code for using the Handpose feature of ml5.js.

Bubble Popper

Pop a bubble with your index finger via the webcam!

Hand Dog Gun

Shoot small dogs out of your fingertip via the webcam!

Fly Eater

Eat virtual flies via the webcam!

Feed Me(dia)

Show the webcam a requested object to win!


The Webpage

Build Your Own Webpage

Literally type HTML into a text input and add it to the webpage. The ultimate in DIY.

Haiku Generator

Generate beautiful haiku.

Nonsensifier

Gradually corrupts the text on the webpage until it’s all just illegible symbols.

Spy Profile Generator

Generates a spy profile for the user based on the name they enter, then allows them too view it by entering the password later on. Demonstrates loading multiple JSON files in plain JavaScript with Promises.

Transform Poem

A poem with very moving words. Ha ha ha.

Two Way Scrolling

Two columns, opposite scrolling directions.

Word Painter

Words change color on mouse over and leave a lovely trail that catches up with the mouse over time.

Wordplay

Words go flying across the page on mouseover.

Happy Offline

A webpage that is happy when you’re offline and sad when you’re not!


jQuery

DIY Homepage

An ugly homepage that the user can edit in place and save so that it persists between sessions.

Haiku Generator

Generates a random haiku and allows the user to swap the lines for other lines with a fading transition.

Random Stressor

Takes a user’s input text and adds emphasis to a single word.

Raving Redactionist

Simulates a desperate struggle to keep a secret document secret as its secrets reveal itself over time and the user must continuallly redact them.

Secret Mouse Message

Reveals a secret message to the user based on their mouse position on the webpage.

Spy Profile Generator

Generates profiles for multiple spies, and lets them login later on with a username and password to view their saved profile. Demonstrates loading multiple JSON files with jQuery.

Transform Poem

A recreation of the earlier transform poem using CSS animations instead of JavaScript-based animation.


jQuery UI

jQuery with p5.js

A fairly simple example of using jQuery and p5.js at the same time, including using HTML input elements to control things in the p5.js canvas.

Beach Party

A beach party of animated GIFs on a YouTube background!

Code Taker

Crack the code by mousing over hidden letters and then dragging them to the answer area to reveal the stunning truth!

Endless Dialogs

A Sisyphean struggle against the perpetual popping up of existentialist dialogs.

Fridge Poetry

The fridge poetry experiences on a webpage that remembers your arrangements using localStorage.

Hacking

A deadly serious simulation of what it is like to HACK INTO THE MAINFRAME, complete with a drum loop courtesy of Gibber.

Six Shooter

A textual representation of a gun that fires textual representations of bullets.

The Great Escape

Help “The Prisoner” escape from their “Prison” using an “Escape Tunnel” or the powers of your imagination.


Game Engine

Buried Alive

A game where you’re trying to go up against falling debris (or whatever it is), trying to evoke the sense of fighting against the current/wind/something.

Dead Zone

A game where you’re trying to escape the view of the game camera (which I guess is a bit like CCTV surveillance) so that you can graffiti the world with your message.

Desperately Seeking Sadness

The activity game in which you fly a neutral face emoji around a sea of thumbs ups seeking out the solitary thumbs down so you can collect it and feel bad about yourself. Over and over again!

Combat at the Movies

Pippin’s game adapting different classic movies into the videogame “language” of Combat for the Atari 2600.

Very poor commenting.

Let’s Play: Ancient Greek Punishment: Competition Edition

Pippin’s game adapting his own game Let’s Play: Ancient Greek Punishment into a competitive experience.

Very poor commenting.

Let’s Play: Ancient Greek Punishment: Five-in-One

Pippin’s game adapting his own game Let’s Play: Ancient Greek Punishment into a version where you play five minigames at the same time. Includes displaying multiple scenes simultaneously in Phaser 3.

Very poor commenting.

Let’s Play: Ancient Greek Punishment: Inversion Edition

Pippin’s game adapting his own game Let’s Play: Ancient Greek Punishment into a version where you play the antagonist instead of the protagonist. Be the boulder instead of Sisyphus.

Very poor commenting.

Let’s Play: Ancient Greek Punishment: Teaches Typing

Pippin’s game adapting his own game Let’s Play: Ancient Greek Punishment into a typing tutor.

Very poor commenting.

The Artist Is Present 2

Pippin’s game recreating Marina Abramovic’s classic performance The Artist Is Present. The player gets to play as Marina Abramovic herself, starting off in her apartment and making her way to the MoMA to start the performance. Lots of animation, scene switching, and more.

Very poor commenting.