~ubuntu-branches/ubuntu/precise/glbsp/precise

« back to all changes in this revision

Viewing changes to TRICKS.txt

  • Committer: Bazaar Package Importer
  • Author(s): Darren Salt
  • Date: 2008-01-30 13:33:49 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080130133349-kgojg33vyiu8xbvp
Tags: 2.24-1
* New upstream release.
* Bumped the lib soname and the library package name due to one silly
  little binary incompatibility caused by changes in an exported struct.
  (Safe; nothing else currently in the archive has ever used libglbsp2.)
* Removed my patches since they're all applied upstream.
* Updated the list of documentation files.
* Build-time changes:
  - Switched from dh_movefiles to dh_install.
  - Updated my makefile to cope with upstream changes.
  - Corrected for debian-rules-ignores-make-clean-error.
  - Corrected for substvar-source-version-is-deprecated.
  - Link libglbsp, rather than glbsp, with libm and libz.
* Fixed shlibdeps. (Closes: #460387)
* Bumped standards version to 3.7.3 (no other changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
glBSP and Map-Tricks/Errors
 
3
===========================
 
4
 
 
5
1. Self-referencing Lines
 
6
 
 
7
This trick involves linedefs with the same sector reference
 
8
on both sidedefs.  In the original DOOM renderer, segs from
 
9
these lines are virtually ignored (though any mid-masked
 
10
texture is still drawn).  Hence by using a sector which is
 
11
different from the surrounding sector, people could create
 
12
the following special physics effects:
 
13
 
 
14
  1. invisible walkways (self-ref sector floor is higher)
 
15
  2. deep water (self-ref sector floor is lower)
 
16
  3. force fields (self-ref sector blocks movement)
 
17
  4. railings you can jump over.
 
18
 
 
19
glBSP detects these lines and does two things: prevents
 
20
spurious warnings about mismatched sectors, and adjusts
 
21
the final subsector so that the FIRST seg is not one on
 
22
a self-reference line.  It does the latter because most
 
23
engines use the very first seg to decide what sector to
 
24
associate the subsector with.
 
25
 
 
26
Engines should be aware of the trick and perform their
 
27
own analysis to emulate it.  NOTE this trick will cause
 
28
some subsectors to contain segs from multiple sectors.
 
29
 
 
30
 
 
31
2. Overlapping Lines
 
32
 
 
33
This trick is mostly used to make higher mid-masking textures.
 
34
 
 
35
glBSP can detect perfectly overlapping linedefs (ones using
 
36
the same start and end vertices, possibly swapped), and will
 
37
IGNORE them (producing no segs from the second and subsequent
 
38
lines).
 
39
 
 
40
Engines should also detect overlapping lines and emulate
 
41
the trick (by rendering the additional mid-masked textures).
 
42
 
 
43
 
 
44
3. One-Sided Windows
 
45
 
 
46
This trick uses a one-sided linedef where a two-sided linedef
 
47
should be, so the back of the one-sided line faces into a
 
48
normal sector.  In the original DOOM renderer, there was no
 
49
back-facing seg in the BSP, hence you could see through the
 
50
line when viewed from the back.  When viewed from the front,
 
51
the one-sided linedef acted normally (blocked your view).
 
52
 
 
53
glBSP can detect many usages of this trick (although not 100%
 
54
since that would require much more expensive analysis).  It
 
55
has to be explicitly enabled with the -windowfx option (or
 
56
for libglbsp via a field in nodebuildinfo_t).
 
57
 
 
58
When found, glBSP will add a REAL seg along the back of the
 
59
one-sided linedef.  This is the only time that segs are
 
60
placed on a linedef with no corresponding sidedef.
 
61
 
 
62
Engines should detect that and emulate the trick accordingly.
 
63
Depending on how your renderer does occlusion culling, it may
 
64
not be necessary to do anything special.
 
65
 
 
66
 
 
67
4. Missing Lowers/Uppers
 
68
 
 
69
This trick is mentioned since it is very common, though it
 
70
doesn't affect or interfere with node building in any way.
 
71
 
 
72
When the DOOM renderer encounters a missing lower texture,
 
73
and the floor on the back side is visible (z < camera.z)
 
74
then the space where the lower texture should be will be
 
75
filled by that floor texture.  The same thing happens with
 
76
missing uppers too.
 
77
 
 
78
This effect can be used to create a deep water effect, or
 
79
for drawing a dark ceiling over a bright lava sector.
 
80
 
 
81
When the back floor is out of view (z > camera.z), then
 
82
the missing lower is not drawn at all.  Same for missing
 
83
uppers.  This is sometimes used to create "invisible"
 
84
doors and platforms.
 
85
 
 
86
 
 
87
5. Map Errors
 
88
 
 
89
PWADs often contain a few mapping errors in them, and even
 
90
the IWADs contain some small errors, for example:
 
91
 
 
92
  Doom1 E3M2:  Linedef #156 has a wrong sector reference.
 
93
  Doom2 MAP02: Sector #23 is not properly closed.
 
94
  Doom2 MAP14: Linedefs #964 and #966 are missing back sidedefs.
 
95
  Hexen MAP02: Vertex #1370 is not joined to linedef #668.
 
96
 
 
97
glBSP is not psychic and cannot automatically fix errors
 
98
in maps (and besides, sometimes they are used deliberately
 
99
for special effects, as described above).
 
100
 
 
101
When a linedef has a wrong sector reference, the usual
 
102
result is that the subsector (or subsectors) near that
 
103
spot will contain segs belonging to different sectors.
 
104
I cannot say what best way to handle it is -- engine
 
105
developers should at least be aware of the possibility.
 
106
 
 
107
Other map errors are more serious and cause structural
 
108
problems, like degenerate subsectors (which contain only
 
109
one or two segs).  There is nothing glBSP or the engine
 
110
can do in these cases.
 
111
 
 
112
 
 
113
---------------------------------------------------------------------------
 
114