Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 9 10 [11] 12 13 ... 16

Author Topic: Pathfinding is not a major cause of FPS death  (Read 59700 times)

jipehog

  • Bay Watcher
    • View Profile
Re: Pathfinding is not a major cause of FPS death
« Reply #150 on: January 17, 2023, 03:37:37 am »

In layman's terms there is an endless war for performance vs features. While programmers find creative ways to handle various scenarios and optimize their code and our hardware improve, in the end there the only way to stifle the end game lag in such games is by placing limits on what can be done.

How programmers do their magic is rather technical, one should have at least some background before assuming they know better than the person who actually sees the code. Otherwise, as player, while I find this curious at time, I usually care about what I can do improve my gameplay and sometime vent my frustration in silly ways  :P
« Last Edit: January 17, 2023, 04:59:14 am by jipehog »
Logged

IronGremlin

  • Bay Watcher
    • View Profile
Re: Pathfinding is not a major cause of FPS death
« Reply #151 on: January 17, 2023, 06:40:39 pm »

At some point you have to bound some aspects of what the simulation handles per tick, but that's not quite the same thing as saying that you have to bound what is possible.


There is a lot of trickery that you can get away with in terms of deferring processing or decreasing precision, as well as just "vanilla" optimizations to reduce the amount of work that gets done.


So as a professional I strongly disagree with the idea that the ONLY way to prevent lag is to limit the player - there's a big toolbox to draw from there. Also the idea.that FPS death is an inevitability with the game as it currently stands is totally ridiculous and abjectly false.


However, I completely agree that armchair software development is at best a futile effort - it's pretty arrogant to assume that you know THE solution to a problem without ever seeing the project source. I don't think there's anything wrong with theorizing possible causes of slowdown per se, but things like "oh well you really just need to use multithreading" is obtuse and condescending on a good day.
Logged

ayy1337

  • Bay Watcher
    • View Profile
Re: Pathfinding is not a major cause of FPS death
« Reply #152 on: January 21, 2023, 05:56:42 pm »

However, I completely agree that armchair software development is at best a futile effort - it's pretty arrogant to assume that you know THE solution to a problem without ever seeing the project source. I don't think there's anything wrong with theorizing possible causes of slowdown per se, but things like "oh well you really just need to use multithreading" is obtuse and condescending on a good day.
Is throwing more cores at a highly CPU bound problem really being obtuse or just a logical conclusion? Optimizations are always good but at a certain point your choices really are 'do less' or 'more compute'
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: Pathfinding is not a major cause of FPS death
« Reply #153 on: January 21, 2023, 06:35:15 pm »

Is throwing more cores at a highly CPU bound problem really being obtuse or just a logical conclusion? Optimizations are always good but at a certain point your choices really are 'do less' or 'more compute'

You're assuming it's CPU bound rather than memory bound.
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

ayy1337

  • Bay Watcher
    • View Profile
Re: Pathfinding is not a major cause of FPS death
« Reply #154 on: January 21, 2023, 08:34:40 pm »

Is throwing more cores at a highly CPU bound problem really being obtuse or just a logical conclusion? Optimizations are always good but at a certain point your choices really are 'do less' or 'more compute'

You're assuming it's CPU bound rather than memory bound.
It's more of an educated guess seeing as the utilization of one core is always 100% when playing the game.

In the interests of being thorough though I went and underclocked my CPU to 2ghz from 3.7ghz and my FPS went from 38 to 20
And then returning the CPU to normal underclocked my ram from 3200mhz to 1600mhz and found my FPS went back to 38
Logged

eerr

  • Bay Watcher
    • View Profile
Re: Pathfinding is not a major cause of FPS death
« Reply #155 on: January 21, 2023, 10:51:21 pm »

Oh yea, another check: in earlier versions, making the surface unpathable for wild animals, especially intricate operations of mining or large amounts of open magma, would cause lag. has that been fixed?
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Pathfinding is not a major cause of FPS death
« Reply #156 on: January 22, 2023, 12:03:09 am »

Is throwing more cores at a highly CPU bound problem really being obtuse or just a logical conclusion? Optimizations are always good but at a certain point your choices really are 'do less' or 'more compute'

You're assuming it's CPU bound rather than memory bound.
It's more of an educated guess seeing as the utilization of one core is always 100% when playing the game.

