Bay 12 Games Forum

Please login or register.

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

Author Topic: most vile enemy of all: lag  (Read 6368 times)

Reelyanoob

  • Bay Watcher
    • View Profile
Re: most vile enemy of all: lag
« Reply #45 on: April 05, 2011, 07:12:47 am »

Watching this thread. [...] Though still not sure how to destroy rotten clothing... smash the cabinets maybe? Any suggestions?
Edit out the clothing tags when making a new world. I deleted most clothing yesterday to test this and had dwarves starting with just leather cloaks and hoods (which I decided to leave in). When you get >200 dwarves that's several thousand less objects for the game to track regardless of bugs - 800 less just of shoes and socks.

Also, note how the deceased animals list grows ever longer ... The unit definitions are never deleted, so if you want to avoid this bring no pets and slaughter all immigrant's pets. You could deleted the [COMMON_DOMSETIC] or [PET] tags from the raws, i'm not 100% sure which ones you need, and ensure no more pets are ever brought.
Logged

bobahz

  • Bay Watcher
    • View Profile
Re: most vile enemy of all: lag
« Reply #46 on: April 05, 2011, 08:19:15 am »

What the trick with Ramps vs Stairs?
Logged

LoSboccacc

  • Bay Watcher
  • Σὺν Ἀθηνᾷ καὶ χεῖρα κίνει
    • View Profile
Re: most vile enemy of all: lag
« Reply #47 on: April 05, 2011, 08:38:43 am »

I used to do a big stairwell straight from surface to magma, that messes with the path finding a lot. sometimes. eventually.

depends on pc, setup, embark, invasions and stuff. ymmv.
Logged

ahonek

  • Bay Watcher
  • Tekeli-li! Tekeli-li!
    • View Profile
Re: most vile enemy of all: lag
« Reply #48 on: April 05, 2011, 09:38:56 am »

The thing is, if you have, say, a 3x3 stairway from the surface to the magma sea, that's a lot of possible paths, without even considering non-stair tiles. If you have just a 1x1 stairway, you have only one path. Even though your dwarves will have to shuffle past each other occasionally, you'll probably find that the increase in FPS will make up for the decrease in dwarf speed due to crowded stairs.

I'm not exactly sure why ramps are considered better than stairs, but they are certainly simpler in terms of movement logic.
Logged

Altaree

  • Bay Watcher
    • View Profile
Re: most vile enemy of all: lag
« Reply #49 on: April 05, 2011, 12:03:37 pm »

Ramps vs Stairs:
I think the path finder looks at a set of ramps as one unit while it looks at stair groups as a closely bunched cluster of 1x1 vertical hallways.  With a ramp you can go up, up/left, and up/right.  With Stairs you can only go up.  This will cause more path finding jittering when groups of dwarves meet.  That is my best guess at least.
Logged
Dan Pearson:
This is a game which calculates the volume of blood in every creature it generates so it knows how much alcohol it would have to consume to get drunk, an update which, remarkably, ended up covering people's fortresses in cat vomit.

randyshipp

  • Bay Watcher
    • View Profile
Re: most vile enemy of all: lag
« Reply #50 on: April 05, 2011, 12:29:31 pm »

Is there a primer somewhere on the fps issue?  I'm guessing it's a different animal than fps troubles in FPS...umm, First Person Shooter... games.  Just want to understand the issue.  Links welcome.
Logged
Randy...

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: most vile enemy of all: lag
« Reply #51 on: April 05, 2011, 12:35:47 pm »

Just want to understand the issue.  Links welcome.

Join the club, no one really knows for sure. I think the urine of a red headed child boy is the best way to get good performance.

The difference in FPS in DF as opposed to a shooting game, is that a "frame" is actually a unit of action for your dwarfs. So if you're getting 100fps, that means your game is progressing twice as fast as if you were getting 50 fps. Eventually things start sucking, and no one knows why and your fps will drop and it will take forever for your dwarfs to get things done. 100 fps is the speed preferred by most players.

The DISPLAY frames per second is a different issue, and doesn't really matter as long as it isn't glitching. When people talk about fps here, they are not talking about this.
Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

Rutilant

  • Bay Watcher
    • View Profile
Re: most vile enemy of all: lag
« Reply #52 on: April 05, 2011, 01:21:37 pm »

Mod your dwarves to not wear clothes.  Lag solved!
Logged

ahonek

  • Bay Watcher
  • Tekeli-li! Tekeli-li!
    • View Profile
Re: most vile enemy of all: lag
« Reply #53 on: April 05, 2011, 01:23:11 pm »

Mod your dwarves to not wear clothes.  Lag solved!

If only.
Logged

Niseg

  • Bay Watcher
    • View Profile
Re: most vile enemy of all: lag
« Reply #54 on: April 05, 2011, 02:28:38 pm »


My post got whipped  :'(  and I'm on a whiny and complainy mood . So I'll outline the important stuff.

- If you overclock your CPU X% you will gain about % fps.

Short guide to path finding A* (traffic designations 101) is a guided search which assumes : "the neighbor closest to the destination has a path to the destination" this is also its downfall. The worst case happen when the destination isn't accessible . There is another worst case which I call a "double comb":


##############
#S+++++#D++++#
#+##########+#
#++++++#+#+#+#
#+######+#+#+#
#++++++#+#+#+#
#+######+#+#+#
#++++++#+#+#+#
#+######+#+#+#
#++++++#+#+#+#
#+######+#+#+#
#++++++++++++#
##############

