Is it necessary to register a Universal Product Code for a video game intended for sale offline? What about online?
UPC codes are designed for retail sale in the United States. They aren't legally enforced, but rather a private industry that's been standardized. Per the GS1 website:
Therefore if you wanted to sell your game through practically any retailer, you would require a valid UPC for your product. Remember to follow the guidelines of registering your company with GS1 to have valid UPCs if you plan to do this.
Likewise selling a game on your own, whether online or offline, would not require a valid UPC. You could sell a million copies online through your own website or a million copies burned to DVDs, and it wouldn't matter.