BDLite - a slimmed-down effects mod [RC 2018-12-03]

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are ONLY for YOUR 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.

BDLite - a slimmed-down effects mod [RC 2018-12-03]

Postby DavidN » Sun Oct 07, 2018 1:52 pm

Image



🎵 BdLite, BdLite
🎵 It's like Brutal Doom but without so much shite

BDLite home page

BDLite RELEASE CANDIDATE, updated Dec 3 2018

Trello board

Brutal Doom brought me back to the Doom modding community a couple of years ago. By just throwing together absolutely everything that interested me, I made an episode of my own called Vulkan, after carefully looking around to make sure there wasn't a WAD already called that and overlooking that it was the name of an entire graphics library. It was built on top of Brutal Doom because at the time I loved the pace and effects of it, and it got a surprisingly good reception but people couldn't help noticing inconsistencies like the new enemies not having all the hitbox detection and special death animations that the standard enemies did.

But when I started looking at the Brutal Doom code, I discovered it was... challenging to understand how best to extend it. Mark-IV compiled a ton of content from a lot of disparate mods, producing something that held together when you were playing it but which underneath was an unnavigable mesh characterized by many, many redundant or completely unused classes and a maze of different naming schemes. I also wanted to distance my project from Brutal Doom for various other reasons and to make it my own.

So, perhaps not quite understanding the magnitude of the task ahead, I went in and started rewriting the whole thing, removing the parts that I didn't need and simplifying a lot of the code, with the aim being to keep the idea of a faster and more intense take on Doom but without straying too far from the core gameplay. I also wanted to get it into a state where people could build on top of it without having to understand the terrible guts of it.

For example, this is a diagram of the inheritances and dependencies (one class creating another) of the SMOKE.TXT and adjacent Decorate libraries, with classes that are never spawned or inherited from indicated with XXXX (or a dotted line - I changed the scheme halfway through). Those are just the ones that are 100% never used - some of them will be barely perceptible variants of other classes and could be merged together. Click for a full version...

Image

I'm quite close to something coherent now, so I wanted to start presenting some of my efforts :)
Last edited by DavidN on Mon Dec 03, 2018 10:47 pm, edited 19 times in total.
User avatar
DavidN
 
Joined: 28 Dec 2015

Re: BDLite - a slimmed-down effects mod

Postby DoomKrakken » Sun Oct 07, 2018 2:23 pm

First question... when can I download? :D

Also, I'm gonna show this thread to the dudes over at the new Project Brutality Discord Server. Maybe they could learn a thing or two from the project in order to help optimize the entire project (once it's available to download)!
User avatar
DoomKrakken
Avidly Anonymous Suggester. Hardcore Catholic Gamer. Problem? PM me.
 
Joined: 19 Oct 2014
Location: Plahnit Urff
Discord: DoomKrakken#2719

Re: BDLite - a slimmed-down effects mod

Postby RikohZX » Sun Oct 07, 2018 2:37 pm

Two things i'd already like to note: one, reloading the assault rifle (manually or auto via empty) basically erases every single spare bullet you've got. Second, i'd recommend making the reload key the GZDoom standard rather than having it as its own bound key.
User avatar
RikohZX
 
Joined: 04 Sep 2012

Re: BDLite - a slimmed-down effects mod

Postby Gorman Frebmane » Sun Oct 07, 2018 4:03 pm

Clean brutal doom code? you mad man.
This also means one thing, you've deffinetly gotta make the gore effects not model based anymore because they seriously cause some attention grabbing overlapping and float on ledges.
Gorman Frebmane
 
Joined: 13 Jan 2018

Re: BDLite - a slimmed-down effects mod

Postby RedoLane » Sun Oct 07, 2018 4:19 pm

Very, very interesting.
I'd like to see how this project turns out, because I do think that BD went too far ahead and made things less fun.
Since BDLite is more simplified, it might also run way smoother on my PC(even though I have a modern rig, I still had framerate issues with BD).

Gonna keep an eye on this thread from now on. good luck! :)
User avatar
RedoLane
 
