Enhanced AI

Enhanced AI

7M Downloads

1.20.1 Forge TPS Target Fixed

Krimatoria opened this issue · 16 comments

commented

Describe the bug

Oh, I hope you'll be interested. I hope this can be fixed. Because the impact of this problem is very strong.

I was looking for what affects my TPS in a large assembly, and came across one feature that with a large crowd of mobs, sometimes the TPS dropped a lot, and sometimes it was normal, especially when I was somewhere in a tree or in a shelter upstairs, where the mobs could not reach. Although with the same number of mobs that had just been created, sometimes the TPS was normal and sometimes just as bad.

I noticed that as soon as I squatted down so as not to fall on the edge of the block, the TPS immediately returned to normal. When I fully saw the mobs and hung over the block.

After many tests. When I disabled (mobs - enable targets), the problem disappeared, but not completely. As soon as I get to the border of the block, the TPS starts to fall again, but not so much. It feels like mobs are evaluating my visibility when I'm on the edge of blocks (see, don't see, looking for targets)

Maybe you can repeat this and understand what affects the TPS, and this can be fixed with an update if possible, just the more mobs and you are behind an obstacle, the stronger the impact, especially in large builds and waves such as "Hordes" and others such as "Lunar" mods.

Given the significant increase in TPS, such an update was super)

Versions where you encountered the problem (Use the exact version numbers, not 'latest' or similar):

  • Minecraft: 1.20.1
  • Forge: 47.3.0
  • Enhanced AI: 2.4.2
  • InsaneLib: 1.13.5

Steps to reproduce

It was difficult to describe all this, I will attach screenshots to make it clearer.

  1. I just created a world on a superflatt and built a tower of glass to observe the change in settings.
  2. Enable TPS display on alt + f3
  3. I've spawned a large number of zombies as if they were a horde.
  4. Change to nighttime + nigh vision
  5. They saw me right away and all walked to the same point below me. Here the tps drop to fall very much.
    2024-09-15_01 43 30

Target Enabled

  1. You need to sit down so as not to fall and go to the edge of the block, so that you can see the mobs below, you only need a second to see the change in TPS for the better
    2024-09-15_01 43 41

Target Enabled

  1. Go to the settings and disable the target, re-enter your world.
    image
  2. Wait for the TPS to stabilize, you will see the mobs do not see you. Go to the edge and they will run towards you. TPS is normal, the mobs have lost you. You hid on the TPS platform normally.
    2024-09-15_01 48 59
    2024-09-15_01 49 02

Target Disabled

  1. When you get to the edge of the block, you will notice that a slight change in the position of the camera or your position slightly worsens the TPS

Screenshots
2024-09-15_01 26 34
2024-09-15_01 26 19

Logs
There are no errors in the logs, so I didn't attach them.

Can the issue be reproduced with EnhancedAI only (or with a minimal set of mods)?
Yes

ModLIST

  1. suppressopengl1280-1.1.1-1.20.jar
  2. catalogue-forge-1.20.1-1.8.0.jar
  3. EnhancedAI-2.4.2-mc1.20.1.jar
  4. fastboot-1.20.x-1.1.jar
  5. ForgeConfigScreens-v8.0.2-1.20.1-Forge.jar
  6. InsaneLib-1.13.5-mc1.20.1.jar
  7. Ksyxis-1.3.2.jar
  8. no-f3-1.jar
  9. Shut Up GL Error-forge-1.20.1-1.0.0.jar
commented

Can't reproduce. see a slight spike in TPS when you move in and out of a block by sneaking, but it's barely noticeable, can't even profile it with spark.
2024-09-15_07 40 41

commented

So did you reproduce this with Enhanced AI only?

commented

So did you reproduce this with Enhanced AI only?

Невозможно воспроизвести. Виден небольшой всплеск TPS, когда вы входите и выходите из блока, подкрадываясь, но он едва заметен, даже не могу профилировать его с помощью Spark. 2024-09-15_07 40 41

Everything is fine here as it should be. Just a second.

commented

2024-09-15_14 56 29
image

commented

I write through a translator, which is probably why it is difficult to explain correctly. The problem appears when mobs see you through the blocks. Just build a playground like here and stand in the center in survival mode. Vanilla zombies burn during the day, so you need the night.

  1. Switch to the night. Spawn a lot of zombies
  2. The tower is 3 by 3 blocks (or more)
  3. Try to get the maximum number of zombies to see you. While you're on the tower. Walk around.
  4. When most of the zombies see you, go back to the center.
  5. Look at the TPS

2024-09-15_15 46 24
2024-09-15_15 46 40
2024-09-15_15 47 06

commented

The more monsters there are, the bigger the problem.
Here's what Observable + Spark shows

  1. https://observable.tas.sh/p/zZjW/aggregated - You need to open Traces
  2. https://spark.lucko.me/2DqkxglZDg

2024-09-15_15 19 20
image

commented

Can you try again by disabling fisher mobs?

commented

Can you try again by disabling fisher mobs?

The problem still exists 😭
2024-09-15_15 57 16
image

commented

Can you try again by disabling fisher mobs?

I'll try it now.

commented

Send another spark profiling with fisher mobs disabled.
Still next update I've managed a minor improvement to fisher performance.

commented

Send another spark profiling with fisher mobs disabled. Still next update I've managed a minor improvement to fisher performance.

https://spark.lucko.me/A2FHAfaZyr

commented

I don't see anything wrong with it. The biggest coulprit is the avoid goal. Try disabling any flee feature

commented

Can you try again by disabling fisher mobs?

The problem still exists 😭

But TPS is just as bad as it was. And this is vanilla minecraft only with your mod, if you add more mobs from other mods and some Terralith + several players to the server here, it will also aggravate TPS even more, because all players will have such a problem with TPS as soon as the mobs see you through the blocks.

commented

What's your specs?
As said, there's no real coulprit here, except maybe Fleeing.
Also, why are you using such an old version?

commented

What's your specs? As said, there's no real coulprit here, except maybe Fleeing. Also, why are you using such an old version?

Lol 😂 I don't know why I had the old version) Everything has become much better with the new version. I'll test it again, I'll write later in the day and add a screenshot.

I'm just going to sleep right now)

commented

Everything is fine, the problem was due to the old version, thanks for noticing) TPS is normal