Re: [DM-dev] idea!
Brought to you by:
acdalton,
henningsen
From: Stephan B. <ste...@ei...> - 2001-04-26 13:43:02
|
On Thursday 26 April 2001 15:05, you wrote: > >lets the room "draw" it's contents onto the target grid. Returns > > false if there is some error (out of bounds, etc., though the item > > would still be rendered as much as it could. > > That sounds good to me, go ahead. But make sure the bounds checking > is solid;-) We are not concerned with running fast, so definitely > check the bounds in the DungeonMaker, even if the DungeonDesigner > checks them also. That'll be the "hard" part (but not really hard). > >Even better would be to make a Renderable interface and have Room > > and Wall subclass that, then we have: > > > >DMGrid::render( Renderable * ); > > > >But I'm not sure what the Renderable API would have to look like (it > > would have to be generic enough to allow the DMGrid to handle > > drawing for all types of objects, and this seems a bit complex). > > I'd appreciate any ideas on a Renderable API which would allow > > DMGrid to handle all the rendering. > > Very simple - if you accept my idea of keeping anything above Walls > out of the DungeonMaker, there will only be (I think) four different > objects that will ever have to use this interface, and they are all > known to you right now.=20 Hmmmm. HHHMmmmmm. Yes. I will definately look more closely at this. > needed;-) Elegant code is not neccessarily easier to understand and > maintain. True, but I often forget that. :) > Yeah, keep it simple, man;-) Use the Renderable interface only if it > actually simplifies things, which i doubt it does. Avoid code bloat!! I'm attempting to make the framework use it's own API, so I can get=20 "maximum feel" for the usability. I try to limit myself to two API=20 calls per operation, to keep it as simple as user as possible. When I=20 find that I often have to make the same two-function call sequence, I=20 almost wrap that into another function. The current API has a very high=20 degree of granularity. Using the "suggested" API gives a very=20 high-level usage of the stuff, with very minimal coding. Then there are=20 a wide variety of lower-level functions. ----- 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 |