Normally the distribution company give the developer money for the game. The distributer will also pay the marketing costs and have the distribution network—and take the main risk.
More. Based on conversations with industry professionals, I think $1 million (US) is pretty much a dead minimum for a professional organization working on a new game. More complex games cost more, sometimes a lot more, though I think more than $10 million or so is a rarity.
Of course the development costs are highly depending of the product. But for example a actual fantasy advanture (offline) produced by a developer with a stuff of 10-20 persons with a adapted licensed graphic engine cost about ca. 3-4 Million Euros (+ Marketing). European Examples are Drakensang or Gothic4/Arcania.
Actual big productions like new ego shooter (new graphic engine) and MMOGs starts at 10 million up to a multiple of this sum.
On the other side there are actual possible to produce much cheaper by using a more easy graphic engine and concept. But it depends as well on the design and storyteller team available. And it helps a lot when there is a project manager with some experience.
Its depend on a large numbers of factors, but I believe it should be possible to produce something in the complexly of Fantasy Grounds well bellow 500K with a careful planning.
Other examples http://www.rainslick.com
. Ufo Alien Invasion get even developed as a opensource fan project (http://ufoai.sourceforge.net/