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:
Today, barcodes that use EAN/UPC symbology (including the UPC-A, UPC-E, EAN-13 and EAN-8 barcodes) are the only barcodes allowed for products scanned at retail point of sale.
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.