Skip to content

Instantly share code, notes, and snippets.

@bshyong
Created January 30, 2011 22:11
Show Gist options
  • Save bshyong/803317 to your computer and use it in GitHub Desktop.
Save bshyong/803317 to your computer and use it in GitHub Desktop.
var x = 0;
var y = 0;
var xDirection = 1;
var yDirection = 1;
var canvas = null;
var context2D = null;
var background = new Image();
background.src = "bg.gif";
window.onload = init;
function init()
{
canvas = document.getElementById('canvas');
context2D = canvas.getContext('2d');
context2D.drawImage(background,0,0);
setInterval(loop, 100 / FPS);
}
function loop(){
}
function eat(){
}
function check(){
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment