code-for-a-living March 23, 2021

Level Up: creative coding with p5.js – part 2

In this session, we will turn our static drawings into animations!

In this session, we will turn our static drawings into animations! We will animate the positions of shapes using the draw() function by incrementing and decrementing values over time.

Together, we will work on the Bouncing Balls project on the Codecademy platform. Using p5.js animation techniques, arrays and for-loops, we will create an animation of circles bouncing around the canvas. We will also look at how to randomize the position, speed, size, and color of each bouncing ball using arrays.

Here are some Stack Overflow questions related to the work we did in today’s session:

Conditional statement not activated for bouncing ball in p5.js

P5 – bouncing ball from left to right and back

Using the random() function in p5.js

If you enjoyed this lesson, you can catch up on the rest of the series on YouTube. If you’d like to watch a session live, follow the Codecademy YouTube channel.

Every Tuesday from now until April 27th, we’ll be streaming a new session at 4PM EST. You can set a reminder for the stream for March 23rd here.

Finally, if you want even more Creative Coding with p5.js content, you can sign up for the interactive course this series was based on here. This course was developed by Jiwon and has many more quizzes, projects, and helpful articles that we can’t fit into our streams!

Tags: , , , , ,
Podcast logo The Stack Overflow Podcast is a weekly conversation about working in software development, learning to code, and the art and culture of computer programming.

Related

Level up: SwiftUI quiz
code-for-a-living August 14, 2021

Level Up: Build a Quiz App with SwiftUI – Part 1

SwiftUI is Apple’s newest framework for building iOS applications.  It uses the best features of the Swift language to enable writing performative, declarative code.  If you’ve ever wanted to build your own iOS applications, now is an excellent time to get started. The Codecademy Live: Build a Quiz App with SwiftUI series will be hosted…
code-for-a-living September 18, 2021

Level Up: Introduction to TypeScript

In this one-off Level Up session, we’re exploring TypeScript, a popular programming language used for web development. Josh Goldberg, a Staff Frontend Developer at Codecademy, walks us through the basics of TypeScript. We discuss its relationship to JavaScript, how TypeScript is used in real production environments (like Codecademy itself!), how to get involved in the…
Level up: SwiftUI quiz
code-for-a-living September 4, 2021

Level Up: Build a Quiz App with SwiftUI – Part 4

In the fourth and final lesson of the series, we’ll learn how to use SwiftUI navigation to present different views to the user. We’ll build a welcome screen with instructions for the user as well as a final screen with their results to the quiz. A user will also have the option to re-take the…
code-for-a-living July 3, 2021

Level Up: Linear Regression in Python – Part 7

In the seventh lesson of the series we’ll discuss some methods for comparing linear regression models. In the process, we’ll learn about the problem of overfitting and investigate some of the pros and cons of various evaluation methods (such as R-squared, adjusted R-squared, log likelihood, AIC, and BIC). We’ll also continue to practice our Python…