Patchwork enemies

Post your example zscripts/ACS scripts/etc here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
Posts: 12
Joined: Sat Mar 04, 2023 8:33 am

Patchwork enemies

Post by N00b »

Before 2017 Blade of Agony used low-resolution sprites for regular enemies, and the immense task of remaking them in high resolution (around 100px tall) was undertaken by DoomJedi. He came up with a proper way to do this, developing a beautiful and realistic human drawing style that is nevertheless standardized.
Blade of Agony currently has a few thousand sprites of this style: various types of Nazi infantry (pistol/rifle/MP40/flamer guards, snipers, officers, Afrika Korps/SS/northern divisions), scientists/mechanics, even Wolf3D mutants, NPCs, and Allied and Soviet soldiers too.

Many of these sprites are very similar. For example, they might only differ in colours (Wehrmacht and Afrika Korps guards), specific parts of clothing (guards and officers), or weapons. For a project I had wanted to start, I had had an idea of unifying them as much as possible - into one type of actor. There are two opportunities that such an unification would provide for the soldier actors:
1. Make them visually unique in a clean and convenient ZScript way instead of having the sprite amount double for each little detail you want to add. Think about hair styles, moustaches, glasses, eye patches, headwear, chevrons, medals, bandages, even blood decals to mark body parts that were damaged while fighting the player; that's, of course, not counting weapons, backpacks, radios, tools, armor vests, boxes in hands...
2. Enhance their AI way easier, for example let them pick up better dropped guns that lie on floor - including heavy weapons and even trophies, or surrender in case they are badly wounded/outnumbered/out of ammo. In BoA only 'weakling' non-soldiers can surrender.

The attached pk3 (132KB) for Doom II contains an example actor (summon PatchHead) that is built from multiple parts, can walk and take damage, and is changed on triggering Pain state:
- on the first Pain state, the actor will gain a peak cap or a helmet;
- on second, he'll become an officer;
- on third, he'll wear an Iron Cross.

1. I most probably won't suggest this for BoA, as these sprites were too great of a time commitment by DoomJedi for just being replaced. The personal project I wanted to use this for quickly became too large to carry out by myself, so I decided to post the technology here.
2. The patches are drawn in the spawn order. I requested a means to control this, but for this purpose it might not be that necessary. If you want to add a backpack, don't forget to attach it to the body before the arms.
3. In case someone is interested I'll post the layered graphical files for 8 rotations (GIMP XCF) that I made out of BoA soldier/officer sprites. I did all the edits manually and then used this GIMP plugin to export them as PNG.
4 (important). You'll easily see a few graphical glitches when the soldier is walking: there will be a small gap between the legs and body, and when the soldier goes sideways, his head will be further than the body. However, the sprites do have correct offsets, and if you freeze the game (with a bound key or console), everything is rendered fine. I had an impression that might be related to interpolation, but changing the warp properties and +DONTINTERPOLATE did not help. To anybody who might know a possible explanation of this or a remedy: please post it here!

Return to “Script Library”