home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pmafire!news.dell.com!swrinde!sdd.hp.com!wupost!gumby!destroyer!ncar!noao!amethyst!organpipe.uug.arizona.edu!news
- From: dave@cs.arizona.edu (Dave Schaumann)
- Newsgroups: comp.programming
- Subject: Re: MAZE
- Message-ID: <1992Jul23.214526.24166@organpipe.uug.arizona.edu>
- Date: 23 Jul 92 21:45:26 GMT
- References: <1992Jul23.145751.29068@wuecl.wustl.edu>
- Sender: news@organpipe.uug.arizona.edu
- Reply-To: dave@cs.arizona.edu (Dave Schaumann)
- Organization: University of Arizona
- Lines: 35
- In-Reply-To: ppc1@cec2.wustl.edu (Peter Pui Tak Chiu)
-
- In article <1992Jul23.145751.29068@wuecl.wustl.edu>, ppc1@cec2 (Peter Pui Tak Chiu) writes:
- >I am trying to write a 3D maze in which the player can move around as if
- >he/she is "inside" the maze.
- >
- >I wrote a version but it is extremely slow. First I transform the 2D maze
- >into 3D coordinates. Then for every move, I redraw the maze with appropriate
- >transformation, rotations and hidden surface eliminations... and as you can
- >tell it takes a lot of TIME!!!
-
- From the sound of it, you are processing a lot of information that is never
- displayed. If you think about it, for a reasonable maze, most of it will be
- invisible to an internal viewer from any particular viewpoint. Thus, the
- first thing you should do is figure out a quick way to eliminate any structure
- that can't possibly be in the view.
-
- A simple algorithm might be:
-
- Draw the room/segment/whatever that the viewer is in.
- Add any visible doorways/connections to the "door" list
-
- For each door in the door list
- draw that room, and add its visible doors to the door list
-
- You'll still have to calculate the transformation matrix, but I believe this
- algorithm will yield a significant savings over trying to transform &
- draw the whole maze.
-
- >thank you so much in advance!
-
- Hope this helps...
-
- --
- You're traveling through another dimension -- a dimension not only of sight and
- sound but of mind. A journey into a wonderous land whose boundaries are that of
- imagination. That's a signpost up ahead: your next stop: the Twilight Zone!
-