ZDCode is still being maintained. In fact, I added a few nifty features lately. Check the README in the repository for a somewhat comprehensive list (not including minor things like frame unrolling, state keyword parameter expansion, etc).
One of the shiniest additions is the dynamic state modifier block. "Dynamic" is a bit of a misnomer - it is compile-time, as eveything else in ZDCode ever -, but it is very powerful and not too difficult to understand.
A modifier is composed of clauses, where each clause applies a set of one or more effects to a state selector. Modifiers are declared and applied separately, using the class-level mod blocks and the state-level apply blocks, respectively.
- Code: Select all • Expand view
class DiscoZombie extends Zombieman {
mod DiscoLight {
(sprite(TNT1)) suffix TNT1 A 0 A_PlaySound("disco/yeah"); // now we can use TNT1 frames to play some weird sound!
(all) +flag Bright; // Always bright, all the time!
};
label Spawn {
apply DiscoLight {
POSS AB 4;
};
loop;
};
// You can also apply the modifier to other state labels (like See or Missile)
// using the apply syntax, but you get the gist.
}
State selectors can actually use boolean operators, which is cool but in retrospect does not seem all that useful really. But hey, it's cool!
It also supports multiple effects per selector, and effects that take a state as argument (such as prefix or suffix) can actually take a state block, too.
- Code: Select all • Expand view
class LitZombie extends Zombieman {
mod Lit {
// Only lit POSS frames, and only if they have the BRIGHT keyword.
(sprite(POSS) && flag(Bright)) {
prefix invisi A_SpawnItemEx("OooShinyZombieFlare");
-flag Bright;
};
};
label Spawn {
apply DiscoLight {
POSS AB 4;
};
loop;
};
// You can also apply the modifier to other state labels (like See or Missile)
// using the apply syntax, but you get the gist.
}
There is also a more advanced effect, called manipulate, that basically allows you to replace affected states, as you supply a replacement block of states, and may inject the original state as if it were a macro.
- Code: Select all • Expand view
class SpinZombie extends Zombieman {
mod SpinAndRepeat {
(!sprite(TNT1)) {
+flag Bright;
manipulate State {
x 24 {
invisi A_SetAngle(angle + 15);
inject State; // state duration effects (and selectors) will be added soon(TM)
};
};
};
};
label Missile {
POSS E 10 A_FaceTarget;
apply SpinAndRepeat POSS F 8 A_PosAttack;
POSS EDE 10; // phew!..
goto See;
};
}
Also, what about the Zad? The Zad is not necessary. We have many tools, already. SLADE, etc. It would be more productive to add PK3 and UDMF support to Eureka or something, I don't know. Maybe for asset organization and artifact output, such as producing variations of a mod with omitted lumps and different ZDCode preprocessor definitions. Or just building C libraries, I don't know if ZDoom already has some FFI interface for code placed in PK3s or whatever.