Re: [DM-dev] Hierarchical/Flat model
Brought to you by:
acdalton,
henningsen
From: Henningsen <al...@gl...> - 2001-08-22 18:20:09
|
>> This looks to me like you have code that is a hybrid of two distinct >> approaches that cannot really coexist peacefully. As far as I'm concerned, >> I have no use for the hierarchical part, and would therefore prefer a pure >> flat approach for simplicity reasons. > >I knew you'd say that! ;) I knew you'd know that;-) >I agree completely that the flat and H models aren't mixing well. I really >think I will nuke the H structure and go with something very, very flat. I >won't kill me, it'll just wound my sense of architecture ;). Nothing fatal, >certainly. ;) Hey, I'm mostly against the weird mix. If you throw out the flat stuff, I could live with that too. But my sense of architecture gets offended by ... oh well, you know, the mixing;-) >Just for interactive design, mainly, and because QUB already has the code >(XML stuff) for serializing and loading hierarchies of data, so I could store >dungeons in XML format extremely easily this way. If I do a flat model I've >got to use an intermediary format and encode/decode it along the way. Hmm, I don't think you should put complications into the core Dungeonmaker stuff to ease cooperation with QUB. That properly would go in an intermediate layer. (Did you know I'd say that? Darn!) Anyway, I'm missing something again: A flat model is also a special case of a hierarchical model, just with no branches, children or whatever you call 'em. So I would think your QUB serializing code should be able to work on a flat data model (== one-layer hierarchy). Not so?? In interactive design, if you have a hierarchical model, you get problems with selecting what to move. Click somewhere to select... what? the room and all that's attached? Or does the user just want to move the wall inside the room? If you can get several layers (like fountains attached to walls attached to rooms...) selecting the right object can be devilish (I know from sad experience with the very professional Fireworks program). Much easier in my experience to have a flat model and move several objects independently, particularly if you can easily enter "Move right by 2, down by 5" or something. Just remember the numbers, and the whole nested structure is shifted in a jiffy. And who wants to move rooms around anyway? Only very fussy designers, no doubt. Peter |