Joined: 08 Dec 2017
Discord: #7295

Re: BDLite - a slimmed-down effects mod

Postby dawnbreez » Sun Oct 07, 2018 4:29 pm

I appear to be unable to select the Super Shotgun. Opening in SLADE reveals that there's no SlotNumber defined for SSG. Do you have a Github? I'd do a pull request but I wouldn't know where to send it.

Also, ZScriptifying this should be easy--clean DECORATE should only need some window dressing to work as ZScript. You'll need to put the actor's properties in a "Default" block, like so:
Code: Select allExpand view
Default
{
  Health 100;
  Obituary "You are ded. Not big surprise.";
  // and so on
}


And you'll need to add semicolons at the end of each line of code and each frame within the state:

Code: Select allExpand view
States
{
  TNT1 AAAAAAAAA 0; //maximum agitation
  BON1 A 1; //that's better
}


You'll also be able to take stuff like this:
Code: Select allExpand view
TNT1 A 0 A_Something;
TNT1 A 0 A_SomethingElse;

And turn it into this:
Code: Select allExpand view
TNT1 A 0
{
  A_Something;
  A_SomethingElse;
}

Which is more readable and harder to accidentally add frame delays to.
dawnbreez
 
Joined: 08 Jul 2015

Re: BDLite - a slimmed-down effects mod

Postby Samarai1000 » Sun Oct 07, 2018 4:58 pm

Even with the WIP snapshot, I'm extremely excited for this project. My biggest issue with Brutal Doom, aside from its creator, is the superfluous options and insane feature creep that manages to detract from the experience. This, even in its admittedly buggy state (It's a work in progress, I'm not expecting anything other than bugs!) is impressive. The standardized blood effects look great and vaguely remind me of Blood or Nashblood. (Though that's a bit redundant to say :P)
If there's one criticism I could give, some of Brutal Doom's death animations feel a bit excessive compared to the weapon you're using. This is absolutely a personal taste thing, but it feels odd that a medium-range shotgun blast can tear an enemy in half or render an entire Imp into chunks. Still, that's a fault of Brutal Doom's inconsistent gore, not your own work.
The assault rifle firing in bursts confused me a little at first, but I actually like it a lot! It means that Zombiemen firing in bursts makes sense from a logic perspective now, rather than just a game balance perspective.
The kick could do with a bit more animation, at least on the weapon itself rather than having it disappear during the kick, but that's probably planned. The kick itself also feels a little less useful due to the removal of BD's weird knockdown mechanics. I'm alright with them being gone, I just think maybe the kick could use some extra utility so as to not feel redundant, since we already have our fists. (Though, being able to use a melee attack while holding a weapon is still pretty useful.)

Anyways, out-of-order feedback aside I'm super excited for this, you've done a great job so far! Good luck!
Samarai1000
 
Joined: 25 Sep 2016

Re: BDLite - a slimmed-down effects mod

Postby GAA1992 » Sun Oct 07, 2018 6:48 pm

I've tried cleaning the inner spaghetti from BD long ago. Sometimes i was so stressed out navigating through files that i started to think this is exactly what the original author wanted: to make a messy file only him could understand and prevent people to clean it.

No wonder the frame rate on a mod weighing roughly 20MB was ground level.

I wish you luck and i hope to see this mission accomplished.

EDIT: Are you going to keep the manual reload keybind system?
User avatar
GAA1992
Demons are a disease. Meet the cure.
 
Joined: 04 Jun 2015
Location: Killing spiders.

Re: BDLite - a slimmed-down effects mod

Postby HorrorMovieGuy » Sun Oct 07, 2018 7:46 pm

This is pretty neat. I've attempted something similar before, keeping only the gore and making everything else pretty much 1:1 with vanilla gameplay in my case, but I gave up when I saw all the spaghetti code and other Mark'isms. I think you're on to something good here, I'll keep an eye on this mod.
User avatar
HorrorMovieGuy
world is a fuck
 
Joined: 24 May 2013
Location: Somewhere in the Brazilian Jungle

