Pacman Demo
This was an attempt at creating a pacman-inspired interaction in Processing. My code is as follows: float x,y,s; int wokkaPos,wokkaSpeed,wokkaDir; int flipMe1,flipMe2; void setup(){ size(500,500); background(0); x = width/2; y = height/2; s = 100; wokkaSpeed = 5; wokkaDir = 1; } void draw(){ wokkaPos += wokkaSpeed * wokkaDir; if(wokkaPos > 45){ wokkaDir = -1; } if(wokkaPos