what language you using or your using a game engine?
I'm writing this in Lua using the Love2d framework.