Re: BDLite - a slimmed-down effects mod

Postby Valken » Sun Oct 07, 2018 7:59 pm

Awesome project... Yes please share your code with the PB guys so they can optimize their mod as well!

Maybe REDEM will see this and make an ROK compatibility patch for it but I do like the hitboxes and fatalities...
Valken
 
Joined: 08 Jun 2015

Re: BDLite - a slimmed-down effects mod

Postby DavidN » Sun Oct 07, 2018 9:36 pm

Wow, thanks for the responses so far - this is honestly a lot more interest than I was expecting and I'll take all comments on board! I'm not quite in a position to open up pull requests just yet, but setting up a Github for it is a great idea and I'll get one going. The bug with the Rifle reload is a result of confusing myself with something that I did quite recently, and makes a good jumping on point for talking about the weapons, which were the first thing I tackled for the renovation. (I also forgot that I'd kept the burst feature in! It was intended for the new version of Vulkan, which is building on this.)

EDIT: I've altered this post to reflect some updates to how weapons work (1st Nov 2018)

Weapons!
Brutal Doom's weapons are... large. They all extend the base class Weapon or their equivalents from Doom, and it's typical for a definition to be about 500 lines. A lot of that bulk is made up of copy and pasted code that handles the special keys and the animations for them. For example, take the definition of the rifle from RIFLE.TXT:

Spoiler: BrutalDoomV20 Rifle class


Initial tidying
The most obvious way to tidy this up was changing the weapons so that they all inherited from a superclass - I've called mine BdLiteWeapon. This sets up the standard flags that are common to all weapons, as well as providing the labels to handle the special attacks (grenades and kicks - I've removed the other taunts, salutes and variations of the kick attack). In this class, it's important not to use Goto for any states, because at runtime this causes any inheriting subclass that reaches that line to jump to the label in the superclass. Instead, A_Jump(256, "Label") is used, which passes back to the subclass.

Another thing to address was the large string of A_GiveInventory and A_TakeInventory commands whenever a new weapon was selected - all the flags for selected weapons are Taken, apart from the one mentioned in this weapon class which is Given. I could have kept this in by putting all the Takes into the superclass and doing a single Give on each subclassed weapon when it was selected, but seeing as these things had so little use I opted to remove them entirely.

Finally, I could remove all the commented-out lines, and take out any ability to alt-fire or dual-wield, cutting down the required labels and states considerably.

Ammunition types
Even with the kick/grenade code safely up in BdLiteWeapon and a lot of the extraenous stuff removed, the Rifle class is still pretty confusing. What, for example, is a RifleAmmo and how does it differ from a Clip2? For the rocket launcher, are RocketRounds and RocketAmmo interchangeable? What's the logic behind how we give and take all this inventory? Well, the ammo situation is victim to a very inconsistent naming scheme - the idea is that in addition to the player's reserve of different types of ammunition in their backpack, each weapon has an ammo type that represents the ammunition currently loaded into it. For the rifle, the reserve is called Clip2 and the current loaded ammunition is RifleAmmo. But on the rocket launcher, the RocketAmmo is the reserve and the rockets that are loaded are called RocketRounds. Obviously this was in need of changing, so the standard is now (where ___ is the name of the weapon):

___Ammo = The ammunition that you pick up from the game environment, and that represents the player's reserve.
___AmmoLoaded = Ammunition that's in a weapon. When a weapon is reloaded, it will subtract as much as it can fit from the player's corresponding "___Ammo" stock and refill itself.

Some weapons don't require reloading, and just pull straight from the stock of ___Ammo instead.

Special keys
I haven't looked deeply into the code for many other mods so I'm not sure if this is a standard thing, but Brutal Doom handles its special key commands by giving the player an inventory item when they're pressed and leaving it up to the weapon to handle those. For example:

