Take a look at Pippin’s Collections on p5’s editor website. There are numerous short examples of code in categories like Generative Art, Interactions, and more that might help you get somewhere interesting!
A terrifying traffic game in which you drive your pretty little cyan car around the dangerous non-streets of a black night and try not to collide with the flaming wrecks of others.
Control your car with the arrow keys. UP = accelerate. LEFT and RIGHT = turn.
Keep moving to increase your score, stop and it will decrease. Try to set a high score I guess?
Run the program | Source Code | Download Source |
An example of representing your program’s states using Object-Oriented Programming with inheritance and polymorphism. Reworks an earlier example of a simulation with a title, simulation, and ending. Probably the ideal way to represent your states.
Running program / Source Code / Download
An example of using setTimeout()
in the context of a class definition specifically. Sadly, it doesn’t “just work” the way you would expect because when setTimeout()
calls a function it changes the meaning of this
in that function. This example shows how to avoid this with the bind()
method.
Running program / Source Code / Download
An example of combining images with JavaScript Objects. Two objects represented as different clown face images. The user controls one with the keyboard and the other one chases the user.
Running program / Source Code / Download
An example of combining images with Object-Oriented Programming. Two objects represented as different clown face images. The user controls one with the keyboard and the other one chases the user.
Running program / Source Code / Download
An example of combining images with Object-Oriented Programming and inheritance. Two objects represented as different clown face images. The user controls one with the keyboard and the other one chases the user.
Running program / Source Code / Download
A class that mimics a typewriter for displaying a specified text. With a simple example script showing a basic usage. Could be more complicated, but just tries to show the basic idea.
Running program / Source Code / Download
A small example of requiring the user to using typing in a specific word as a form of input. It lets the user type characters and displays them, and compares their typed input to a magic word that solves the incredibly smart riddle.
Running program / Source Code / Download
Here are example final projects from the 2019 edition of CART253 for you to look at and be inspired by!
Here are example midterm projects from the 2020 edition of CART253 for you to look at and be inspired by!
Here are example final projects from the 2020 edition of CART253 for you to look at and be inspired by!