Complete.Org:
Mailing Lists:
Archives:
freeciv-dev:
April 2003: [Freeciv-Dev] Re: Tidying savegames to pave the way for plug mapgens |
[Freeciv-Dev] Re: Tidying savegames to pave the way for plug mapgens[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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 +-----------------------------------------------------------------
punchmap.pl
pgp9MfjnQwjEL.pgp
|