Going back to my time in retail with Electronics Boutique, the shop floor price was dictated by the unit cost price of the distributer. The cost price to the distributer was dictated by the publisher.
There would be occassions when we would reduce the shop floor sale price of a game by anything 50% because the publisher wanted to move large amounts of unsold units, given a rebate per unit to the distributer for his existing stock and reduced the cost price of new stock who then passed on a percentage of the rebate to us in retail. This was even more prevelent in hardware sales, I remember Sony and Sega rebating us tens of thousands every time the PS1 and Saturn had a price cut for units we held in stock.
The percentage of the the sale price which goes to the developer varies depending on whether they have simply been paid a one off fee by the publisher to produce the game (in which case they recieve nothing), whether they are in house (Gears of War on the 360 etc) and whether they have a contract which pays a fixed royalty amount paid per unit sold, I think a developer actualy recieveing a percentage of the sale price is quite rare, its usualy a royalty (ie. £1 per unit sold rather than 10% of the sale price).
Ultimately though the in store price is a percentage mark up on the price the stock is bought from the distributer.
I dont think anyone sells games at a loss in this climate with the exception of supermarkets who do it in the hope of getting additional sales from you whilst your instore.
Having said all that, its been many years since I was in retail so I may be talking utter bum juice 