opengl_3d_maze

所属分类:OpenGL
开发工具:Visual C++
文件大小:206KB
下载次数:111
上传日期:2006-04-30 20:53:48
上 传 者强哥2
说明:  此程序采用 opengl 结合图结构实现了3d迷宫的绘制,具有参考意义
(procedure used opengl graph structure to achieve a maze of 3d rendering, with the reference value)

文件列表:
3d迷宫\3DMaze\3DMaze\3DMaze\3DMaze.exe (578904, 2004-01-21)
3d迷宫\3DMaze\3DMaze\3DMaze\data\Maze1.xml (831, 2003-12-05)
3d迷宫\3DMaze\3DMaze\3DMaze\data\Maze2.xml (829, 2003-12-05)
3d迷宫\3DMaze\3DMaze\3DMaze\data\Maze3.xml (832, 2003-12-05)
3d迷宫\3DMaze\3DMaze\3DMaze\data\Maze4.xml (830, 2003-12-05)
3d迷宫\3DMaze\3DMaze\3DMaze\data\Maze5.xml (830, 2003-12-05)
3d迷宫\3DMaze\3DMaze\3DMaze\data\Maze6.xml (831, 2003-12-05)
3d迷宫\3DMaze\3DMaze\3DMaze\data\Maze7.xml (829, 2003-12-05)
3d迷宫\3DMaze\3DMaze\3DMaze\data\Maze8.xml (832, 2003-12-05)
3d迷宫\3DMaze\3DMaze\3DMaze\data\Maze9.xml (834, 2003-12-05)
3d迷宫\3DMaze\3DMaze\3DMaze\data\setup.xml (101, 2003-11-02)
3d迷宫\3DMaze\3DMaze\3DMaze\data (0, 2006-01-12)
3d迷宫\3DMaze\3DMaze\3DMaze\images\Floor.tga (65580, 2003-11-01)
3d迷宫\3DMaze\3DMaze\3DMaze\images\Wall.tga (65580, 2003-11-01)
3d迷宫\3DMaze\3DMaze\3DMaze\images (0, 2006-01-12)
3d迷宫\3DMaze\3DMaze\3DMaze\Log.txt (192, 2006-02-15)
3d迷宫\3DMaze\3DMaze\3DMaze (0, 2006-01-12)
3d迷宫\3DMaze\3DMaze\Source\3DMaze.dev (4119, 2004-01-17)
3d迷宫\3DMaze\3DMaze\Source\3DMaze.ico (766, 2003-11-02)
3d迷宫\3DMaze\3DMaze\Source\3DMaze.layout (1895, 2004-01-21)
3d迷宫\3DMaze\3DMaze\Source\3DMaze_private.h (564, 2004-01-17)
3d迷宫\3DMaze\3DMaze\Source\3DMaze_private.rc (125, 2004-01-17)
3d迷宫\3DMaze\3DMaze\Source\3DMaze_private.res (1030, 2004-01-21)
3d迷宫\3DMaze\3DMaze\Source\Icon.ico (766, 2003-11-02)
3d迷宫\3DMaze\3DMaze\Source\Makefile.win (2465, 2004-01-21)
3d迷宫\3DMaze\3DMaze\Source\source\FileProcs.cpp (6081, 2003-10-31)
3d迷宫\3DMaze\3DMaze\Source\source\FileProcs.hpp (887, 2004-01-21)
3d迷宫\3DMaze\3DMaze\Source\source\Globals.hpp (614, 2003-11-02)
3d迷宫\3DMaze\3DMaze\Source\source\GLWindow.cpp (16750, 2003-11-01)
3d迷宫\3DMaze\3DMaze\Source\source\GLWindow.hpp (1030, 2003-10-31)
3d迷宫\3DMaze\3DMaze\Source\source\Image.cpp (18122, 2003-10-31)
3d迷宫\3DMaze\3DMaze\Source\source\Image.hpp (1059, 2003-09-30)
3d迷宫\3DMaze\3DMaze\Source\source\Log.cpp (1291, 2003-10-11)
3d迷宫\3DMaze\3DMaze\Source\source\Log.hpp (365, 2003-10-31)
3d迷宫\3DMaze\3DMaze\Source\source\Macros.hpp (861, 2003-11-01)
3d迷宫\3DMaze\3DMaze\Source\source\Main.cpp (18141, 2003-11-03)
3d迷宫\3DMaze\3DMaze\Source\source\Matrix4x4.cpp (7235, 2003-10-19)
3d迷宫\3DMaze\3DMaze\Source\source\Matrix4x4.hpp (1326, 2003-10-19)
3d迷宫\3DMaze\3DMaze\Source\source\Maze.cpp (33328, 2004-01-21)
... ...

3Dmaze I have now worked with OpenGL for some time. I have often browsed the net for demo’s and ideas. Here I have found a lot of maze programs, but no one in 3 dimensions. Why not? OpenGL is good for 3D… so I set out to make such a program. Graphically I have been inspired by many things, like Tron or the Matrix, but I believe the program have got its own style by now. I like the glasslike effect in transparent mode. Lovely. I have realised that it is extremely difficult to move through a 3 dimensional maze. Even if it is only 5x5x5 and it becomes nearly impossible at 9x9x9. The maximum size is 20000 "cubes", i.e. 141x141x1 or similar, but you will get lost in there forever, and it will kill your computer in terms of performance. A special cute version is to display a transparent maze in one level. This is an ordinary maze; you can study before you enter it. Due to the difficulty of moving through a 3 dimensional maze, I have build a help function. Pressing “h” will cause the program to display “arrows” in the maze, pointing to the exit. (It cost a lot of score to use). The score is for those who want that. It is a timer, starting when you enter the maze, and a timer displaying the time you have used the help function. The score is a sum of the two, where help time cost 30 times normal time. To move through the maze with a low score is what you play for… In the data folder you can find the 9 xml definition files for the mazes. Modify them as you please to build mazes to your liking. Here you also find the setup.xml file, that determine the graphic screen set up (Size, full screen etc…) Playing keys: Movement: a or up: Accelerate forward. z or down: Decelerate. q or left: Roll left (See also auto plane). w or right: Roll right (See also auto plane). space: Stop all movement. Mouse up/down/left/right: Turn and tilt. Misc: Esc: Quit program. 1-9: Load mazes. 0: Randomise current maze. h: Show help arrows in maze (cost score). Flags: s: Toggle solid/transparent walls. p: Toggle auto plane. (Level to horizon). l: Toggle Lines on walls (edges, and cross). t: Toggle textures. d: Toggle debug mode (show FPS and maze seed). g: Toggle ground and sky display. I have put the source code together with the program so you can use it if you wish. Some places is well commented, others are not commented at all. Fell free to be inspired. If you use it in your own programs, credit me or at least let me know you liked it. Project compiles with Dev-C++ 4.9.8.0 I myself have found many inspiring pieces around the net, especially NeHe’s tutorials. I believe we all have started by studying pieces of code and examples, and I would like to return the favour with this code. e-mail: bjarne.fich@dragonslayer.dk http: www.dragonslayer.dk

近期下载者

相关文件


收藏者