Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
40oz

Doom math

Recommended Posts

What are some circumstances in doom mapping where you use (or can use) math to assist you on your mapping? Whether it be offsetting textures or adjusting floor/ceiling heights

I've made a formula for myself when using the gradient floor heights tool in doombuilder:

higher floor height subtracted by lower floor height divided by the desired step height minus one equals the number of step sectors needed to get to the next level.

(hF - lF)/sH-1 = # of sectors

And plums once made a detailed explanation on how to align textures with the curve linedef tool.

Any other situations where you get the calculator out to assist you with your mapping?

Share this post


Link to post

I use Pythagorean theorem when creating alignment-friendly geometry. But I do it either intuitively, or using trial and error. Definitely not with a calculator.

Similarly the stairs trick described by 40oz, I do this math so intuitively that I almost don't realize it.

The Plums's trick is interesting. Now this time, it might be worth to try a calculator while mapping.

Share this post


Link to post

I found the tan function useful for finding whole number ratios that approximate specific angles:

For constructing Hexagons:

tan 60 = 1.732
tan 30 = 0.577

7/4 = 1.750
4/7 = 0.571

For constructing Octagons:

tan 22.5 = 0.414

2/5 = 0.400

Share this post


Link to post
Urthar said:

7/4
4/7

I admit, I like to use linedefs angled under this ratio, either for triangles / hexagons, or just angled crates or columns.

Share this post


Link to post

For nostril.wad I used the n(n+1)/2 formula to figure out how many monsters I could use before my computer would lag too much (there are 16 hallways, each with 16 rooms that keep getting bigger, one monster type per hallway).

Share this post


Link to post

I keep intellectual stuff out of fun and games. I'm here to rot my brain and degrade!

Share this post


Link to post

Length of rainbow / 96 = Average length of individual sector.
Inevitably there's very few integer solutions, so adjustments are always involved, but that's basically the only calculation I make.

Share this post


Link to post

There's some kind of formula that "wadwhat" uses to determine the difficulty of a map, but I never much cared about that. My only use for math was to align textures in DEU-based editors, or sometimes increment/decrement light levels by steps of 16.

Share this post


Link to post
hex11 said:

My only use for math was to align textures in DEU-based editors,


How do you align textures that way if you don't mind me asking? When I started mapping I had the privilege of using doombuilders 3D mode and autoalign. I've never really keyed in actual offsets.

Share this post


Link to post
40oz said:

How do you align textures that way if you don't mind me asking? When I started mapping I had the privilege of using doombuilders 3D mode and autoalign. I've never really keyed in actual offsets.


Every sidedef has X and Y offsets for texture alignment, and these can be positive or negative numbers. The useful range is typically between -127 to 128 (assuming a 128 wide/high texture). Using too big or small a number is pointless because the texture just "repeats" X number of times, depending on how many multiples of the original texture size you exceeded. Anyway that's not the hard part, which is actually figuring out in which direction the texture gets drawn by the engine. And that depends on whether you're editing a lower, upper, or middle texture, and if it's unpegged, and also if it's part of a one or two-sided linedef. Doom just draws things differently based on different combinations of those factors. This book explains it really well:
http://archive.org/download/cdrom-doom-level-master-2/Instant.Doom.Levels.-.Level.Master.II.iso/EBOOK%2FDOOMGURU.PDF

With DEU, it really helps to keep the length of your linedefs in multiples of the texture size, because then there's basically no alignment needed. Second best case is to use linedefs that are multiples of 32 or 16 long (or maybe even 8) because that keeps the math relatively simple. But it can get hairy if you start using lots of lines of arbitrary size everywhere in your map. Well, DEU does in fact have a texture-alignment menu function, but it doesn't seem to work in all cases. I had some transparent midtextures in a circle pattern that this tool did nothing useful with, and they were too much trouble to align manually, so I just took them out of that map.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×