If your entities will come from a fixed set of values, then use lookup tables, as Juste has recommended. If your entities can have totally random values and they will overlap with other entities, then use the approach described here.
If your entities will come from a fixed set of values, then use lookup tables, as Juste has recommended. If your entities can have totally random values and they will overlap with other entities, then use the approach described here.