Code: Select allExpand view
   Ready:
        TNT1 A 2 A_JumpIfInventory("GoFatality", 1, "Steady")
      
        TNT1 A 0 A_PlaySound("CLIPIN")
        RIFS ABC 1
        TNT1 AAAAAAAA 0
        TNT1 A 0 //A_JumpIfInventory("RifleAmmo",1,2)
        //Goto Reload
        TNT1 AAAA 0

        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
      TNT1 A 0 A_JumpIfInventory("Salute1", 1, "Salute")
      TNT1 A 0 A_JumpIfInventory("Salute2", 1, "Salute")
        TNT1 A 0 A_JumpIfInventory("Reloading",1,"Reload")
      TNT1 A 0 A_JumpIfInventory("Unloading",1,"Unload")
      TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
      TNT1 A 0 A_TakeInventory("RifleSpread", 5)
      RIFG A 1 A_WeaponReady
      TNT1 A 0 A_TakeInventory("UsedStamina", 1)
      
        Goto Ready+9


There are actually a few things to point out about this state of Rifle. The first is generally what the state is doing - there are a ton of empty states that are continuously checking for the presence of special inventory flags while the weapon is in its ready state. These are named a bit misleadingly - if the player has a "Reloading" item, it doesn't mean that they're currently reloading - just that the key has been pressed to start a reload. This state checks for the presence of that item, then jumps to Reload, which clears the item from the inventory - a better name for these might be "ReloadRequested", "KickRequested", etc.

Another is a common thing in the Brutal Doom codebase - Goto commands with large state-label offsets that make it difficult to follow the flow, paired with many lines like "TNT1 AAAAAAAAAAAAAA 0" that don't do anything. My best guess as to why these exist is that they were written before custom labels existed, and that having the large fields of blank states gave the author some leeway in having to only set his offsets just about right. With these present, the Goto would still work as expected even if some code was pulled around before and after the point to jump to, because the Goto would still land somewhere in the middle of that field of blank states even if it was now a couple of states off either way. It's quite an interesting solution to a problem that should never have existed in the first place.

Finally, RifleSpread is an interesting idea - as you hold down Fire, you accumulate more and more of these in your inventory, and if it's over the threshold of 5, the rifle becomes less accurate, encouraging short bursts of fire. UsedStamina, by contrast, does nothing. I removed them both.

Anyway, to handle the special keys - like RikohZX mentioned, I've changed reloading to use the standard GZDoom key (which was added after the initial release of Brutal Doom), meaning the Reloading class is no longer needed. I've also moved kick to alt-fire and grenade to Zoom, allowing the other special inventory flags to be removed. The tradeoff is having slightly confusing label names in the BDLiteWeapon superclass.

Weapon states
Weapon behaviour is now standardized so that they go through a set of expected labels. Because most of the weapons require reloading, the standard labels work slightly differently from the standard Doom ones - if an expected state isn't implemented on a weapon, it will jump to the BdLiteWeapon superclass's label of it instead, which prints an error message to the screen.

The expected labels are:

Spawn: Sprite sitting in the game world.

Select: Is not used! BdLiteWeapon provides this and basically skips it by making a call to A_Raise(60) - once on the screen, weapons provide their own raising animation instead. (But if the standard raise behaviour is desired in a subclass it can be implemented here.)

Deselect: As above - the animation for putting the weapon away is played, then A_Lower is called enough to make the built-in lower behaviour instantaneous.

Ready: This is where the animation for unholstering the weapon is performed. It then falls through to ReadyLoop.

ReadyLoop: Continuously check for the inventory that's Given by using the special attack inputs, and show the weapon in its ready state.

Fire: Actually does a bit more than firing.
- It first checks to see if any ammunition is loaded in the weapon. If there isn't, it will jump to Reload (or just NoAmmo if the weapon doesn't support reloading).
- If that check has passed, it will actually perform the firing animation and spawn all the effects. Ammunition is usually taken manually instead of relying on the secondary effects of the action functions.
- It then returns to ReadyLoop.

Reload: This is the second thing a weapon attempts if it fails to fire because of having no ammunition. It can also be called directly by the player pressing Reload. It checks some conditions and starts a reload if it can.
- Check the weapon's current loaded ammo (___AmmoLoaded) against its capacity. If it's full, there's no need to reload, so return to ReadyLoop.
- Check to see if we actually have any ammunition in the weapon's relevant ___Ammo class. If we do, jump to ReloadAnimate.
- Otherwise, perform any action to indicate we have no ammo left to reload, and return to ReadyLoop.

