Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2003:
[Freeciv-Dev] Re: Tidying savegames to pave the way for plug mapgens
Home

[Freeciv-Dev] Re: Tidying savegames to pave the way for plug mapgens

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Tidying savegames to pave the way for plug mapgens
From: Cameron Morland <cjmorlan@xxxxxxxxxxxxxxxx>
Date: Thu, 24 Apr 2003 08:44:44 -0400
Reply-to: Cameron Morland <Cameron@xxxxxxxxxx>

On Thu, Apr 24, 2003 at 11:35:55AM +0200, Raimar Falke wrote:
> > General mapgen layout
> > =====================
> > A few bits of mapgen make more sense now (IMHO). Instead of requiring
> > each generator to do everything, it can specify what it does by
> > setting booleans, then default functions can be applied later. This
> > should make the code tidier. 
> > 
> > Since making rivers depends on having a height map, I wrote a simple
> > function to generate a heightmap given a tilemap.
> 
> Also this logic should be moved to the external program.

I'm trying to make it so that the external mapgenerator can be really
simple, ie so it doesn't have to worry about all these details, but it
can if it wants to. If an external generator wants to add rivers, it
just needs to say "have_rivers_overlay", and provide the appropriate
data. If it doesn't want to worry about rivers, the default algorithm
will be run.

> > External Generators
> > ===================
> > I haven't written the glue code to run external map generators, I've
> > just been running them from the command line, redirecting to a file,
> > then loading the file. But now at least the plug-in generators don't
> > have to be so complicated; if they want to use a heightmap technique,
> > they can just generate the heightmap and let mapgen do the rest.
> 
> > Attached are the diff, and a pretty terrible map generator written in
> > Perl (it's not a great generator, it's just something I hacked
> > together as an example). Comments? I'll be away for a few days, but
> > I'd like to see what people think.
> 
> > ? generatesillymap.pl
> > ? punchmap.pl
> 
> The perl code isn't included.

Huh. I'll try again.

-- 
+-----------------------------------------------------------------
| PGP http://www.eng.uwaterloo.ca/student/cjmorlan/public-key.pgp
| Cameron Morland             ----             Cameron@xxxxxxxxxx
|
| If you want troubles, buy a watch.
|     --Maximilian I of Bavaria
+-----------------------------------------------------------------

Attachment: punchmap.pl
Description: Perl program

Attachment: pgp9MfjnQwjEL.pgp
Description: PGP signature


[Prev in Thread] Current Thread [Next in Thread]