Page 2 of 3

Re: Aim Assist Mod v0.5

PostPosted: Sat Dec 22, 2018 11:52 pm
by CD-Roman
Simple mod but very helpful for mobile Doom players, nobody like touch controls. Also this can work very nice with gyro controls and most important, can help disabled people to play Doom, bit easier, who cares, Doom is all about fun and killing demons :twisted:

Re: Aim Assist Mod v0.5

PostPosted: Sun Jan 20, 2019 5:18 am
by elCreyo
So, I just have tested this mod with a controller and I gotta say it's pretty fantastic. Really makes the game comfortable to play with the controller.

v0.6 Released

PostPosted: Sun Jan 20, 2019 12:54 pm
by RicardoLuis0
Thank you, everyone, for the feedback. Version 0.6 is released, with some bug fixes and a better obstruction handling method. If you find any bugs, don't forget to report here so that I can fix them.

Download v0.6

Spoiler: Changelog

Re: Aim Assist Mod v0.6

PostPosted: Sun Jan 20, 2019 9:28 pm
by Nash
This makes playing with an Xbox 360 controller on the PC much more bearable. Good job. :D

Re: Aim Assist Mod v0.6

PostPosted: Tue Dec 31, 2019 2:05 pm
by cybie69
Does this work with mouse aiming? Can it be used in conjunction with weapons mod where the recoil causes the gun to jerk upwards slightly making it annoying to recenter in the heat of a hoard of monsters effectively?

Re: Aim Assist Mod v0.6

PostPosted: Wed Jan 29, 2020 10:13 am
by Nash
So recently I tried this mod on a spare - and underpowered - laptop. It's great to be able to play GZDoom on-the-go with a controller, but one thing I noticed is that the think time chokes a lot when this mod is paired with my gore mod, when there are a lot of gib pieces littered on the floor.

Easiest way to test this is, at the exit room of E1M1 with the two barrels, just blow up the barrels so that the zombies behind the fence smash into gibs. When walking towards the gibs, with the lamps in view, FPS drops a lot.

I have tried to disable obstruction-checking in the AA menu but it doesn't make things better.

Can you tell me more about what your algorithms are doing? I'd like to see if there's anything I can do from my side to make the gibs not slow down this mod.

Re: Aim Assist Mod v0.6

PostPosted: Wed Jan 29, 2020 10:47 am
by TheRailgunner
cybie69 wrote:Does this work with mouse aiming? Can it be used in conjunction with weapons mod where the recoil causes the gun to jerk upwards slightly making it annoying to recenter in the heat of a hoard of monsters effectively?


Exactly this - I've been running AAM 0.6 with The Trooper for a little while (which the assist factor set to 0.1 and a seek angle of 6 - anything above this makes AAM a little TOO forceful for simulating Bungie-style aim assist), and I've been quite pleased with what it does for follow-up shots and recoil management (I had to make some changes to the headshot hitboxes to allow AAM to target them - beyond a certain distance, it favors the body hitbox more strongly).

Basically, I'm using it to complete a sense of modernness in my Doom experience, to great effect. The only real downsides are that it makes missile weapons a little more problematic (particularly slow-moving missiles, which need their target to be led, making aim assist a handicap) and AAM reacts to enemies hiding just outside of the player's sight line. Not terribly inconvenient - in fact, slightly helpful.

Re: Aim Assist Mod v0.6

PostPosted: Wed Jan 29, 2020 4:25 pm
by retronutcase
I love what this mod does, but it does seem to cause sync issues if it's used in a multiplayer co-op session. Any idea if this could somehow be addressed?

Re: Aim Assist Mod v0.6

PostPosted: Wed Apr 08, 2020 3:50 pm
by RicardoLuis0
Nash wrote:Can you tell me more about what your algorithms are doing? I'd like to see if there's anything I can do from my side to make the gibs not slow down this mod.


Sorry for taking so long to answer, i've taken a bit of time off from doom modding because i was (and still am) in the last stretch of university, and am only really coming back now.

Basically what the mod does, is it does multiple line traces (in a circular pattern), and checks if it hit an actor. If it did hit an actor, it checks if it was a non-friendly monster, and if yes, it checks the distance, and if the distance is closer than the previously hit monster, it sets that one as the closest. There are two checking methods, one of them checks all of the radius that was set in the config, and the second one, probably best for performance, only checks the outer radiuses if the previous one it checked didn't hit any monster (sorry if it's hard to understand), all the heavy calculation and obstacle checking only happen after this one closest target was found, and only pertaining to that target.