In the interests of being thorough though I went and underclocked my CPU to 2ghz from 3.7ghz and my FPS went from 38 to 20
And then returning the CPU to normal underclocked my ram from 3200mhz to 1600mhz and found my FPS went back to 38

underclocking your RAM that much isn't going to matter much when it takes well over 100 clocks to even get to the RAM in the first place

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Re: Pathfinding is not a major cause of FPS death
« Reply #157 on: January 22, 2023, 03:14:48 am »

Is throwing more cores at a highly CPU bound problem really being obtuse or just a logical conclusion? Optimizations are always good but at a certain point your choices really are 'do less' or 'more compute'

You're assuming it's CPU bound rather than memory bound.
It's more of an educated guess seeing as the utilization of one core is always 100% when playing the game.

In the interests of being thorough though I went and underclocked my CPU to 2ghz from 3.7ghz and my FPS went from 38 to 20
And then returning the CPU to normal underclocked my ram from 3200mhz to 1600mhz and found my FPS went back to 38

During my tests in previous years the conclusion always was that the FPS rate is directly proportional to the CPU speed (single core), and in any given CPU doubling this speed doubles FPS. Effectively older CPUs with higher performance of single core were better than new ones. I even make decisions of upgrades of my platforms based solely on expected Dwarf Fortress performance :)
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: Pathfinding is not a major cause of FPS death
« Reply #158 on: January 22, 2023, 10:27:59 am »

Is throwing more cores at a highly CPU bound problem really being obtuse or just a logical conclusion? Optimizations are always good but at a certain point your choices really are 'do less' or 'more compute'

You're assuming it's CPU bound rather than memory bound.
Or cache bound…
Logged
Really hoping somebody puts this in their signature.

ayy1337

  • Bay Watcher
    • View Profile
Re: Pathfinding is not a major cause of FPS death
« Reply #159 on: January 22, 2023, 07:24:16 pm »

Is throwing more cores at a highly CPU bound problem really being obtuse or just a logical conclusion? Optimizations are always good but at a certain point your choices really are 'do less' or 'more compute'

You're assuming it's CPU bound rather than memory bound.
It's more of an educated guess seeing as the utilization of one core is always 100% when playing the game.

In the interests of being thorough though I went and underclocked my CPU to 2ghz from 3.7ghz and my FPS went from 38 to 20
And then returning the CPU to normal underclocked my ram from 3200mhz to 1600mhz and found my FPS went back to 38

underclocking your RAM that much isn't going to matter much when it takes well over 100 clocks to even get to the RAM in the first place
Doubling the amount of time you have to wait for a response from your RAM chip isn't going to make a difference to a task that's bottlenecked by RAM?
Logged

IronGremlin

  • Bay Watcher
    • View Profile
Re: Pathfinding is not a major cause of FPS death
« Reply #160 on: January 22, 2023, 08:31:16 pm »

Is throwing more cores at a highly CPU bound problem really being obtuse or just a logical conclusion? Optimizations are always good but at a certain point your choices really are 'do less' or 'more compute'

You're assuming it's CPU bound rather than memory bound.
It's more of an educated guess seeing as the utilization of one core is always 100% when playing the game.

In the interests of being thorough though I went and underclocked my CPU to 2ghz from 3.7ghz and my FPS went from 38 to 20
And then returning the CPU to normal underclocked my ram from 3200mhz to 1600mhz and found my FPS went back to 38

underclocking your RAM that much isn't going to matter much when it takes well over 100 clocks to even get to the RAM in the first place
Doubling the amount of time you have to wait for a response from your RAM chip isn't going to make a difference to a task that's bottlenecked by RAM?

If you dispatch a porter who travels one mile per hour one mile away, it'll take 2 hours for a round trip.

If you dispatch 6 porters over the course of 1 hour, you'll get back 6 times as much shit, but your shit still won't arrive until 2 hours post dispatch no matter how frequently you are sending the porters.

Case in point, sometimes you don't get to decide WHERE to ask for information in RAM until after you get a response back FROM RAM, visa vi, if your bottleneck is latency, your bottleneck is latency, and clockspeed won't do shit for you (within sensible ranges).
Logged

ayy1337

  • Bay Watcher
    • View Profile
Re: Pathfinding is not a major cause of FPS death
« Reply #161 on: January 22, 2023, 11:13:32 pm »

