Kovalchuk
var bg, song;
function preload() {
song = loadSound('dune.mp3');
bg = loadImage('background.jpg');
}
var x, y, speed;
function setup() {
createCanvas(800, 600);
song.loop();
x = 0;
y = 500;
speed = 3;
}
function draw() {
background(bg);
textSize(50);
text("🐛", x, y);
x += speed;
if (frameCount % 90 < 15){
text("🧍♂️", 150, 150);
}
if (x > width) {
speed = -speed;
}
if (x < 0) {
speed = -speed;
}
}