I need help with frame rate. Pease save me.

Hello, I am trying to code an experimental art installation for my degree show piece, and I have hit a wall!!

I want each of my 6x6 squares to have all different frame rates or randomise frame rates, but no idea how do to this!! PLEASE HELP THIS ASPIRING ARTIST!!!!

I need the internet to help me deal with my traumatic university life and find a way for this dream of mine to become a reality!!

Thank you very much lovely people of the internet!

Here is my code for the piece so far!!!

void setup() { background(360, 360, 360); size(600, 600); noStroke(); frameRate(25); }

void draw() { line(0, 0, width, height); println(frameRate);

fill(random(360), random(360), random(360)); rect(0, 0, 100, 100); fill(random(360), random(360), random(360)); rect(100, 0, 100, 100); fill(random(360), random(360), random(360)); rect(200, 0, 100, 100); fill(random(360), random(360), random(360)); rect(300, 0, 100, 100); fill(random(360), random(360), random(360)); rect(400, 0, 100, 100); fill(random(360), random(360), random(360)); rect(500, 0, 100, 100);

fill(random(360), random(360), random(360)); rect(0, 100, 100, 100); fill(random(360), random(360), random(360)); rect(100, 100, 100, 100); fill(random(360), random(360), random(360)); rect(200, 100, 100, 100); fill(random(360), random(360), random(360)); rect(300, 100, 100, 100); fill(random(360), random(360), random(360)); rect(400, 100, 100, 100); fill(random(360), random(360), random(360)); rect(500, 100, 100, 100);

fill(random(360), random(360), random(360)); rect(0, 200, 100, 100); fill(random(360), random(360), random(360)); rect(100, 200, 100, 100); fill(random(360), random(360), random(360)); rect(200, 200, 100, 100); fill(random(360), random(360), random(360)); rect(300, 200, 100, 100); fill(random(360), random(360), random(360)); rect(400, 200, 100, 100); fill(random(360), random(360), random(360)); rect(500, 200, 100, 100);

fill(random(360), random(360), random(360)); rect(0, 300, 100, 100); fill(random(360), random(360), random(360)); rect(100, 300, 100, 100); fill(random(360), random(360), random(360)); rect(200, 300, 100, 100); fill(random(360), random(360), random(360)); rect(300, 300, 100, 100); fill(random(360), random(360), random(360)); rect(400, 300, 100, 100); fill(random(360), random(360), random(360)); rect(500, 300, 100, 100);

fill(random(360), random(360), random(360)); rect(0, 400, 100, 100); fill(random(360), random(360), random(360)); rect(100, 400, 100, 100); fill(random(360), random(360), random(360)); rect(200, 400, 100, 100); fill(random(360), random(360), random(360)); rect(300, 400, 100, 100); fill(random(360), random(360), random(360)); rect(400, 400, 100, 100); fill(random(360), random(360), random(360)); rect(500, 400, 100, 100);

fill(random(360), random(360), random(360));

rect(0, 500, 100, 100); fill(random(360), random(360), random(360)); rect(100, 500, 100, 100); fill(random(360), random(360), random(360)); rect(200, 500, 100, 100); fill(random(360), random(360), random(360)); rect(300, 500, 100, 100); fill(random(360), random(360), random(360)); rect(400, 500, 100, 100); fill(random(360), random(360), random(360)); rect(500, 500, 100, 100); }

Answers

  • Edit your post. Select the code. Hit Ctrl+o.

    You probably do not want to mes with the framerate at all. Instead, you should look into using millis() as a timer to determine when sections of your sketch should be redrawn.

  • And how do I code this into my original code?

  • I have no idea because your code is not formatted properly and looking at it hurts my eyes and soul.

    Edit your post. Select the code. Hit Ctrl+o.

This discussion has been closed.