based on http://blog.sklambert.com/galaxian-html5-game/ tutorial