Re: [DM-dev] Make it more modular
Brought to you by:
acdalton,
henningsen
|
From: Selena W. <se...@al...> - 2001-04-02 12:42:10
|
>>Also, in your interface: In the DungeonMaker
>>constructor, you call several variables that are read in from the
>>rooms-file. Isn't that redundant? Shouldn't the constructor read the
>>rooms-file itself, so you could get rid of the variables in the constructor?
>>Makes it easier to call, and all...
>Yeah, but if the file is missing, the constructor call would fail, and that
>would be a problem, since I cannot return an error code from the
>constructor. So I thought it best to let the user deal with that, writing
>his own error handling.
For that purpose they have introduced exceptions to C++. You can throw an
exception from your constructor, and the user of your code can catch it.
>Have you tried to design your own dungeons? And where are you anyway?
>Haven't heard from you in a long time.
I'm spending some time in Pokhara, enjoying warm washing water, an abundance
of human company, and internet access. Yes I did play around with dungeon
design some, and I think the dungeons really shine on very large maps. You
should consider writing a demo aplication that can sensibly be played on
450x450 maps or so.
In your remarks about the X-files you say you can let a Crawler run along a
wall at a distance of its corridorWidth, and exactly know its entire course.
You can do that much more generally: If you set changeDirProb to zero, you
just need two hand-placed wall tiles, one to block its further progress, and
one to block its turning to one side, and you can let it run through the
dungeon space in any way you choose. Just a suggestion here: I think it
would be nicer to have two (and probably more) columns hand-placed to force
direction changes than to have single wall tiles. So? Do you think you could
make provisions for hand-placement of columns?
One other thing, your main() function is quite large, what with handling the
input and all that. How about writing a drastically simplified main function
that shows just the essentials of how to use the DungeonMaker class?
Selena
________________________________________________
The void liberates you from all conceptual views
...but if you conceptualize the void...
|