ReloadAnimate: Where the animation for the reload takes place. The weapon animates with the player inserting a new magazine, or changing the batteries, or filling his Super Soaker or whatever, and then flow continues to ReloadAmmo. You can allow the player to interrupt it (for example, with a check for Kicking) if they suddenly find themselves in a bad place.

ReloadAmmo: Where the actual transfer of ammo happens, through a series of zero-length states that make the transfer happen instantly. This is a loop that continuously checks to see if the weapon can fit more ammunition into it and the player has one in their stock available, and subtracts from the stock and adds to the loaded ammo count. This continues until either the stock is depleted or the weapon is full - then flow returns to ReadyLoop.

Not all weapons fit this pattern - for example, on the shotgun the duties for ReloadAnimate and ReloadAmmo are intertwined, as the player character gradually reloads shells one by one. But in general, following this template makes the weapons a lot more understandable.

As a result of all this, even with the additional burst feature, the Rifle class in BDLite is now 81 lines down from 511. Other weapons experience similarly satisfying results!

Code: Select allExpand view
ACTOR Rifle : BDLiteWeapon Replaces Pistol
{
    Weapon.AmmoGive1 10
    Weapon.SlotNumber 2
    Weapon.SelectionOrder 4500
    Weapon.AmmoType1 "RifleAmmo"
    Weapon.AmmoType2 "RifleAmmoLoaded"
    Obituary "%o was shot down by %k's assault rifle."
    AttackSound "None"
    Inventory.PickupSound "CLIPIN"
    Inventory.Pickupmessage "You got the Assault Rifle!"
    States
    {
    Spawn:
        RIFL A -1
        Stop
    PickUp:
        Stop
    Ready:
        TNT1 A 0 A_PlaySound("CLIPIN")
        RIFS ABC 1
    ReadyLoop:
        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
        RIFG A 1 A_WeaponReady(WRF_ALLOWRELOAD)
        Goto ReadyLoop
    Deselect:
        RIFS CBA 1
        TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
        TNT1 A 1
        Wait
    Fire:
        RIFG A 0 A_CheckReload
        TNT1 A 0 A_JumpIfInventory("RifleBurstCount", 3, "BurstDone") //If we've hit our burst limit, we can't fire
        TNT1 A 0 A_JumpIfInventory("RifleAmmoLoaded", 1, 1)
        Goto Reload
        TNT1 A 0 A_PlaySound("weapons/pistol")
        RIFF A 1 BRIGHT A_AlertMonsters
        TNT1 A 0 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
        RIFF B 1 BRIGHT A_FireBullets (0, 0, 1, 9, "HitPuff")
        RIFF A 0 A_FireCustomMissile("Tracer", 0, 0, -1, -12, 0, random(-1,1))
        TNT1 A 0 A_SetPitch(-1.3 + pitch)
        TNT1 A 0 A_Takeinventory("RifleAmmoLoaded",1)
        TNT1 A 0 A_SetPitch(+0.6 + pitch)
        RIFF C 1 A_FireCustomMissile("RifleCaseSpawn", 5, 0, 6, -6)
        RIFG A 1 A_SetPitch(+0.5 + pitch)
        TNT1 A 0 A_GiveInventory("RifleBurstCount", 1)
        RIFG A 0 A_Refire
    //After releasing fire or having three shots, remove them all and delay a bit before the next burst
    BurstDone:
        TNT1 A 0 A_TakeInventory("RifleBurstCount", 3)
        RIFG A 8
        Goto ReadyLoop

    Reload:
        RIFG A 1 A_WeaponReady
        TNT1 A 0 A_TakeInventory("RifleBurstCount", 3)
        TNT1 A 0 A_JumpIfInventory("RifleAmmoLoaded",ACS_NamedExecuteWithResult("checkCapacity", 1), "ReadyLoop")
        TNT1 A 0 A_JumpIfInventory("RifleAmmo",1,"ReloadAnimate")
        RIFG A 8 A_PlaySound("weapons/empty")
        Goto ReadyLoop

    ReloadAnimate:
        TNT1 A 0 A_PlaySound("Reload")
        RIFR ABCDE 1  A_JumpIfInventory("Kicking",1,"DoKick")
        RIFR F 1 A_FireCustomMissile("EmptyClipSpawn",-5,0,8,-4)
        RIFR G 8
        RIFR HIKL 1
        RIFR M 3
        RIFR NOPQRST 1 A_JumpIfInventory("Kicking",1,"DoKick")

    ReloadAmmo:
        TNT1 AAAA 0
        TNT1 A 0 A_JumpIfInventory("RifleAmmoLoaded",ACS_NamedExecuteWithResult("checkCapacity", 1), "ReadyLoop")
        TNT1 A 0 A_JumpIfInventory("RifleAmmo", 1, 1)
        Goto ReadyLoop
        TNT1 A 0 A_Giveinventory("RifleAmmoLoaded",1)
        TNT1 A 0 A_Takeinventory("RifleAmmo",1)
        Goto ReloadAmmo
    }
}
Last edited by DavidN on Thu Nov 01, 2018 7:58 pm, edited 1 time in total.
User avatar
DavidN
 
