Autmatically generating GIFs from mapfiles?

Technical and coding related questions.

Moderator: Board moderators

fargris
Luser
Posts: 37
Joined: Sun Jan 11, 2009 4:13 pm

Autmatically generating GIFs from mapfiles?

Post by fargris »

I was exploring CrossfireEditor and noticed that one can generate images from map files - is there a tool that can do this automatically from the commandline?
Leaf
Forum Aficionado
Posts: 1994
Joined: Tue Apr 29, 2003 5:55 pm
Location: Minnesota, USA
Contact:

Post by Leaf »

Yes, within the server code is a utility called Mapper.

Found in the server directory, under /utils/mapper.c

Here's what the output of mapper creates:

http://crossfire.homelinux.net/world/index.html
"Put another, more succinct way: don't complain, contribute. It's more satisfying in the long run, and it's more constructive."
Eric Meyer
Ryo
Forum Fanatic
Posts: 752
Joined: Mon May 19, 2003 9:16 pm
Location: Paris, France

Post by Ryo »

Random map illustration: http://crossfire.homelinux.net/world/po ... .small.png and map information page http://crossfire.homelinux.net/world/po ... ortia.html


Note that generated files are PNG, not GIF.


Also, this tool currently only works under Linux, as far as I know.
fargris
Luser
Posts: 37
Joined: Sun Jan 11, 2009 4:13 pm

Post by fargris »

Leaf - thanks a lot; I was wondering about creating some maps myself, but is there any documentation for the map-language? I can sort of guess some of it, but I'd like to feel I understand it correctly.

Ryo - png and linux are fine; I haven't touched Windows for over 10 years.
Ryo
Forum Fanatic
Posts: 752
Joined: Mon May 19, 2003 9:16 pm
Location: Paris, France

Post by Ryo »

fargris wrote:I was wondering about creating some maps myself, but is there any documentation for the map-language? I can sort of guess some of it, but I'd like to feel I understand it correctly.
I would really suggest using Gridarta, the official Crossfire map editor.

A built-in version is available at http://invidious.meflin.net/crossfire/C ... Editor.jar (it is a Java program), or its home is http://gridarta.sourceforge.net/

Note that you probably need to have the maps and archetypes, from either SVN (I'd suggest trunk, or a release version).

Code: Select all

svn co https://crossfire.svn.sourceforge.net/svnroot/crossfire/maps/trunk maps
and

Code: Select all

svn co https://crossfire.svn.sourceforge.net/svnroot/crossfire/arch/trunk arch
to get said trunk respectively.


Feel free to hop to the #crossfire channel on Freenode (note: the channel is slow sometimes, depending on the time of the day and your timezone, please give time to people to reply before leaving :)), and or join the mailing list, see http://crossfire.real-time.com/mailinglists/index.html (at least the discussion list) for more help.
fargris
Luser
Posts: 37
Joined: Sun Jan 11, 2009 4:13 pm

Post by fargris »

Thanks, Ryo. Are there any docs for gridarta?
Leaf
Forum Aficionado
Posts: 1994
Joined: Tue Apr 29, 2003 5:55 pm
Location: Minnesota, USA
Contact:

Post by Leaf »

Do you mean docs as in instructions or tutorial on creating maps or something else?
"Put another, more succinct way: don't complain, contribute. It's more satisfying in the long run, and it's more constructive."
Eric Meyer
Ryo
Forum Fanatic
Posts: 752
Joined: Mon May 19, 2003 9:16 pm
Location: Paris, France

Post by Ryo »

fargris wrote:Thanks, Ryo. Are there any docs for gridarta?
The editor has built-in help explaining various mapmaking operations.


Now for map tutorials about map design, what monsters to use, things like that, it's a more complicated situation :)

Looking at existing maps is a good way to get a feel.


Also, don't hesitate to ask for feedback on map ideas and such.
Ragnor
Luser
Posts: 12
Joined: Sun Apr 10, 2005 11:00 am

Post by Ragnor »

The tool is CrosfireEditor:

Code: Select all

# java -jar CrossfireEditor.jar --help
usage: java -jar CrossfireEditor.jar [option...] [map-file...]

 -h, --help           print this help
 -b, --batchpng       create PNG files for all given maps in their directories
 -c, --collectarches  collect archetypes
 -n, --normal         start editor with GUI (default)
 -s, --singlepng      create a PNG file from the specified map
 --config=config-file use given config file; uses ~/.gridarta/crossfire.conf is not given
 --noexit             do not call System.exit()
 --script=name [arg=value...]
                    run a plugin script with the given arguments

Code: Select all

# java -jar CrossfireEditor.jar ~/crossfire/maps/scorn/misc/cityhall cityhall.png
[lots of output]
INFO (main) net.sf.gridarta.gui.map.renderer.ImageCreator  - Created image "cityhall.png" of map "Scorn City Hall".
fargris
Luser
Posts: 37
Joined: Sun Jan 11, 2009 4:13 pm

Post by fargris »

Thanks a lot for your replies, everybody! I'm off to China today, but I'll see what I can come up with when I come back.

Leaf: what I was thinking of was more something in the way of a prgrammer's manual - one that explains the language, keywords, commands and parameters; and perhaps something about what parts are needed to make up a complete map. Like, I think I have guessed that 'slaying' defines what happens when you issue an 'apply' - but I am not sure. I can probably work it out from looking at the existing maps, though.
Post Reply