Today I posted some MBF-compatible platforming maps made by myself and GrainOfSalt:
There's quite a lot of Dehacked shenanigans in the mapset. Turns out when you completely remove the concept of weapons, ammo, health, and enemies from the game you have free rein to repurpose basically every mobj and their states for other mechanics.
(1) Jumping
The pistol is replaced with an infinite ammo weapon that fires a projectile which calls VileAttack and promptly kills itself. Because projectiles target the mobj that created them the attack hits the player, dealing damage and launching them into the air. To complete the illusion we give the player (effectively) infinite health and blank out all the HUD and pain palette graphics.
This is not a new trick, it goes back to at least 2014, possibly earlier. I don't think many people have designed around it because it basically requires removing the concept of player HP entirely.
The mechanics differ from normal jumping in that the player can fire the weapon while falling, jumping mid-air in a similar manner to how double jumps work in platformers. We treat this as a feature and have designed many gaps around the mechanic.
(2) Gems
The big collectable gems that count towards Kill% are actually immobile enemies with the MBF TOUCHY flag, such that when you make contact with them they get killed. This was coupled with MBF's LineEffect action in their death frames to create the "You need X gems to exit" mechanics.
Each gem has two variants: one that spawns on the ground and the other which spawns on the ceiling. Floating gems are implemented by lowering the ceiling to the desired spawn position in the editor, then having the ceiling raise back up in game when the level begins. Because gems are not affected by gravity they will remain at the altitude where they were spawned.
Pointless trivia: before we made the move to MBF we were trying to make everything work in Boom (well, before I got involved GrainOfSalt was actually trying to keep everything limit removing). The Boom-compatible gem pickup system I came up with at the time was very convoluted:
It used silent invisible enemies in closets constantly walking over teleport lines that were blocked by the gems in the level. When the player picked up a gem the destination is unblocked and the invisible enemy can teleport into the map where the gem once was. At this point it would immediately encounter another set of monster-only teleport lines which take it to another closet where it will walk over triggers to lower a sector in a voodoo closet, thus allowing us to tie arbitrary actions to any particular gem pickup. When the decision was made to shift to MBF I was happy to abandon this setup in favor of the much simpler TOUCHY/LineEffect version.
(3) Snow
Pretty simple: ceiling-spawning enemies that fire a constant stream of 0-velocity projectiles which are affected by gravity. They need to be awakened like normal doom monsters before they'll start firing, which is why each snowy level makes you do a few jumps before entering the main areas (quite convenient that jumping here is equivalent to firing a weapon!)
(4) "Jump Orbs"
The red floating sprites that launch you upward were pretty tricky to get right, and were the first major mechanic made for the project that required MBF codepointers. Here's a condensed summary of how they work:
- Lost Soul is replaced with the new sprite, and is given the SPAWNCEILING and TOUCHY flags.
- When the player touches Lost Soul it calls VileAttack in its death frames, launching the player upward.
- After a few moments, the Spawn codepointer is used to create a replacement orb object in the same spot as the original.
The Lost Soul is the only mobj that could be used for this purpose as its the only enemy that will not fall to the ground when killed. This was needed for them to stay in the air in the same spot each time they respawn.
(5) Meteors
Similar to their implementation in Wormwood ]|[, JUMPWAD has static meteor projectile obstacles which the player needs to avoid. (Though instead of doing damage to you, here they simply push you around).
They function using bouncy walls: meteor projectiles are spawned within a 242-affected sector which has scrolling actions applied to it, pushing it in some direction. The actual spawning is tied to the pain state of another mobj, such that the patterns and refire rates of the meteors could be controlled via voodoo closets.
The Wormwood ]|[ meteors were actually a bit more complicated: because that mapset also had normal doom monsters and combat we had to make some changes to prevent enemies from infighting with the meteor launcher mobjs. The meteor launcher in Wormwood spawns a meteor mobj, and when the meteor collides with something the meteor mobj itself fires an invisible projectile which calls A_Explode and does the actual damage. That way when an enemy is struck by a meteor, the meteor itself is seen as the source of the damage, not the meteor launcher, and because the meteor promptly kills itself after the collision the enemy turns its attention back to the player. Fun stuff!!!
To make my life easier I wrote some lua to generate all the necessary mechanisms automatically: https://github.com/ribbiks/doom_lua/blob/main/meteor_prefab.lua
Resource wad:
JUMPWAD resources and doombuilder configs can be downloaded here: rbkz.net/doom/jumpwad_doombuilder_cfgs.zip