Fixed spritemap update position error. Added encode and decode to spritemaps