Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Travel Slowdown #72147

Closed
Myfharad opened this issue Mar 3, 2024 · 18 comments · Fixed by #72542
Closed

Auto Travel Slowdown #72147

Myfharad opened this issue Mar 3, 2024 · 18 comments · Fixed by #72542
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Performance Performance boosting code (CPU, memory, etc.) Map / Mapgen Overmap, Mapgen, Map extras, Map display Mechanics: Weather Rain, snow, portal storms and non-temperature environment (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@Myfharad
Copy link
Contributor

Myfharad commented Mar 3, 2024

Describe the bug

I use auto travel alot when im playing cdda, and recently while I auto travel the game slows down a significant amount, and I know that sometimes it happens because of underground labs or alot of monsters. But recently its just been randomly slowing down, and even after Auto Travel is completed the game will continue to stay slowed until I reload.

Attach save file

NewEarth-trimmed.tar.gz

Steps to reproduce

This has been a random problem I've been having and isn't easily repeatable since it just happens randomly. Though it only happens sometimes after Auto Traveling.

EDIT: I believe you need to traverse z-levels to speed encountering Auto Travel slowdowns.

Expected behavior

I expect the game not going into a weird slow down after auto travel is completed

Screenshots

EDIT: https://www.youtube.com/watch?v=QO4Iso4Igxw footage of the slowdown. Use the timestamps in the comments section to find out where the slowdown occurs.

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19045.4046 (22H2)
  • Game Version: 9eaa5d4 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth],
    SpeedyDex [speedydex],
    Stats Through Kills [stats_through_kills],
    Stats Through Skills [StatsThroughSkills],
    Removes Fungus and Ants [myf_ant_fungal_removal]
    ]

Additional context

Removes Fungus and Ants is a mod I made that only prevents any Fungus or Ant map tiles from spawning into the game.

@Myfharad Myfharad added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Mar 3, 2024
@RenechCDDA
Copy link
Member

I'm not seeing any particular (anecdotal)slowdown, and a quick profile shows nothing crazy.
image

@RenechCDDA RenechCDDA added the Code: Performance Performance boosting code (CPU, memory, etc.) label Mar 3, 2024
@hexoby
Copy link

hexoby commented Mar 3, 2024

Same thing is happening to me, it only started after i updated my game.

@Myfharad
Copy link
Contributor Author

Myfharad commented Mar 3, 2024

I'm not seeing any particular (anecdotal)slowdown, and a quick profile shows nothing crazy. image

Yeah its a very random thing that isnt easily repeatable, I'm going to see if I can get maybe a video of it happening? I know without context it just sounds like maybe im auto travelling over a labs, but im positive its happened to me where there are no labs, especially since the slowdown goes away after a quick reload of the game.

@IdleSol
Copy link
Contributor

IdleSol commented Mar 3, 2024

Does it look like this case?
#71419 (comment)

There are pits or bridges nearby. Happens after a significant amount of play time (1-2 real hours). If you save and load, everything is normalized.

@Myfharad
Copy link
Contributor Author

Myfharad commented Mar 3, 2024

Does it look like this case? #71419 (comment)

There are pits or bridges nearby. Happens after a significant amount of play time (1-2 real hours). If you save and load, everything is normalized.

Maybe... but from what I've found out is that traversing z-levels seems to speed up encountering the auto travel slowdowns. So instead of it being a bridge problem in #71419 its instead a z-level oddity.

@Myfharad
Copy link
Contributor Author

Myfharad commented Mar 3, 2024

I was able to capture the slowdown on video. Like I mentioned before it was easier for me to encounter the slowdown after going up and down z-levels before auto traveling. It's uploading to YouTube and I'll post a link to it.

In the video you'll see that my character slows down after climbing a fire lookout tower, then attempting to auto travel. Im not sure how easy it is to see the slowdown, but I do reload so that anyone can compare the slowdown and non slowdown.

@Myfharad
Copy link
Contributor Author

Myfharad commented Mar 3, 2024

https://www.youtube.com/watch?v=QO4Iso4Igxw

I have timestamps in the comments to find out where the slowdown happens, and to compare to a reloaded state.

@IdleSol
Copy link
Contributor

IdleSol commented Mar 3, 2024

F1 = debug menu

  1. Create a default world and character
  2. F1-m-rreveal map
  3. Find the radio tower
  4. Teleport to the tower and go to the stairs to the upper levels.
  5. Do a save game
  6. Establish clear weather: F1-m-w-3
  7. Go up to the tower (level 6) and descend to the ground
  8. Set auto-move to a distant tile (~10 global map tiles)
  9. Go on a journey (kill monsters through the debug menu if you have to)
  10. Pay attention to the speed of movement
  11. When you reach your final destination, change the weather to fog: F1-m-w-6
  12. Start auto-traveling in the opposite direction to the radio tower.
  13. Pay attention to the speed of movement
  14. Change the weather from clear to foggy and compare speeds along the same path.
  15. Load the save.
  16. Repeat steps 6...13. But change the weather order. Before climbing the tower: fog, after reaching the end point: clear.
  • OS: Windows
    • OS Version: 10.0.18362 (21H1)
  • Game Version: 069c4d3 [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth]
    ]

