This is a common practice in Hollywood as well. It's the reason why royalties as a percentage of net profits are called 'monkey points'. It's because you'd have to be a monkey to believe that the studio's accountants would ever allow that film to turn a profit in its official books.
In general, the accounting system works great if the distributor is also the developer (because tax) but really badly if the developer is external (because "net" is a fiction).
This is also why powerful people negotiate for a percentage of gross vs. net.
It's also how record labels do their accounting (and why most musicians make more money from touring than LP/CD/... sales).
Based on my experience (I was involved in several contract negotiations with major game publishers), of the $40 that the publisher is paid by the retailer for a $60 AAA title before it starts getting discounted, at most $14* goes to the developer (and that assumes you deliver boxed media with instructions, etc.) -- if not the publisher will be happy to deduct those costs from your $14. This is assuming the developer created the entire product on their own dime. If the publisher does QA and packaging, that's coming out of your $14.
* Probably more if you're a Brand Name. I imagine that if you've got brand recognition then, like Alec Guinness in Star Wars, you can negotiate a percentage of gross, and it's a whole different ballgame.
“I get these occasional letters from Lucasfilm saying that we regret to inform you that as Return of the Jedi has never gone into profit, we’ve got nothing to send you. Now here we’re talking about one of the biggest releases of all time,” said Prowse. “I don’t want to look like I’m bitching about it,” he said, “but on the other hand, if there’s a pot of gold somewhere that I ought to be having a share of, I would like to see it.”
http://www.slashfilm.com/lucasfilm-tells-darth-vader-that-re...
I imagine that, as someone whose face is never visible, Prowse was in an unusually poor negotiating positionand that the more recognizable leads got better deals. Alec Guinness (who got 2% of the gross of the first movie, claimed to have argued in favor of killing off his character to avoid speaking any more terrible lines, and only agreed to do the sequels if he didn't have to promote them) reportedly bought his own island with part of the proceeds (probably in an effort to avoid Star Wars fans).
http://en.wikipedia.org/wiki/Petersfield,_Hampshire.
Never met him, but I think he's on record as describing those roles as ... <Googles> ... "Fairytale rubbish".
"Millions and millions of dollars of error not in our favor."
mean they owed more than they thought?
If an audit is 'in my favor' that means you made a mistake and owe me more.
If the audit is 'not in my favor' then you made a mistake and I owe you more.
I'll add that this "Hollywood" accounting is also used in the music industry.
"Now fortunately someone told us to do that, and did the same thing, and that's ultimately how we got the company back," he explained. "Because when we were able to prove that things were not what they should be then it was ‘pay us or give us the company back', very simple. And so that's how we got the company back, 100 per cent."
makes it sound like this was not the case and that they were, in fact, cheated out of royalties. The article is not completely clear, though, and awkwardly-worded at some points.
The size of that advance will depend on the size of the studio, production costs etc. - it's probably aimed purely to cover costs and the developer won't really make a profit on that - and then any future royalties would go to the developer's coffers.
However, at that point Hollywood Accounting enters the room, and the publisher will do a lot to ensure that most of the 'profit' of the game is actually written off as 'costs' to the publisher, so that they can avoid paying royalties where possible.