Finally use int as tile_index.
Store entityId in GraphicEntity.