UPD. Slowdown occurs when the weather changes. More precisely, when it does not match the weather, at the moment of climbing to the top of the tower.

I'm not sure this works with any weather pairs.

@Myfharad
Copy link
Contributor Author

Myfharad commented Mar 3, 2024

F1 = debug menu

  1. Create a default world and character
  2. F1-m-rreveal map
  3. Find the radio tower
  4. Teleport to the tower and go to the stairs to the upper levels.
  5. Do a save game
  6. Establish clear weather: F1-m-w-3
  7. Go up to the tower (level 6) and descend to the ground
  8. Set auto-move to a distant tile (~10 global map tiles)
  9. Go on a journey (kill monsters through the debug menu if you have to)
  10. Pay attention to the speed of movement
  11. When you reach your final destination, change the weather to fog: F1-m-w-6
  12. Start auto-traveling in the opposite direction to the radio tower.
  13. Pay attention to the speed of movement
  14. Change the weather from clear to foggy and compare speeds along the same path.
  15. Load the save.
  16. Repeat steps 6...13. But change the weather order. Before climbing the tower: fog, after reaching the end point: clear.
  • OS: Windows

    • OS Version: 10.0.18362 (21H1)
  • Game Version: 069c4d3 [64-bit]

  • Graphics Version: Tiles

  • Game Language: English [en]

  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth]
    ]

UPD. Slowdown occurs when the weather changes. More precisely, when it does not match the weather, at the moment of climbing to the top of the tower.

I'm not sure this works with any weather pairs.

Just did it, and Yup its only when I change the weather on my way back to the radio tower does the game take a nosedive in performance and slows to almost a crawl.

I wasnt sure what you meant by the "speed" but just to reiterate, the in-game character speed stayed at 100 though, but the game itself ended up in incredible slowdown when auto travelling in weather that wasnt the same as the one on top of the radio tower.

@IdleSol
Copy link
Contributor

IdleSol commented Mar 3, 2024

I wasnt sure what you meant by the "speed" but just to reiterate

These are translation problems. Speed of movement in the sense of the speed at which the character moves across the screen. Perhaps it would have been better to use performance?

@Myfharad
Copy link
Contributor Author

Myfharad commented Mar 3, 2024

I wasnt sure what you meant by the "speed" but just to reiterate

These are translation problems. Speed of movement in the sense of the speed at which the character moves across the screen. Perhaps it would have been better to use performance?

Its no problem! But like you said, its definitely the weather difference between the top of the tower and auto travelling that was causing incredible performance slowdown. Is it something that is being looked into?

@IdleSol
Copy link
Contributor

IdleSol commented Mar 3, 2024

I'm not sure. I haven't heard of such a problem. But perhaps the weather is not a cause, but a consequence.

We need to wait to see what more experienced people have to say.

@Brambor
Copy link
Contributor

Brambor commented Mar 3, 2024

I am totally guessing it is related to lighting and caching some light maps. If so, not changing weather but day/night should work too, probably, if the character can see enough.

Also, mutating to something with more / less vision.

Edit: oh, the issue you linked is pretty much about that. Kudos to you, if it is correct!

@IdleSol
Copy link
Contributor

IdleSol commented Mar 4, 2024

If so, not changing weather but day/night should work too, probably, if the character can see enough.

I haven't noticed a decrease in performance when changing day and night.

Perception 20 and Full Night Vision.

@IdleSol
Copy link
Contributor

IdleSol commented Mar 6, 2024

@RenechCDDA

I apologize for the distraction.
Can you try to check the performance when doing the steps:
#72147 (comment)

@SurFlurer
Copy link
Contributor

SurFlurer commented Mar 7, 2024

I can /confirm this does happen. The main difference is caused by build_map_cache .

When foggy:

image

When clear:

image

@github-actions github-actions bot added (S2 - Confirmed) Bug that's been confirmed to exist and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Mar 7, 2024
@SurFlurer
Copy link
Contributor

SurFlurer commented Mar 8, 2024

The main difference is caused by build_map_cache .

This function isn't called more frequently when weather changes ( otherwise it's lot easier to fix ), but it takes longer for a single call.

@KHeket
Copy link
Contributor

KHeket commented Mar 17, 2024

Don't know, will it help, but here is is pr with fog addition #64954

@RenechCDDA RenechCDDA added Map / Mapgen Overmap, Mapgen, Map extras, Map display [C++] Changes (can be) made in C++. Previously named `Code` Mechanics: Weather Rain, snow, portal storms and non-temperature environment labels Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Performance Performance boosting code (CPU, memory, etc.) Map / Mapgen Overmap, Mapgen, Map extras, Map display Mechanics: Weather Rain, snow, portal storms and non-temperature environment (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants