r/p5js • u/AbjectAd753 • Aug 30 '25
If you ever feel useless, consider this exists on js:
String.prototype.toString()
r/p5js • u/AbjectAd753 • Aug 30 '25
String.prototype.toString()
r/p5js • u/suitonaman • Oct 26 '22
r/p5js • u/FreenBurgler • Aug 01 '20
just about everything works well enough, i just need to figure out how to add all the previous steps. if the code is too messy i can make a separate sketch with the specific piece that i need help with, i figured it would be a bit easier seeing it put together in case there was something i messed up that i misssed.
r/p5js • u/edswf1 • Oct 03 '18
I‘m pretty sure you are aware of this guy on youtube. if not you should check his videos, he‘s using p5.js for his 10-minut coding challenges and other stuff.
you can see some of his videos in my subreddit r/ProgrammingVids
If you know other videos like these please post them to the sub.
thanks!
r/p5js • u/SCORCHYtorch • Jun 18 '24
hi, this may sound like a hassle but is anyone willing to help with my final p5.js project I started real late so my knowledge on most parameters are somewhat fair ig?
I'm thinking of making a game, a platforming one to be specific.
something which has requirements like these - https://editor.p5js.org/DLC_Computer_Science/sketches/p0aBZSOv1
any help is required and im willling to pay.
r/p5js • u/xrispy7 • Jun 22 '20
r/p5js • u/Eilchapo • Jan 05 '26
Looking for help with a small p5.js game project. Scope: simple platformer, shapes only, movement, jump, collectables, canyon logic. Time estimate: 4–6 hours. Paid. Short time.
r/p5js • u/No-Technology-5477 • Jul 24 '26
r/p5js • u/SuccessIll3943 • Jan 04 '26
Hi guys,
I'm working on this ide http://p5js.ai would love any feedback or if anyone is looking to work on it also.
r/p5js • u/ringletsflowers • Jun 29 '22
Hello everyone! I really need some help.
I have to create a button on p5.js that, once clicked, shows me the image I uploaded with "function preload". Is there someone that could help me?
I'm really desperate I have an exam! Please and thank you to everyone!
r/p5js • u/cute_dear_gost • Jun 22 '22
Hi I'm a student how learning how to do code in p5js for one of my classes but i can't seen to understand how to do much of it and my group isn't much help. My final project it's inspired by this site: https://mondrianandme.com/ but with a couple of forms, but I can't seen to separate the forms can anyone help me?
The code :
let Cores = ['#303538','#E4B160', '#E0E0D6'];
function setup() {
createCanvas(windowWidth, windowHeight);
background('#EC6562')
}
function draw() {
}
function drawLines() {
strokeWeight(2.3)
stroke(random(Cores))
line(00,0,200,00)
line(0,10,200,10)
line(0,20,200,20)
line(0,30,200,30)
}
function drawCircleLines() {
noStroke()
fill(random(Cores))
circle(0,0,10)
circle(15,0,10)
circle(30,0,10)
circle(45,0,10)
}
function drawCircle() {
noStroke()
fill(random(Cores))
circle(0,0,random(20,150))
}
function drawSquare() {
noStroke()
fill(random(Cores))
square(0,0,random(50,300))
}
function drawTriagle() {
noStroke()
fill(random(Cores))
triangle(10, 20, 86, 20, 86, 75);
}
function mouseClicked() {
translate(mouseX, mouseY)
drawLines(),
drawCircleLines()
drawCircle(),
drawSquare(),
drawTriagle();
}
function doubleClicked(){
clearScreen()
}
function clearScreen(){
background ('#EC6562')
}
r/p5js • u/CodingKarl • Nov 28 '19
What my friend below was asking was a small character on a 800 by 600 canvas for example a Mini Person, a car, a mask or anything creative about the size of 50,50 if that helps. It could be bigger though, just not something that takes up too much of the screen.
r/p5js • u/oghatchild • Mar 13 '25
r/p5js • u/butchcomposer • Jun 13 '24
Hello all!
I need assistance with completing some assignments for a computer science class I'm in. I've tried researching and doing it myself first (which I can kind of do?) but time is of the essence as today is the last day I have to submit late assignments. Please DM me for further details (I know this sounds sketchy but I'm desperate at this point)
The labs deal with stuff like for loops and basic concepts (I'm a music major so I don't get it at all lol)
TIA
r/p5js • u/activematrix99 • Sep 02 '22
My friend is primarily a digital pen and ink artist (2d) who just started in P5. He doesn't generally like code, but I think he could learn to do some cool stuff. He usually works in Illustrator. Any sketch ideas I could send his way that might spark some interest?
r/p5js • u/ExpensiveShopping735 • Dec 11 '23
let playerX = 200; let playerY = 425; let playerSpeed = 5; let isJumping = false; let jumpStrength = 10; let gravity = 0.6; let verticalSpeed = 0;
function setup() { createCanvas(480, 650); }
function draw() { background(220);
// draw enemyOne fill(255, 0, 0); ellipse(50, 50, 25, 25);
// draw enemyTwo fill(0, 204, 0); triangle(30, 50, 38, 20, 11, 30);
// draw platform fill(0, 0, 0); rect(0, 450, 650, 25); // ground rect(300, 350, 55, 15); rect(100, 250, 55, 15); rect(250, 150, 55, 15);
// draw player fill(255, 128, 0); square(playerX, playerY, 25); // Move player with 'A' and 'D' keys if (keyIsDown(65)) { // 'A' key playerX -= playerSpeed; } if (keyIsDown(68)) { // 'D' key playerX += playerSpeed; }
// Apply gravity if (!isJumping) { playerY += verticalSpeed; verticalSpeed += gravity;
// If the player reaches the ground, reset vertical speed
if (playerY >= 425) {
playerY = 425;
verticalSpeed = 0;
}} }
function keyPressed() { if (key === ' ' && !isJumping) { // Space key isJumping = true; verticalSpeed = -jumpStrength; } }
function keyReleased() { if (key === ' ') { // Space key isJumping = false; } }
r/p5js • u/Still-Opening-2792 • Nov 07 '22
https://editor.p5js.org/jast6661/sketches/KvEfn7DX9
Here's my code, I want to make it so that when one of the rectangles hits the circle the game like pauses, like a game over kind of thing, need this ASAP!!!
r/p5js • u/byemiek1 • Dec 17 '22
fill(random(255), random(255), random(255), (120))
fill(random(255), random(255), 0, (120))
fill(random(255), 0, random(255), (120))
fill(0, random(255), random(255), (120))
fill(random(255)/2, random(255/2), random(255), (120))
fill(random(255)/3, random(255)/3, random(255)/3, (120))
fill(0,0,0, 30);
r/p5js • u/sirjuneru • Aug 04 '23
Hi! I've completed my first game with p5.js/HTML canvas, and now I wanna port it onto Android/iOS stores as a simple free game with ads, but I'm not sure how to go about it.
I know there's ways to just port the HTML site onto mobile, but I don't know if that method can incorporate mobile banner/pop-up ads or storing player data. Should I even stick with p5js or move on to something else for this?
I'm new to web/app dev and JS in general, so if there's any frameworks/open-source libraries I should know of for this, that would be really helpful.
r/p5js • u/Responsible_Pack7185 • Aug 26 '22
What's the point of learning p5.js? Can it do more than Javascript? Or is the appeal the interface? I'm not trying to be a dick I generally want to be sold on it, I'm into processing. But if I'm going to learn a new language shouldn't I just go with js? Do most people on here already know js? What am I missing?
r/p5js • u/[deleted] • Aug 31 '22
r/p5js • u/thebestmodesty • Jan 27 '23
r/p5js • u/TopMulberry6254 • Apr 18 '25
Hello p5.js family!
I'm a student currently working on creating a memory game using p5.js. I have to be honest - I am no coder. I'm still trying to learn, so I've been using a lot of help from AI. However, I'm still encountering many bumps along the way.
The game concept: The user is shown a shape or image where certain parts are highlighted in a different color. This shape is displayed for 10 seconds before disappearing. Then, the user needs to draw the missing parts from memory.
My current approach: I uploaded a PNG with areas marked in a specific color that will disappear, and another PNG without those colored areas. I implemented pixel scanning to check if the user's drawing matches, but it's turning out to be super specific and harsh in the grading.
I'm wondering if anyone can suggest a better approach to code this memory game? Any advice on how to make the drawing recognition more forgiving or alternative methods to implement this concept would be greatly appreciated!
Thanks in advance!