Информационный сервер для программистов: Исходники со всего света. Паскальные исходники со всего света
  Powered by Поисковый сервер Яndex: Найдется ВСЁ!
На Главную Pascal Форум Информер Страны мира
   Графические Игры    >>    raydoor
   
 
 Raycasting 1.7 - 3D Engine Like Wolfenstein   Vulture/Outlaw Triad 30.11.1998

3D-движок, напоминающий Wolfenstein & Doom, с открыванием дверей.
A great ray-casting doom/wolf 3d-engine with animated doors.



64k 
 

R A Y C A S T I N G by Outlaw Triad ---------------------------------------------------------------------------- Project : Raycasting engine Version : 1.7 Last update : November 30 1998 Language : Pascal/asm Code by : Vulture/OT Graphics by : Sappy/OT Textfile by : Vulture/OT E-mail : vulturejc@hetnet.nl (Vulture) mlimburg@worldonline.nl (Sappy) Homepages : http://www.tem.nhl.nl/~comma400/otraycst.html http://www.tem.nhl.nl/~comma400/vulture.html ---------------------------------------------------------------------------- - BASIC INFORMATION - Raycasting is a technique to simulate 3d environments in which the viewer can 'walk' around. A famous implementation of this technique is the game Wolfenstein. Really advanced examples of raycasters are the Ultima Underworld 1 and 2 games. A raycaster doesn't produce a real 3d world, but instead displays a 2d map in 3d. The viewer is unable to look up or down (x-axis usually), which makes this a fake 3d world. It does, however, create an acceptable visual view of a 3d environment and is as such suitable for games, although you can't compare such games to the standards in 3d games today. As I've been interested in creating virtual 3d worlds for quite some time now, I decided to get into coding a Wolfenstein clone. Reason for this is the fact that basic raycasting is a relatively simple technique and easy to implement. Start the engine by running the executable and move around using the mouse. Keyboard movement has to be implemented, but that's not a priority for me. Pressing the spacebar will open doors in front of the player. Open doors are closed after a period of time. - FEATURES - Currently this engine supports: - Texture mapped walls (various textures) - Seperate 2d maps for the walls and floor/ceiling - Mouse movement (forward and backwards) - Shading (simple depth shading; 16 colour shades) - Floor/ceiling texturing (need a faster method) - Game physics (when you stop walking, you 'slide' a bit further) - Transparent walls and doors (allowing windows) - Animated doors (vertical motion + there is a secret room in here!) - Different textures on X,Y sides of walls (adds more realism) - Collision detection (lame code, must be improved) - Viewport clipping (allowing a frame around the screen) This project is still at it's early stages and if a real game is build with this engine, the following needs to be implemented also (at least): - Level files / sector files (for easy level loading/handling) - Variable height walls (I need stairs and such) - Sprite handling (characters, objects; I'm busy with this) - Water (animated floors resembling water) - Lava (animated floors resembling lava streams) - Maybe 3d characters (using bone techniques?) - XMS memory for texture storage (already done in unreleased version) - 128x128 textures (already done in unreleased version) - Sound (thrilling background music and scary soundsamples) - More fixed point math and assembler code (raycasting procedures) - Remove the undocumented features (called 'bugs') Some of these things are pretty easy to implement (water/lava) and others are very complicated (3d characters). As you can see, there's a lot to do yet. - BUGS - I suspect there to be a few bugs in this engine, although at this point lame coding is more of a problem. Things can be made more efficient for sure. Drawing operations can be optimized by using more assembler code, which is a real 'must'. - HARDWARE - This program was made on a Pentium 75, with a 1 MB videocard. As you can see, no videohardware is used in this program, but this can be realised in future versions to enhance speed and visual appearance. It's ill advised to view this program on a machine less than a P75, because it will run terribly slow. - SOURCECODE- The entire engine is coded using Turbo Pascal 7.0 with inline assembler for drawing operations. Also, a little utility is used to convert the textures from PCX format to a simple data format. Textures are 64x64 and all bytes/pixels are written linear to external data files which are 64x64=4096 bytes each. Eventually all textures will be written to 1 big external data file, together with level data, sprite data etc etc. I decided to release the sourcecode of what I've accomplished in order to motivate others to start coding virtual 3d worlds too. If you can use these sources, please do so. Give Outlaw Triad a greet if you use it in a demo or something like that. These sources are given AS IS, which means you are using these sources at your own risk. - GOALS - My final goal at this point is to create an engine which resembles the Doom engine in order to create an adventure game with it which will be much like the Ultima Underworld games. This probably means I'll have to write a sector polygonal engine (linedef engine), but for now I'll try to get as much as possible out of basic raycasting. - THANKS - I could not have made this program without the help of others, who were so kind to share their knowledge by making their programs/info available on the internet. I would like to thank the following people: - Jim (for our discussions on graphics programming) - Telemachos/PXD (for your tutorials and personal help) - F. Permadi (for your excellent html tutorial) Thanks very much. - CONTACT - I would like to get in contact with other people who are trying to create virtual reality programs, wether those programs are raycasters or not. Please feel free to contact me or Sappy/OT using the e-mail adresses stated above! ----------------------------------------------------------------------------