Java based level editor and game engine basics for 2d game