basic player code
void setup(){
size(740, 460);
noStroke();
frameRate(70);
}
char north = 'w';
char east = 'd';
char south = 's';
char west = 'a';
int px = 10;
int py = 15;
void draw(){
background(245,245,245);
fill(237, 113, 104);
rect(px,py,20,25);
if (keyPressed == true && key == north){
py = py - 2;
}
if (keyPressed == true && key == south){
py = py + 2;
}
if (keyPressed == true && key == east){
px = px + 2;
}
if (keyPressed == true && key == west){
px = px - 2;
}
}