Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 ... 7

Author Topic: major FPS improvement, over 2x!  (Read 10604 times)

Jay

  • Bay Watcher
  • ☼Not Dead Yet☼
    • View Profile
Re: major FPS improvement, over 2x!
« Reply #15 on: February 16, 2009, 05:01:43 pm »

If the pathfinding was improved, think of what people could do. Water elementals actually made of water and stuff
Umm, what?
That has absolutely nothing to do with the pathfinding whatsoever.
A water elemental still moves in exactly the same way as a fire elemental or an iron golem, obviously this extends to bronze colossi which are already in the game.
That's more of a problem with the actual game engine not being set up for water elementals, a fact that is changing next release.

All improving the pathfinding allows is for more creatures without lag.
That's it.
Doesn't change the types of creatures that we can path for, being that we can already pathfind for everything, basically.
Logged
Mishimanriz: Histories of Pegasi and Dictionaries

Apegrape

  • Bay Watcher
  • Stop that, it's silly.
    • View Profile
Re: major FPS improvement, over 2x!
« Reply #16 on: February 16, 2009, 07:03:20 pm »

It frees up a lot of power, therefore you can make more complex thingies.
I'm stupid. Sorry.
Logged
This is -ing good wood!

Fieari

  • Bay Watcher
    • View Profile
Re: major FPS improvement, over 2x!
« Reply #17 on: February 16, 2009, 11:50:02 pm »

Better statement: if pathfinding were improved, Toady could implement realtime lighting and LOS for all creatures, in dwarf mode not just adventure mode.
Logged

Chandrasekhar

  • Bay Watcher
  • [DIES_WHEN_KILLED]
    • View Profile
Re: major FPS improvement, over 2x!
« Reply #18 on: February 17, 2009, 01:49:24 am »

When I saw the thread title, I figured it would be like a penis pill advertisement or something.  "Is your FPS small and impotent, not nearly as big as it was in your fortress's youth?  My FPS got over two times bigger by trying High Traffic!  Now my wife just can't leave my fortress alone!  Thanks, Savok!"
Logged

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: major FPS improvement, over 2x!
« Reply #19 on: February 17, 2009, 02:49:16 am »

You don't need to go all over designating, either. Just go into init.txt and find the entry like this:
[PATH_COST:1:2:5:25]
And maybe replace them with this:
[PATH_COST:1:1:2:10]

I'm preeeeety sure that this will have the same effect.
Logged
A thousand million pool balls made from precious metals, covered in beef stock.

Faces of Mu

  • Bay Watcher
  • I once saw a baby ghost...but it was just a tissue
    • View Profile
Re: major FPS improvement, over 2x!
« Reply #20 on: February 17, 2009, 04:05:35 am »

Don't those figures say you'd need to go around designating all the low traffic areas instead of high? I'd rather be saying "go here" rather than "don't go here". More area in the latter than the former.
Logged

Calculus

  • Bay Watcher
    • View Profile
Re: major FPS improvement, over 2x!
« Reply #21 on: February 17, 2009, 08:19:24 am »

Reducing the tile costs for all traffic areas in the init file should not speed up the game.
Logged

Savok

  • Bay Watcher
    • View Profile
Re: major FPS improvement, over 2x!
« Reply #22 on: February 17, 2009, 11:37:41 am »

You're right.

But it did.

I do wonder why.
Logged
So sayeth the Wiki Loremaster!

Sinergistic

  • Bay Watcher
    • View Profile
Re: major FPS improvement, over 2x!
« Reply #23 on: February 17, 2009, 01:49:52 pm »

Reducing the tile costs for all traffic areas in the init file should not speed up the game.

This does make sense though, since if I understand how the pathfinding algorithm works, if you designate all the traffic areas as high, the pathfinding alforithm will move twice as fast in these areas, and reach the destination much sooner.
Logged

dreiche2

  • Bay Watcher
    • View Profile
Re: major FPS improvement, over 2x!
« Reply #24 on: February 17, 2009, 04:38:19 pm »

I'm also of the opinion that designating *everything* higher shouldn't make a difference (equivalently, changing the init costs). It's not like the algorithm literally goes slower or faster in these tiles, the numbers just tell it how to weight tiles against each other in the calculations.

If it really does make a difference, then it might be a bug.

Now, as for only designating the whole fortress high traffic, not the whole map, I just realized this might actually make a difference *if* the pathfinding algorithm does take into account paths of iteratively increased length depending on their current cost and does not fully explore all paths. 

Basically, either it compares two paths from start two finish, calculates the total cost, and picks the cheaper one.

Or, it calculates the cost one tile at a time. Having found the cheap connection, it does not further explore any other paths that have at least the same cost. Then, in this case, having higher cost tiles outside your fortress would effectively stop the pathfinding looking for paths outside the fortress earlier when compared to paths within the fortress. Which would make sense as most pathing is within the fortress anyway.

Would be nice to hear from the almighty Toad about this...
Logged

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Re: major FPS improvement, over 2x!
« Reply #25 on: February 17, 2009, 05:20:14 pm »

Reducing path costs across the board in the init will make your game go faster!

THAT!  IS!  NOT!  HOW!  PATHFINDING!  WORKS!  AT!  ALL!

Spoiler: anger... (click to show/hide)
« Last Edit: February 17, 2009, 05:23:46 pm by Sowelu »
Logged
Some things were made for one thing, for me / that one thing is the sea~
His servers are going to be powered by goat blood and moonlight.
Oh, a biomass/24 hour solar facility. How green!

Ignoro

  • Guest
Re: major FPS improvement, over 2x!
« Reply #26 on: February 17, 2009, 07:59:58 pm »

