Colormaps Vol. I

BLKMAP01 / BLKMAP02:

Turn a section of your map into miserably dark nightmare with this one easy trick.


GRNBRITE:

Extra spooky enemies. Originally from Fruit Salad (later repurposed for OITL and Wormwood):


Range-swaps:

Nothing special, but situationally useful.


You can apply colormaps dynamically by raising/lowering control sectors:



Here's a demo wad with all the effects described above: http://rbkz.net/exp/colormaps1.wad

Here's the lua script which applies a colormap to selected sectors: https://github.com/ribbiks/doom_lua/blob/main/make242c.lua
[edit: link updated to github]

Circularizer Lua

Coordinate transforms are simple to implement and can yield cool results when applied to doom geometry. I like curvy things so polar transforms seemed like fun:

Sunder MAP03, Circularized:




Here's the script itself: circularizer.lua
[edit: Feb 23 2021. updated link to github]

The math is simple, it just maps the bounding box of the level geometry to a ring:



This particular transform has some funny side effects, most notably that sectors at the bottom of the map get crunched together and sectors at the top are smeared and stretched all the way around the periphery of the ring.

There are many other ways to accomplish effects like this. Here's Sunder again, transformed in another way:


I leave you with this parting gift: d2_circle.wad

Multicolor pickups

For some reason the effect of picking up an item is determined by the 4-character prefix of the sprite name, not its thing id. With this you can have multiple versions of a pickup with different sprites:





Here's a minimal example that replaces the invisibility sphere with a differently colored soul sphere:

http://rbkz.net/exp/soul_color.wad

(shoutout to GrainOfSalt, who clued me into this particular effect)
Observations:
i) Projectile mobjs target the mobj that created them
ii) Revenant missiles use the mobj tracer field to track the player
iii) The archvile attack sequence uses the tracer field to place fire sprites

With that in mind:

[CODEPTR]
FRAME 318 = VileAttack


This dehacked places the VileAttack codepointer in the death frames of the revenant missile, so whenever the missile collides with something, it "attacks" its target (the revenant that fired it).

When a mobj M calls the VileAttack codepointer, the codepointer assumes that M->tracer is the fire sprite that is normally spawned during the attack sequence and changes its (x,y) coordinates to that of M->target (i.e. placing fire graphics onto the player). But if M is a revenant missile, then M->tracer is the player, and M->target is the revenant. You are the fire!

fire = actor->tracer;
fire->x = actor->target->x; fire->y = actor->target->y;

Can this be used for something cool? I don't know.

http://rbkz.net/exp/rev_tele.wad