This nasty little scenario I painted with my program(web page with js) is a case where A* is fooled to go through all the dead ends. My A* search yielded 74 node visits while a blocked destination yields 75. with the comb teeth blocked off it takes 33 node visits. If you got those types of rooms make sure they got restricted designation because A* will get fooled. Another thing you should be careful from fliers. with a worst case of k^n caped by the number of accessible nodes flying creatures stuck in a big area can have a catastrophic effect on FPS . They got a big k and  a big n (this also eats memory) . They will generally go through each and every single nodes they can access before they decide there is no path.

I was generally complaining about being abandoned in the pathfinding thread after making a lot of progress on my program (in the last two days). Here is a link to the maze above but since I don't save destination you'll have to move it yourself before playing with the path finding features. I got user assisted path caching done it's not perfect but it saves a ton of "node visits"(but has many disadvantages). I'll appreciate any feedback on the pathfinding thread .

If you got any experience in computer science, discrete mathematics,AI, algorithms , or anything remotely close to it we'll appreciate the feedback or ideas. My opinion is that if we don't come up with a working system Nothing productive would come of this thread. My other pathfinding optimization approach is better in ways that you can practically run a 10X10 embark while pathing would have little effect on FPS. ;). It involves dividing the map into regions. I already know how to do it so I'll have a demo for that too soon(talking  weeks-month depend on my free time and progress). ;).
Logged
Projects:Path finding simulator(thread) -A*,weighted A*(traffic zones), user set waypoints (path caching), automatic waypoint room navigation,no-cache room navigation.

Krelos

  • Bay Watcher
  • Was nauseated by the sun recently.
    • View Profile
Re: most vile enemy of all: lag
« Reply #55 on: April 05, 2011, 02:29:05 pm »

The biggest helps for FPS that I've found are using ramps and not stairs and putting restricted traffic lines over the entrances of all rooms and side halls.

My current fort is on year 7, 130 pop, 3x3 embark and all 3 cave layers fully revealed.
No flowing liquids currently, about 40 loose animals and a full siege sitting outside. 50 FPS.
Single 3.2 core, 2G of ram.
« Last Edit: April 05, 2011, 02:39:22 pm by Krelos »
Logged
Quote from: Ravenplucker
Quote from: Aklyon
Quote from: smokingwreckage
In order to improve the universe's frame rate, we must all throw rocks into volcanoes and then do absolutely nothing, worldwide, for a week, to take pressure off pathfinding.
or maybe throw them into the large hadron collider to atom-smash them instead.
Not to mention to throw all available animals into tiny pits.

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: most vile enemy of all: lag
« Reply #56 on: April 05, 2011, 03:16:30 pm »

If you got any experience in computer science, discrete mathematics,AI, algorithms , or anything remotely close to it we'll appreciate the feedback or ideas. My opinion is that if we don't come up with a working system Nothing productive would come of this thread. My other pathfinding optimization approach is better in ways that you can practically run a 10X10 embark while pathing would have little effect on FPS. ;). It involves dividing the map into regions. I already know how to do it so I'll have a demo for that too soon(talking  weeks-month depend on my free time and progress). ;).

Well, I can tell you that how you pathfind means little to nothing compared to the graph you use. DF doesn't have a defined graph, so scattered reads over megabytes of memory is the biggest issue with DF's pathfinding. With modern processors you can waste all the cpu time you want, as long as you don't need a lot of memory to do so. That being said, it only matters if pathfinding is the bottleneck which I don't believe it is.

If I was to implement pathfinding for a game like DF, I would use a navigational mesh that gets updated as the world is modified. Rather than use "nodes", you build a vectors that define movable areas and navigate them appropriately. http://www.ai-blog.net/archives/000152.html is the best writeup of nav meshes I have read.
 
Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

Reelyanoob

  • Bay Watcher
    • View Profile
Re: most vile enemy of all: lag
« Reply #57 on: April 06, 2011, 12:32:22 am »

If you got any experience in computer science, discrete mathematics,AI, algorithms , or anything remotely close to it we'll appreciate the feedback or ideas [...]
That's me! I'll c u in the pathfinding thread. c++ is my forte, btw.
« Last Edit: April 06, 2011, 12:38:12 am by Reelyanoob »
Logged

Jachim

  • Bay Watcher
    • View Profile
Re: most vile enemy of all: lag
« Reply #58 on: April 06, 2011, 02:16:37 am »

I truly think that the clothing issue does seem to have something to do with it. I'm actually at year 4 right now in my current fort (default embark size, medium island world with abundant metals etc, volcano, no breached cavern, 158 dorfs). My FPS is holding steady at about 75-80, depending on whats occurring. Originally, prior to my first goblinite encounter, my FPS was almost always maxed at 100. As soon as goblinite showed up, (about 90 dorfs or so?) it dropped to 85ish and has slowly went down from there. Still pretty darn high, but I have decent computer. All my dorfs clothing are now slowly degrading, and it was only when the gobbos showed up that the FPS started to fall. I can only assume it's to do with 'omfg clothing!' dropping and my dorfs claiming and then not wearing the damn clothes. My last fort didn't die an FPS death per se, I still was getting about 30ish after 15 in-game years and 300 or so dwarves and god knows how many creatures/pets/godknowswhatelse...

Admittedly breaching the fun definitely demolishes FPS regardless... it went down to like 10 when I did that. >.<
Logged

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile
Re: most vile enemy of all: lag
« Reply #59 on: April 06, 2011, 02:35:23 am »

Were you using .25 on the 15 year old fort? And if so, could you upload a save prior to you breaching FUN but after getting 30 fps to dffd?
Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"
Pages: 1 2 3 [4] 5 6