Using 100 cats (and nothing else) as embark equipment on a flat desert map, then designating a meeting area in the far corner with no wild animals in their path. This is on an original Athlon 32 bit with 400 Mhz (DDR1?) RAM.

#:#:#:#
Bolded # is designated everywhere. These numbers are eyeballed within 5 FPS of the actual.

1:2:10:25
3x3 Avg 75 FPS
6x6 Avg 55 FPS
9x9 Avg 30 FPS

1:2:10:25
3x3 Avg 80 FPS
6x6 Avg 60 FPS
9x9 Avg 35 FPS

1:1:10:25
3x3 Avg 90 FPS
6x6 Avg 65 FPS
9x9 Avg 40 FPS

The breakdown of speeds over larger map sizes seems fairly regular, so you can sort of project a guess at what it would be for the following tests on 6x6 and 9x9 (About 75% and 40% respectively).

10:10:10:10
3x3 Avg 90 FPS

1:2:1000:25000
3x3 Avg 100 FPS

1:99:999:9999
3x3 Avg 125 FPS

It appears they are relative to each other, as it should be. Bumping up the far end of the scale so far renders those heavy traffic designations near useless, so there is a trade off.
Those tests were horribly unscientific. I hope someone else will do a more official test.
« Last Edit: February 17, 2009, 08:10:29 pm by Ignoro »
Logged

Eagleon

  • Bay Watcher
    • View Profile
    • Soundcloud
Re: major FPS improvement, over 2x!
« Reply #27 on: February 17, 2009, 09:01:23 pm »

Reducing path costs across the board in the init will make your game go faster!

THAT!  IS!  NOT!  HOW!  PATHFINDING!  WORKS!  AT!  ALL!

Spoiler: anger... (click to show/hide)

Er, it's not like people are being hurt by this. If it's true, and there is a bug that's eating cycles in the pathing loop due to the additions made by this feature (which I wouldn't be surprised by, as the path cost designations are a relatively recent addition, and fairly hidden for most players i.e, there hasn't been nearly as much testing), then it helps people to know this until it's fixed in a future release. It also alerts Toady to a possible issue. As far as I've seen, discussion has been pretty tame. No wailing and gnashing of teeth from newbies losing faith in Toady's great coding prowess, no religions being started (The Way of the Blanket Path?), and no one dying because they thought it'd cure their cancer.

TLDR: Calm down and chill out.
Logged
Agora: open-source, next-gen online discussions with formal outcomes!
Music, Ballpoint
Support 100% Emigration, Everyone Walking Around Confused Forever 2044

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Re: major FPS improvement, over 2x!
« Reply #28 on: February 17, 2009, 09:02:14 pm »

*foams at the mouth*

I can't argue with experimental evidence!

I have to question some of the results though.

On a 3x3 with 1:2:10:25, you got 75 fps.
On a 3x3 with 10:10:10:10, you got 90 fps.  I don't see any explanation for this behavior, and the difference between these two (15 fps) IS statistically very significant.

Also, I'm very confused why
3x3 1:2:10:25 (80 FPS)
3x3 1:99:999:9999 (125 FPS)
have any difference at all.  They both use a path cost of '1' designated everywhere, and I don't see any explanation in the current theory (high numbers = slower) for why this would happen.

The current theory says that if everything is designated with path cost 2, it will be slower than everything designated with path cost 1.  The current theory says nothing at all about assigning any other meaning to high/medium/low/restricted, and says nothing about the costs for things that aren't used.

Until we get a theory that does include those, I think I have to say our biggest margin of error in that experiment is 56.25% (two experiments that shouldn't have any difference), while the best 'signal' (a change from 2 to 1 that showed an improvement) is just 20%.

Also it doesn't say why increasing the cost of 'normal' from 2 to 10 gave a speedup of 15 FPS.

Ignoro, I do like your methodologies a lot, they are just giving weird answers!  Would you mind running multiple passes on each test?  Your methodology seems pretty sound but we need more data.

Control for all variables except for the cost of 'normal' designated everywhere...or, if you prefer, all variables except for 'high' vs 'normal' zoning.  Try running five with cost 1 and five with cost 2...but interlace them, so if your CPU is chugging harder at the end, it doesn't bias one scenario more than the other.

You will be my new best friend.  <3  And if we get statistically significant results we'll actually have a good reason to go to Toady about it.

EDIT, Eagleon responded while I was writing:  Eh, there is harm caused by people believing there's a bug when there isn't one.  It means more player effort for no reason, and it means development time spend looking for a bug that might not exist.  However, if we can prove the bug exists, then that is a great thing.  We just have to be diligent, and give good evidence!  Besides, it's a personal curiosity, and I want to know for sure now...The plural of 'anecdote' may not be 'data', but the plural of 'experiment' is!
« Last Edit: February 17, 2009, 09:05:08 pm by Sowelu »
Logged
Some things were made for one thing, for me / that one thing is the sea~
His servers are going to be powered by goat blood and moonlight.
Oh, a biomass/24 hour solar facility. How green!

AncientEnemy

  • Bay Watcher
  • The Answer is always POUR MAGMA ON IT
    • View Profile
Re: major FPS improvement, over 2x!
« Reply #29 on: February 17, 2009, 10:08:19 pm »

it's odd, i seem to get lower FPS when i designate -any- traffic areas whatsoever. on my current fortress i've been experimenting with it.

with no traffic designations whatsoever: 60-65 fps
with high traffic in the main throughways: 50-55 fps
with restricted traffic in areas where my dorfs never go (magma pit, river): 45-50 fps

wat?
Pages: 1 [2] 3 4 ... 7