Random Dot Game
Random Dot Game
Continuing with p5.js.
We'll reuse concepts from yesterday
and last week to create another mini-game.
Completed
Basics of HTML & CSS
Block-based Programming
Code Comments
Basics of Animation
Today
More P5.js
Creating a dot clicking game
Upcoming
More P5.js
More JavaScript
No typing today.
First, let's discuss how to use the distance function.
This function will be a key component to the little game we'll create today.
We'll stat by making a base that we can build off of.
Games typically have lose conditions, let's add in a lose condition.
Let's add in some game over text and keep track of their score.
What else could you add to this?
How could we make it harder or more interesting?
Maybe the game starts adding in random dots to distract them? Maybe the dot moves?
Feel free to come up with ideas on your own as well.
Use the rest of class to turn this concept into some sort of interactive game or activity.