Skip to content

Instantly share code, notes, and snippets.

@totocptbgn
Created November 22, 2020 16:44
Show Gist options
  • Select an option

  • Save totocptbgn/af5a993d578a955f177535bc88b883ad to your computer and use it in GitHub Desktop.

Select an option

Save totocptbgn/af5a993d578a955f177535bc88b883ad to your computer and use it in GitHub Desktop.
Code for a Waiting Screen made for PewDiePie
// PewDiePie Wait Screen Stream
// by Thomas Copt-Bignon (github.com/totocptbgn)
// Nov 2020 - done in Processing (https://processing.org/)
PImage img;
float zoff;
float x;
float phase;
float zoof;
String[] title;
void setup() {
size(1440, 900, P2D);
smooth(8);
background(0);
frameRate(60);
colorMode(HSB);
imageMode(CENTER);
zoff = 0;
x = 0;
phase = 0;
zoof = 0;
img = loadImage("brofist.png"); // Download it here and put it in the same folder : https://u.teknik.io/h05uf.png
textAlign(LEFT);
title = new String[14];
title[0] = "> /usr/bin/waitForPewds";
title[1] = "";
title[2] = "ooooooooo. .o8 o8o o8o";
title[3] = "`888 `Y88. \"888 `\"' `\"\'";
title[4] = " 888 .d88' .ooooo. oooo oooo ooo .oooo888 oooo .ooooo. oo.ooooo. oooo .ooooo.";
title[5] = " 888ooo88P' d88' `88b `88. `88. .8' d88' `888 `888 d88' `88b 888' `88b `888 d88' `88b";
title[6] = " 888 888ooo888 `88..]88..8' 888 888 888 888ooo888 888 888 888 888ooo888";
title[7] = " 888 888 .o `888'`888' 888 888 888 888 .o 888 888 888 888 .o";
title[8] = "o888o `Y8bod8P' `8' `8' `Y8bod88P\" o888o `Y8bod8P' 888bod8P' o888o `Y8bod8P'";
title[9] = " 888";
title[10] = " o888o Coming Back Soon...";
title[11] = ">";
title[12] = ">";
title[13] = ">";
}
void draw () {
background(0);
rectMode(CORNER);
strokeWeight(1);
translate(width, height);
stroke(100, 255, 255);
noFill();
for (int j = 0; j < 3; j++) {
for (int i = 0; i < 5; i++) {
beginShape();
for (float a = PI; a < PI*1.75; a += radians(10)) {
float xoff = map(cos(a + phase), -1, 1, 0, 5);
float yoff = map(sin(a + phase), -1, 1, 0, 5);
float rx = map(noise(xoff + j*1000, yoff + j*1000, zoof), 0, 1, 100 + i*30 + j*500, width + i*30 + j*500);
float ry = map(noise(xoff + j*1000, yoff + j*1000, zoof), 0, 1, 100 + i*30 + j*500, height + i*30 + j*500);
float x = rx * cos(a);
float y = ry * sin(a);
vertex(x, y);
}
endShape();
}
}
phase += 0.0015;
zoof += 0.005;
float [][] arr = new float[36][28];
translate(-width, -height);
noStroke();
tint(0, map(sin((float)frameCount/50), -1, 1, 180, 220), 255);
float xoff = x;
for (int i = 1; i < 36; i++) {
float yoff = 0;
for (int j = 1; j < 28; j++) {
arr[i][j] = noise(xoff, yoff);
image(img, i * (width/36), j * (height/28), map(noise(xoff, yoff), 0.2, 1, 0, 50), map(noise(xoff, yoff), 0.2, 1, 0, 50));
yoff += 0.08;
}
xoff += 0.16;
}
zoff += 0.0005;
x += 0.005;
fill(100, 255, 255);
int r = (int) map(noise(0, 0, zoff*10), 0, 1, 5, 15);
PFont f = createFont("Menlo-Regular", 10, true);
textFont(f);
for (int i = 0; i < r; i++) {
text("Pewds", 20 + i*45, 15);
}
r = (int) map(noise(0, 0, zoff*10), 0, 1, 0, 15);
for (int i = 15; i > r; i--) {
text("Gaming Month", i*85 + 70, height-15);
}
pushMatrix();
translate(width, 0);
rotate(PI/2);
for (int i = 0; i < r; i++) {
text("###", 20 + i*30, 15);
}
translate(0, width);
r = (int) map(noise(0, 0, zoff*10), 0, 1, 0, 10);
for (int i = 10; i > r; i--) {
text("Zero Death", i*70 + 130, -15);
}
popMatrix();
stroke(100, 255, 255, 80);
noFill();
int k = 1;
int l = 1;
for (int i = 1; i < 36; i++) {
for (int j = 1; j < 28; j++) {
if (arr[i][j] > 0.65 || arr[i][j] < 0.20) {
k = i;
l = j;
square(k * (width/36) - 25, l * (height/28) - 25, 25);
text(arr[i][j], k * (width/36) - 25, l * (height/28));
}
}
}
float a = map(noise(0, 0, zoff*10), 0, 1, -50, 50);
float b = map(noise(10000, 0, zoff*10), 0, 1, -50, 50);
fill(0, 200);
stroke(100, 255, 255);
strokeWeight(0.5);
rectMode(CENTER);
rect(width/2 + a, height/2 + b, width/2, height/3);
fill(100, 255, 255);
circle(width/4 + 15 + a, height/3 + 15 + b, 10);
noFill();
stroke(100, 255, 255);
strokeWeight(2);
circle(width/4 + 30 + a, height/3 + 15 + b, 10);
circle(width/4 + 45 + a, height/3 + 15 + b, 10);
strokeWeight(0.5);
line(width/4 + 30 + a, height/3 + 30 + b, width * 0.75 + a - 30, height/3 + 30 + b);
f = createFont("Menlo-Bold", 11, true);
textFont(f);
text("pewds_cmd", width/4 + 325 + a, height/3 + 17.5 + b);
for (int i = 0; i < title.length; i++) {
text(title[i], width/4 + 30 + a, height/4 + 150 + b + 15*i);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment