Re: [DM-dev] brilliant :)
Brought to you by:
acdalton,
henningsen
From: Stephan B. <ste...@ei...> - 2001-04-11 13:41:03
|
Okay, I've got a script which turns Dungeon files into HTML with=20 graphics. It's attached, just for the curious, but it needs some major=20 work before it's really usable. It has some limitations which need to=20 be cleaned up before I send it to the list, however: 1) It doesn't correctly deal with NS & EW walls - they all get the same graphic (which looks bad with the graphic I'm currently using). With a=20 proper square graphic it won't matter much, actually. 2) Needs to be able to take a graphics theme when run (this is=20 currently hard-coded). The graphics are called the same as the=20 character they represent, so X =3D graphics/<theme>/X.png, C =3D=20 graphics/<theme>/C.png, etc. (yes . =3D ..png). 3) Currently only handles X, C, ., and 0-9 characters (are there=20 others?). This support will be rewritten, though. I don't like the way=20 I've done it. 4) The graphics are lame. I grabbed the first things I found. It should be very little problem to make a quick Qt app which can take=20 this HTML (or the original input) and make a real graphic out of it. Qt=20 has functions for taking "screen-shots" of arbitrary widgets, so I just=20 need to paint he pixmaps into the widget and Qt'll do the rest. Qt has=20 a basic HTML browser widget which can browse the output files (tested=20 already), and QUB has code to use that and to screen-shot it, so it'll=20 only take me a little while to do that tonight. Problem =3D null. Using the attachment: unzip to your DungeonMaker source tree, then: =2E/dungeonmaker =2E/dng2html Dungeon.txt > foo.html (dng2html requires Perl. If your Perl is not at /usr/bin/perl,=20 edit the first line of dng2html to the correct path.) Browse foo.html from that dir. Netscape takes AGES to render the=20 output, but it works. Gawd Bless Open Source. Thanks again, Doctor! ----- Stephan Beal Generic Universal Computer Guy ste...@ei... - http://www.einsurance.de Office: +49 (89) 552 92 862 Handy: +49 (179) 211 97 67 "Belief makes a hollow place. Something has to roll in to fill it." -- Terry Pratchet On Wednesday 11 April 2001 14:28, Stephan Beal wrote: > Dr. Henningsen, > > It's brilliant :). A couple of month ago I started pouring through > old Nethack and Moria source code in an attempt to find some code for > Dungeon generation, which I would like as a plugin for QUB: the Q > Universal Boardgame (http://qub.sourceforge.net). That code is so > ancient and ill-organized that it's too much work to deal with, > though. Two minutes with DM and I've found it! I love that you've > made the output simple text. I'll be making a Perl script which takes > that input and makes a graphical representation of it (via HTML and > <img> hrefs). I'll post it to the list as soon as I'm done. I have a > huge collection of graphics from Nethack which can easily be used for > the > wall/floor/column graphics. If you would be interested in thinking > about doing some XML output, I would be happy to help with that. > > Something simple like: > <Dungeon> > > <floorsquare> > =09 <pos>#,#</pos> > =09 <img>filename</img> > =09 <type>some type of type info (fire, North Wall, NW corner, > etc.)</type> > =09 <notes>arbitrary user notes (could be implemented > as hoverhelp in a graphical client)</notes> > </floorsquare> > <floorsquare> > ... > </floorsquare> > ... > </Dungeon> > > That's off the top of my head, anyway. Of course it's nowhere near as > lightweight as text, but perhaps it would have some usefulness in > feeding 3rd-party apps (I can imagine a DungeonMaker server on the > internet, which sends XML output on request. Might have uses for any > number of dungeon-crawling games). > > Take care, and thanks for DungeonMaker! > > :) > > ----- Stephan Beal > Generic Universal Computer Guy > ste...@ei... - http://www.einsurance.de > Office: +49 (89) 552 92 862 Handy: +49 (179) 211 97 67 > "Belief makes a hollow place. Something has to roll in to fill it." > -- Terry Pratchet > > _______________________________________________ > Dungeonmaker-develop mailing list > Dun...@li... > http://lists.sourceforge.net/lists/listinfo/dungeonmaker-develop |