Re: Aim Assist Mod v0.6

PostPosted: Wed Apr 08, 2020 4:01 pm
by RicardoLuis0
retronutcase wrote:I love what this mod does, but it does seem to cause sync issues if it's used in a multiplayer co-op session. Any idea if this could somehow be addressed?


Sorry, i'm not very knowledgeable in what causes and how to prevent de-syncs, i'll try researching, but can't promise anything.

Re: Aim Assist Mod v0.6.1

PostPosted: Mon Mar 29, 2021 2:34 pm
by RicardoLuis0
Version 0.6.1 is out, which fixes the menus in GZDoom 4.0.0+, a slightly bigger update (v0.7) is in development.

Download v0.6.1

Spoiler: Changelog

Re: Aim Assist Mod v0.6

PostPosted: Mon Mar 29, 2021 3:15 pm
by kipo
RicardoLuis0 wrote:Sorry, i'm not very knowledgeable in what causes and how to prevent de-syncs, i'll try researching, but can't promise anything.


This is because you are using consoleplayer, which is different for every player, hence the desyncs.

You can loop through every player and execute your code in each one, something like this:

Code: Select allExpand view
   override void WorldTick(){
      for (int i = 0; i < MAXPLAYERS; i++)
      {
                  if (playeringame[i] && players[i].mo)
                  {
                    doAim(players[i].mo);
                  }
      }
   }


You can also test your code in multiplayer in the same pc, if you excecute one instance of gzdoom as server, and another one as client (the client one pointing to the ip address 127.0.0.1). And alt-tabbing to test each one.

Edit: sorry, I didn't see that comment was very old, you probably already fixed it in the last release.

Re: Aim Assist Mod v0.6

PostPosted: Mon Mar 29, 2021 3:20 pm
by RicardoLuis0
kipo wrote:sorry, I didn't see that comment was very old, you probably already fixed it in the last release.

No, wasn't fixed, last release was just a quick bugfix for the menus, i'm meaning to do a deep dive on multiplayer and to try to add a few features that were requested on the next update (v0.7), thanks for the info!

Re: Aim Assist Mod v0.7, Now with Multiplayer Support!

PostPosted: Wed Apr 07, 2021 8:38 am
by RicardoLuis0
Version 0.7 is out, now with Multiplayer Support!

Download v0.7.2

Spoiler: Changelog

Re: Aim Assist Mod v0.7.1, Now with Multiplayer Support!

PostPosted: Wed Apr 07, 2021 10:08 am
by Nash
I have some suggestions

1) AddOptionMenu automatically adds a line spacing to the top. However, if you move the StaticText "" to the bottom, like so, the spacing would look more graceful against other mods:

Code: Select allExpand view

AddOptionMenu 
"OptionsMenu"{
    Submenu "Aim Assist Options", "AimAssistOptions"
    StaticText ""
}
 




2) GZDoom now has a "simple options" menu. You should add support for it, because otherwise, players who use the simple option won't see the link to the aim assist options.

Code: Select allExpand view

AddOptionMenu 
"OptionsMenu"{
    Submenu "Aim Assist Options", "AimAssistOptions"
    StaticText ""
}

AddOptionMenu "OptionsMenuSimple"{
    Submenu "Aim Assist Options", "AimAssistOptions"
    StaticText ""
}


3) There are a lot of calls to CVar.GetCVar at runtime. This can lead to performance issues, depending on how polluted the player's INI is, because GetCVar's way of searching through the INI is quite slow (source). What you can do is, create some transient CVar variables on the objects that need them, and then populate them one-time to "cache" them. Just check if the variables are NULL, call GetCVar once to populate the variable, then leave it at that. Caching CVar references always leads to better mod performance.

Quick example:

Code: Select allExpand view

class WhateverClass
{
    // transient variables are not saved to the save game and will be null when the save is loaded
    // so you must take care to populate them
    // additionally, CVar variables on classes must be transient otherwise the save will fail
    // that's just how GZDoom works
    transient CVar someCVar;
    
    void SomeFunction
(void)
    {
        // cache the CVar
        if (!someCVar)
        {
            someCVar = CVar.GetCVar("cl_some_cvar", player);
        }
        
        
// if the cache still failed, probably best to just VM abort because the mod won't function properly anyway
        if (!someCVar) ThrowAbortException("Can't cache CVar 'cl_some_cvar'!");
        
        
// now it's safe to get the value out of the CVar
        if (someCVar.GetBool())
        {
            // do whatever
        }
    }
}