Joined: 28 Dec 2015

Re: BDLite - a slimmed-down effects mod

Postby Matt » Mon Oct 08, 2018 2:48 am

🎵 BdLite, BdLite
🎵 It's like Brutal Doom but without so much shite
I'd vote this Mod of 2018 just for this byline. :laff:

......shotgun.... testicles?
User avatar
Matt
Putting the XD into *xdeath since 2007
 
 
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: BDLite - a slimmed-down effects mod

Postby Rachael » Mon Oct 08, 2018 3:06 am

I'm just chiming in to say that I really hope that this mod achieves a ton of success, and gets very popular! Good luck. :)
User avatar
Rachael
QZDoom + Webmaster
 
Joined: 13 Jan 2004

Re: BDLite - a slimmed-down effects mod

Postby dawnbreez » Mon Oct 08, 2018 4:06 am

DavidN wrote:Anyway, to handle the special keys - like RikohZX mentioned, I've changed reloading to use the standard GZDoom key (which was added after the initial release of Brutal Doom), meaning the Reloading class is no longer needed, but the Kicking and TossGrenade classes are still present and being checked for while the weapons are ready.


Just a quick note--there's more than just the Reload key for you to use. Right now GZDoom provides a grand total of EIGHT keybinds for weapons:
  • Fire
  • Altfire
  • Reload
  • Zoom
  • User1, 2, 3, and 4
Typically, users put Fire and Altfire on mousebuttons, and Reload on R; the other keys are personal preference, but I put Zoom on a mouse button as well, and I have user1 thru user4 mapped for my Hideous Destructor playthroughs.

All of that having been said, it'd make a lot of sense to put kick on Zoom and grenade on User1. You have a lot of wiggle room.
Also of note, the UseInventory key is sometimes used to handle offhand items like grenades. You'd need to write a new grenade class, which would be handled entirely differently, but it's an option.
dawnbreez
 
Joined: 08 Jul 2015

Re: BDLite - a slimmed-down effects mod

Postby RikohZX » Mon Oct 08, 2018 4:07 am

Matt wrote:
🎵 BdLite, BdLite
🎵 It's like Brutal Doom but without so much shite
I'd vote this Mod of 2018 just for this byline. :laff:

......shotgun.... testicles?

The infamous nickname for the animated strap the previous version of Brutal Doom had, which bounced every time the gun did anything beyond idle. It was actually removed in later versions, but it stuck around in people's heads I guess.
User avatar
RikohZX
 
Joined: 04 Sep 2012

Next

Return to Gameplay Mods

Who is online

Users browsing this forum: LukasG2004, Spesy, TheMightyHeracross and 13 guests