Changed from hardcoded tile width to using map.getTileWidth()