Notes

GAME ON 2010

Control Inputs & Canvas Outputs

Paul Truong - Creative Technologist, Google ~ Dec 2010

PROCESSING.JS

Visual Programming Language



//game setup - runs once
void setup() {
	
	//easy setup
	size(windowWidth, windowHeight);
	frameRate(40);
	
	//easy load of images
	PImage hero;
	hero = loadImage("gmail.png");
	
}

//running of game - automatic
void draw() {

	//easy display of images
	image(hero, heroX, heroY);

}

//inputs - easy detection
void keyPressed() {

	//detection of key presses
	if (key == 32) {
		laser();
	}

}

				

GALACTIC INBOX

Old school keyboard controls

PLAY GAME

ORIENTATION

Browser & device



//listen for orientation events
window.addEventListener("deviceorientation", captureOrientation, false);	

//do something with the alpha, beta and gamma properties of the event
function captureOrientation(e) {

	//properties of the event
	alpha = e.alpha;
	beta = e.beta;
	gamma = e.gamma;

}

				

FIGHT OR FLIGHT?

Mouse and orientation controls

PLAY GAME

VOICE?

Just needs a little creativity!



<!-- speech input -->
<input type="text" speech="true" />

				

GAME OVER

URL: monocubed.com

Twitter: @monocubed