Doom engine
The Doom engine (driving Doom ) is a Moteur of play which made it possible to make function the plays Doom and Doom II of Id Software. It was also used under license by the plays Hexen , Heretic , Strife and HacX , and other plays. It was created by John Carmack, and certain auxiliary functions were written by Mike Abrash, John Romero, Dave Taylor and Paul Radek. Initially developed to the systems NeXT, it was related under DOS for the first version of Doom and was related then to a great number of console and Operating system.
The Source code of the version Linux of Doom was released in 1997 pennies a license allowing the free noncommercial use, then was again released in 1999 pennies the public License general GNU (LPG). The dozen ports nonofficial of the sources which were created since, made it possible to make function the play on operating systems hitherto incompatible with the play, and in certain case allowed to extend the capacities of the engine by adding new functions.
It is not a true engine 3D, because it is not possible to incline the field of view in top or bottom, and two parts cannot be one in lower part of the other, but it is an architecture rather elegant software which makes it possible to make the pseudo one returned 3D. During its development, Doom was revolutionist for his capacity to make quickly projections of textures in an environment 3D.
Structure of the levels
While looking at there more closely, all the levels of Doom are in 2 dimensions, showing one of the principal limitations of the Doom engine : it is not possible to create rooms the one in lower part of the others. This limitation makes it possible however to facilitate the posting of level in the form of chart, representing the walls by lines and the character of top.
Basic elements
The basic element is the top ( vertex ), which represents a point in two dimensions. The tops are connected to form lines ( linedefs ). Each line can have dimensioned one or two (known under the name of sidedefs ). The sidedefs are finally grouped together to form polygons (called sector ; sector). A sector is a particular zone of a level.
Sectors
Each sector contains a whole of properties, like a height of floor and ceiling as well as a texture for the floor and the ceiling. Each sector also defines a certain level of luminosity. Thus, to create a light or remote region, a new sector should be created. There cannot thus really be shadows, nor even of dynamic light. It is about another limitation of Doom engine.
Sidedefs
The sidedefs have less properties than the sectors; Nevertheless, they can be directed, and have one or two textures (one by face).
Things
" Things" , literally " Choses" in English, all the dynamic objects of the play represent. Inter alia, the things can represent enemies, objects to be collected, or even objects of " décoration" , such torches. Things can be directed in eight directions at the beginning, and, in addition to their nature, they do not have a modifiable property.
Binary subdivision of space
Doom uses a technique known under the name of binary partition of space (more known under the name of Binary space partitioning or BSP). A tool is used to convert a level into tree BSP, the levels rough are not integrated in the play. According to the size of the level, the process can take an important time. For this reason it is not possible to move walls in Doom ; whereas doors or elevators never move from top to bottom none moves on with dimensions one.A level is divided into binary tree: each position of the tree is a node which represents a particular zone of the level (the root represents for example the whole of the level). With each branch of the tree a line of division represents separate space into two. At the same time, this line of division can cut the walls ( linedefs ) under-segments ( segs ).
The sheets of the tree represent convex polygons, and it is not useful to divide still the zone more. These convex polygons are referred under the name of under-sector (or SSECTORS ), and are related to a particular sector. Each under-sector has a list of segs which is associated for him.
System BSP is really a very intelligent manner to structure the under-sectors so that they are well ordered for made graphic. The algorithm becomes rather simple:
-
To start with the node root.
- To treat the nodes wire of this node in a recursive way. The nodes closest to the observer being treated in first. This information can be found while looking of which with dimensions of the line of division the observer is.
- When a under-sector is reached, to draw it.
The process is finished when the whole column of the pixels is filled (i.e. when it there more hole). This order of treatment ensures that no time is wasted to draw objects which are not visible and consequently the levels can become very large without there being really penalty speed.
Returned
At the time the computers were not enough powerful to return true 3D. Doom used an engine of false 3D: the camera can never turn upwards or to the bottom, and the ground is coded in analyzed in 2d, which reduces calculations considerably.
Drawing of the walls
The walls are returned with the technique of the Raycasting, used also for wolfenstein 3D. It consists in tracing vertical sections of texture to variable height to give the illusion of the walls.
Floor and ceiling
The floors and ceilings are returned with a similar method: Z-Mapping, also used in plays like Mario Kart, and who functions with horizontal sections of texture.
Object (sprites)
Each sector of the level has a chained list representing the objects (things) being there. During the phase of returned sectors, the objects are placed in the queue to be posted. Those which are not in the field of view are ignored.The edges of the sprites are cut while checking the list of the already drawn segments. The sprites in Doom are stored with the same format as that used for the walls, so that it is very easy for engine of returned to post them: the same functions which are used to post walls are employed to draw sprites.
Whereas under sectors guarantee to be already sorted, the sprites are not it. Doom stores a list of sprites to be posted ( vissprites ) and sorts this list right before returned. Thus the sprites more retrais some are posted before those which are nearer to the field of view. This generates coverings - that one can regard as a nonoptimal treatment - but which are usually negligible over the processing time.
Lastly, the textures used on the two with dimensions ones of a wall and resorting to the transparency are posted at the same time as the sprites at the end of the process of rather returned than with the other walls.
Editor of levels
Doom and Duke Nukem 3D use the same type of charts, but the engine of Duke Nukem has less of limitations (possiblite to superimpose stages for example). The levels of Doom can thus be publish with the editor of level of Duke Nukem 3D: Build
See too
- Quake engine
- Doom 3 engine
References
| Random links: | Championships of the world of curling | Merrey-on-Arce | Live By The Sea | Tom Jones (pilot) | Drifting Away Violenty | Beinn_Eighe |