Doubling the amount of time you have to wait for a response from your RAM chip isn't going to make a difference to a task that's bottlenecked by RAM?

If you dispatch a porter who travels one mile per hour one mile away, it'll take 2 hours for a round trip.

If you dispatch 6 porters over the course of 1 hour, you'll get back 6 times as much shit, but your shit still won't arrive until 2 hours post dispatch no matter how frequently you are sending the porters.

Case in point, sometimes you don't get to decide WHERE to ask for information in RAM until after you get a response back FROM RAM, visa vi, if your bottleneck is latency, your bottleneck is latency, and clockspeed won't do shit for you (within sensible ranges).
RAM latency is measured in multiples of its clock cycle time, i.e. lower clock speed directly translates to higher latency because a given operation will take x clock cycles. So yes increasing clock speed will do shit for you.
« Last Edit: January 22, 2023, 11:20:55 pm by ayy1337 »
Logged

IronGremlin

  • Bay Watcher
    • View Profile
Re: Pathfinding is not a major cause of FPS death
« Reply #162 on: January 23, 2023, 05:24:16 am »

A clock speed of 3200 mhz means you get 3 billion operations in a second, but no force of nature can make electric potential travel from your CPU to RAM and back again in a third of a nanosecond, as that would violate general relativity.


When you talk about RAM latency, you're usually talking about the dead interval between send/receive, which is determined by clock speed as you say.
 I'm a network guy, so when I say "latency" I mean signal latency, not time RAM spends waiting to communicate. Sorry for the mismatch in terminology.

Signal latency is hard locked here to the amount of time it takes charge to propagate from RAM to CPU - not sure on exact specifics but it'd take a photon about a nanosecond to round-trip so it's going to take an electron a fuck of a lot longer (as elementary particles measure such things, at least).


Upshot is that if you have a bunch of operations to execute in RAM in series, clock speed will make a massive difference, but if you have conditional shit that needs a round trip to CPU to decide what to do next there's an upper limit to how much clock speed can help.
Logged

ayy1337

  • Bay Watcher
    • View Profile
Re: Pathfinding is not a major cause of FPS death
« Reply #163 on: January 23, 2023, 06:00:01 am »

A clock speed of 3200 mhz means you get 3 billion operations in a second
Sort of, actually DDR (double data rate) frequency quoted is twice the actual clock speed because it transfers data twice per clock cycle, so it's 1.6 billion clock cycles per second. But the actual operations like set row to read, read a column etc. take several clock cycles - let's say 15 because that's what mine takes. So it's about 10ns just in the latency for the ram chip to respond, which works out to around 33 clock cycles of my CPU unless I'm mistaken, so I'm thinking halving the memory clock would increase the inherent latency on the chip to a full 66 clock cycles.

But anyway, neither the RAM chip's latency or the delay waiting for the signal to carry through the little wires from RAM to CPU would be increased by underclocking the CPU so I don't see how a highly memory bound workload would show such a direct correlation with CPU clock speed.
« Last Edit: January 23, 2023, 06:04:03 am by ayy1337 »
Logged

jipehog

  • Bay Watcher
    • View Profile
Re: Pathfinding is not a major cause of FPS death
« Reply #164 on: January 23, 2023, 06:08:20 am »

So as a professional I strongly disagree with the idea that the ONLY way to prevent lag is to limit the player - there's a big toolbox to draw from there. Also the idea.that FPS death is an inevitability with the game as it currently stands is totally ridiculous and abjectly false.
I am talking bigger picture, evidently there is not a single such game where you don't have the late game lag issue, that why these limitations are baked in the design. As simply surmised by @ayy1337 : "Optimizations are always good but at a certain point your choices really are 'do less' or 'more compute'."

Also I said that there is nothing that can be done to prevent late game lag except placing limits (not that necessarily everyone will experience late game lag) you can test that simply by spamming unbound element that effect simulation. That why my fort designs are always conservatives though I would love to run wild with my imagination e.g. building floating islands in the deep with artificial magma/water falls falling between them, around huge statues and fountain alleys everywhere (not the FPS optimized version either), with crazy traps that constantly change map's connection and purify invaders by fire..

p.s. Player feedback and science is always good, the journey has often brought us much insights.

if your bottleneck is latency, your bottleneck is latency, and clockspeed won't do shit for you (within sensible ranges).
True.
Logged
Pages: 1 ... 9 10 [11] 12 13 ... 16