I'm new in the field of 2D game development and this is my first project http://codepen.io/mladen___/pen/fuFIH Can someone give me some advice? Or tell me if I'm doing something wrong. I'm trying to implement some JavaScript design pattern which I know from writing web-apps but it just does not work for me...