DooM - Afterburn bietet dir Informationen, FAQs, Tuts und downloadbare Dateien zu DooM und DooM-2. Dabei werden die Source-Ports jDoom, gzDoom, Doomsday, Risen3d und andere berücksichtigt. Doom als 3D-Spiel ist ein bekannter Horror-Shooter und Ego-Shooter.

Aber sorry, für die Ansicht dieser Seite ist ein modernerer Browser erforderlich !

DooM - xFAQ

↓bottom↓   ↓Menu↓   ↑top↑

» DooM - xFAQ «


 

Hexen's PolyObj Construct

Steve Benner / Ben Morris

 


 Introduction

↓bottom↓   ↑Menu↑   ↑top↑ Under construction...

 

A brand new construct, developed by Raven Software for Hexen is the PolyObj--short for Polygonal Object. This object permits the addition of a spectacular new feature to the Hexen map: moving lines!

A PolyObj is a logical construct, consisting of a number of component parts. In essence, a PolyObj is merely a collection of one-sided lines. What marks them out as a PolyObj is:

  • * one of their number possessing a Special Action value of 1: PolyObj_StartLine; and their interconnectedness
or
  • * all of them possessing a Special LineType value of 5: PolyObj_ExplicitLine

The PolyObj_StartLine and PolyObj_ExplicitLine arguments provide an identification of the particular PolyObj they define, (and also implicate another PolyObj in their own PolyObj's actions: more on this later.)

 


 Building PolyObjs

↓bottom↓   ↑Menu↑   ↑top↑

 

Because PolyObjs are simply collections of lines, they can be drawn anywhere on the level map: usually far away from other map lines, so as to not interfere with the "normal" map lines. These lines cannot be two-sided and do not need any sector information applying to their single SIDEDEF (it will not be used, anyway). The polygonal object that the engine renders on screen during play will derive its size, shape, and initial orientation from the lines laid out on the map. Its actual location will not, however: that is determined by the PolyObj location mechanism described shortly. The rendered height of the lines comprising the object will be determined by the sector that the PolyObj finds itself in during play.


Rendering Order of PolyObj Lines

The precise form of a PolyObj is determined by the rendering order of its component lines. This is determined differently depending upon the method used by the designer to define the PolyObj:

Using PolyObj_StartLine
This is the simplest method of marking lines for inclusion in a PolyObj: the PolyObj_StartLine Special Action code is assigned to one line of the PolyObj. This is the first line that the engined will render as part of the object represented by the PolyObj--the StartLine. All subsequent lines of the PolyObj are located by following connections from the To (or second) VERTEX of the StartLine and then iterating this process around the PolyObj from line to line. This method works well for convex PolyObjs,and leaves all but the StartLine free to have other Special Action codes attached to them.
Using PolyObj_ExplicitLine
The alternative method of marking the lines of a PolyObj involves rather more work, adn prevents any of the component lines from having an Special Actions associated with them, but it provides total control over the PolyObj rendering order. In this method, every line forming part of the PolyObj is given the Special Action Code of 5: PolyObj_ExplicitLine. The second argument of this Special Action provide the line's position in the rendering sequence. The first line of the PolyObj would be given the value 1, the second 2 and so on.

Identifying PolyObjs

Whichever method of marking out a PolyObj is adopted, each PolyObj must have a unique PolyObj identification number. This number is assigned by means of the first argument of the defining function, PolyObj_StartLine or PolyObj_ExplicitLine.


Locating PolyObjs

So as not to interfere with normal map lines, PolyObjs are usually constructed by the designer well away from these other lines. The PolyObj is moved to its operating location by the game as the level is loaded. It does this through the use of three special THINGS:

  • o 3000: PO_Anchor
  • o 3001: PO_StartSpot
  • o 3002: PO_StartSpot_Crush

The two StartSpot THING-types are each used to define the location on the map where a particular PolyObj is to appear during the game: which is used will determine the behavior of the PolyObj in play. The Anchor point THING marks the PolyObj's origin, or centre of rotation.

Note: The Anchor point and Start Spot are each associated with a particular PolyObj by assigning the PolyObj's identifying number to the Facing Angle field of each of these THINGS. The PolyObj stuff was done before any of the THING ID special code was implemented, so Raven did this temporary hack, which became permanent, as the designers had already done a ton of PolyObjs, and didn't want to have to go back and replace them!

The relocation of the PolyObj is done by maintaining a constant spatial relationship between the PolyObj's lines and its anchor point while that anchor point is shifted to the designated Start Spot (each tagged to the PolyObj lines through their Facing Angle value).

 


 The operation of PolyObjs

↓bottom↓   ↑Menu↑   ↑top↑

 

The operation and actions of PolyObjs is triggered through the use of the PolyObj Special Actions. Through these special codes, the lines of the PolyObj can be made to move and rotate. Particular sounds can be associated with them, too. These sounds are assigned at the time the PolyObj is defined with the PolyObj_StartLine or PolyObj_ExplicitLine Specials.

The two different types of Start Spots determine whether the action of the PolyObj will be crushing or not. When a PolyObj moves and strikes an object, it will first attempt to move it. If that fails it will then either try to damage the object, or just stop moving depending upon the type of Start Spot.

In addition to moving itself, a PolyObj's actions can also be mirrored by a second PolyObj. This Mirror PolyObj is again specified in the definition of the PolyObj through the PolyObj_StartLine or PolyObj_ExplicitLine Specials.

The Mirror PolyObj acts as a true mirror of the first. For instance, if a PolyObj is rotated to the right by 90 degrees, then that PolyObj's mirror will rotate left 90 degrees. Note that having two PolyObjs mirror each other is not considered to be a good thing, but in general won't cause problems because a PolyObj can only do one particular action at a time, so won't be free to participate in any conflicting actions that may be demanded of it as a mirror.

 


 Summary of steps involved in making a PolyObj

↓bottom↓   ↑Menu↑   ↑top↑

 

Here, then, in summary is how to build a PolyObj:

  • Draw the lines making up the object. Most PolyObjs will be viewed only from their "outside", so draw a complete shape, with the right sides facing out. Place this shape in unused space, well away from normal map lines.
  • Assign the 1: PolyObj_StartLine Special to one of the lines of your PolyObj, if it is a simple convex shape; or 5: PolyObj_ExplicitLine to all of its lines if the shape is more complex.
  • Set the first argument byte of the lines to which you just assigned the defining PolyObj specials to a number unique to this PolyObj. If using the or 5: PolyObj_ExplicitLine method, make sure that all lines have the same number in this byte.
  • If using the 5: PolyObj_ExplicitLine method, work around the lines of the PolyObj, setting each line's second Special Argument byte to the rendering order for that line.
  • Put the identifying number of this PolyOnj's mirroring PolyObj in the appropriate Special Argument byte of each of the above defining lines.
  • Place an Anchor Spot at your PolyObj's centre of rotation. Set its Facing Angle to the identifying number of the PolyObj.
  • Build an appropriate space in your map for the PolyObj to occupy during play. Make sure the space is big enough to take the object, otherwise it may look a little odd, I'd guess.
  • Place a StartSpot of the appropriate type (crushing or non-crushing) where you want the PolyObj's Anchor Spot (and the PolyObj with it!) to be moved to as the level loads. Set its Facing Angle to the identifying number of the PolyObj.
  • Finally, set up appropriate trigger events to activate your PolyObj, using the PolyObj Special Action Codes
  • Voilà!! Simple, or wot??

 


+  ↑ Menu ↑  HTML-Version new styled on Nov 2008 by Dieter Heinrich  ↑ top ↑ 
Home
Flash-Plugin fehlt !