p5play is a JavaScript game engine that uses p5.js for graphics and Box2D for physics.

Looking to turn your ideas into online games or interactive art? Check out p5play! It was designed by Computer Science teachers to be intuitive for beginners, making it popular at schools and universities around the world. But, p5play v3 isn't just for classroom use. It's a powerful tool built on planck.js, a port of Box2D - the same physics simulator used by industry leaders in beloved games like Tiny Wings and Angry Birds.

Get started by reading the "Learn" reference pages!

Join the community 👾

Ask questions and meet other people making interactive art and games with p5play on our community Discord server.

Discord brand

Support this project 🤝

p5play is open source licensed under the GPL: it's free!

But if you use p5play professionally, please support the project on Patreon!

patreon brand

No installation required! 🤩

You can use any of these online code editor templates. However, I suggest avoiding the p5.js web editor, it has a lot of problems. I recommend using OpenProcessing.

Local Development 🔨

Use p5play on your own website by adding these links to your HTML file. School firewall blocking p5play.org? See the FAQs

p5play is also available on npm: npm i p5play

Want to use p5play offline?

“I have found the p5play library to be an invaluable resource for introducing students to game design and development. Our team chose to use this library for our Game Design Summer Program due to its many customizable features, well documented resources, and easy-to-use API which make it accessible for students of all ages and skill levels.

Due to the many methods and properties included in this library, students are able to quickly bring their game visions to life with code. These games range from basic catcher games to games with multiple levels and challenging features.

In addition to the library's well-documented resources, p5play offers a wealth of support and inspiration for the students and teachers in their community. This includes their interactive learn pages that allow students to tinker with different properties and methods in the library, their tri-annual Game Jam event, and their Discord channel filled with many great resources and opportunities to find support.

Our Girls Who Code team highly recommends this library to anyone interested in game development. We can't wait to see all of the games our students create this summer with this incredible library!”

Ashley Goetz
Curriculum Developer at

“I absolutely love what you've done with the Learn pages, what a cool reference for important sprite properties, looking forward to seeing more of that. Digging through the source a bit I'd say [p5play v3] retains a ton of the appeal of earlier versions and I was able to orient pretty quick.”

Bradley C Buchanan
Software Manager at Discord
Former Software Manager at Google
Former Software Manager at Code.org

“Thank you so much for all the work Quinton. With this proper physics integration, I may start using p5play again in my classes!”

Paolo Pedercini
Creator of p5.play v1
Professor at Carnegie Mellon

“I added a unit centered on p5play to my Artistic Coding and Game Design curriculum as a way to tease object oriented programming. Students quickly adapted to sprites and groups and were beyond excited about all the interactivity built into p5play. Through games, students were able to solidify their understanding of properties and methods without even realizing they were learning some of the core concepts of object oriented programming.

My students spent time making games using the p5play library and were immensely proud of their accomplishments. Since we have used p5play, my students are now better able to understand classes and have even written some of their own!”

Marisa Shuman
Computer Science Teacher at

“p5play has been a great addition to our curriculum. It has allowed us to explore a more creative outlet for learning object orientated programming and has been invaluable in their students projects for their exams.

Since introducing p5 and p5play we have seen an uptake of over 100% for students and are now seeing huge benefits to students learning. I would highly recommend introducing p5 & p5play into your curriculum. We have now developed a bespoke series of video tutorials to allow more schools and colleges in the UK to introduce p5play to their curriculum.”

Rhys Drury
Head of Computing at

“Compared to [Pearson Edxcel] GCSE, what we have learned here has been far more beneficial. With GCSE, we used Tkinter in Python which was useful to make basic applications. However, now using p5play we can make far more advanced games that are interesting and practical.” - Student at Wyke

“Learning p5play has really helped me get more interested in coding, as it makes creating games very easy. It makes the process less time consuming and more fun!” - Student at Wyke

“Using the library p5play in JavaScript in order to make graphical programs is a lot better then learning Python, because you get to see your program code influence something on screen.” - Student at Wyke

Creator of p5play : Quinton Ashley | @quinton-ashley | info@p5play.org
Creator of p5.play v1 : Paolo Pedercini | molleindustria.org | info@molleindustria.it
Current Contributors: Oliver Zell, Caleb Foss, and Bobby S.
Huge thanks to my student testers: Chayarat Wangweera, Zhiyuan Guo, Aarnav Gupta, and Carter Noa!