Bay 12 Games Forum

Dwarf Fortress => DF General Discussion => Topic started by: galneon on February 19, 2016, 09:35:28 pm

Title: How is DF not technically doomed?
Post by: galneon on February 19, 2016, 09:35:28 pm
Dwarf Fortress has performance issues.  Everyone knows this.  Performance has been improved from time to time.  It hasn't improved lately and as complexity increases, it is likely to worsen.

Serious multi-threading is not going to happen.  64-bit DF is unlikely to significantly improve performance and some have speculated it may even hurt performance because of reliance on pointers.

Is this game not a sinking ship that is continually being added to and polished even as its bulkheads burst?

Please, give me a reason to be hopeful.  As it stands, this is a very long story with a likely tragic ending.
Title: Re: How is DF not technically doomed?
Post by: AbstractTraitorHero on February 19, 2016, 09:39:34 pm
Well if it really comes down to it if performance gets bad enough i can fully see the community helping make dwarf fortress run fast working together there is a tight community here and if toady needs help I can see many of the community working with him to fix it me included.
Title: Re: How is DF not technically doomed?
Post by: galneon on February 19, 2016, 10:16:13 pm
Well if it really comes down to it if performance gets bad enough i can fully see the community helping make dwarf fortress run fast working together there is a tight community here and if toady needs help I can see many of the community working with him to fix it me included.

This is the only realistic solution, but I cannot see this happening.  Toady either needs to reach out to the community (which would involve showing the codebase to others), or as someone else suggested, set up a separate donation fund dedicated to outsourcing major engine tuning to another development group.

But has he ever shown any inclination toward doing either of these things?
Title: Re: How is DF not technically doomed?
Post by: AbstractTraitorHero on February 19, 2016, 10:19:04 pm
This seems like toadys dream if it came down to it I'd imagine he'd reach out to well respected and trusted members of the community that can help then make them sign some kind of legal agreement not to share said code without permission and then give them the things they need to know to help."
Title: Re: How is DF not technically doomed?
Post by: King Mir on February 19, 2016, 11:18:54 pm
DF isn't getting much more performant, but it's not going to get much worse either. Toady does optimize when he adds new features that could otherwise significantly slow the game down, or when people complain about a new release that is very slow (this is usually due to a bug).

If you're hoping to play DF on the newest mobile device, don't count on it. But if you're already playing DF and you're worried about new features slowing down the game, don't sweat it.
Title: Re: How is DF not technically doomed?
Post by: galneon on February 20, 2016, 12:26:34 am
I don't care about mobile gaming.  I have a 5820k at 4.4 GHz.  It's not simply that things will get worse in the future--it's that things are already bad enough now.

A successful game ends because the simulation slows to the extent that it's like watching paint dry.  What other game ends for that reason?  None I've played in ~27 years of gaming.  I'd like to retire forts when I feel like it.  Something dramatic has to be done if this is ever to change.
Title: Re: How is DF not technically doomed?
Post by: Crashmaster on February 20, 2016, 01:52:57 am
A successful game ends because the simulation slows to the extent that it's like watching paint dry.  What other game ends for that reason?



Aurora - The Dwarf Fortress of 4X Games (http://www.bay12forums.com/smf/index.php?topic=47678.0/)


It's pretty great too!
Title: Re: How is DF not technically doomed?
Post by: vjmdhzgr on February 20, 2016, 03:21:38 am
What I've always heard is that Toady generally doesn't spend much time optimizing unless there's a significant issue or when implementing new features. He plans to save the optimization for later because a lot of that optimization will just get replaced later on. Like if he were to optimize the conversation system in adventurer mode before two years ago, it would have just been a waste of time because a completely new one was implemented.
Title: Re: How is DF not technically doomed?
Post by: MonkeyHead on February 20, 2016, 03:28:57 am
Also, performance is relative. A lot of newer DF players express opinions from time to time that 20 fps is "too slow for them", where a lot of older players have learnt to put up with as low as 5 fps. I suppose this all hinges on how "fast" you feel the game should be.
Title: Re: How is DF not technically doomed?
Post by: NJW2000 on February 20, 2016, 04:34:12 am
Silentthunders is running at less than 1 FPS. Still pretty epic. And if FPS is a concern, you can run a small fort, with a low pop cap, 1x1 embark, etc.

FPS decreases as micromanaging and actual player input increases. And if you get a fort that can run on its own but has ridiculously low FPS, you can leave it on overnight or all day. It becomes less of a game and more of a simulation or odd pet, but still.
Title: Re: How is DF not technically doomed?
Post by: Kirkegaard on February 20, 2016, 06:05:28 am
Also, performance is relative. A lot of newer DF players express opinions from time to time that 20 fps is "too slow for them", where a lot of older players have learnt to put up with as low as 5 fps. I suppose this all hinges on how "fast" you feel the game should be.

That is just excuses, from a player point of view. The game should be faster, a lot faster. Nothing is gained by playing in slow motion at 15-25 fps. If it is possible to convert all the ancient code into a more optimal running code is the question.
Title: Re: How is DF not technically doomed?
Post by: FortunaDraken on February 20, 2016, 06:18:25 am
It's entirely possible, but it's also entirely the wrong time in the game's life to do so.

> Game gets theoretically optimised
> Continues to expand and get new features
> Optimisation is rendered obsolete due to either being uncompatable with new coding or outright breaking on or due to new features
> New optimisation coding is required, resulting in all the time spent on the previous optimisation a waste

Making the game run better and faster is a job to wait until all the features are in, so there's less coding clashing going on. Once everything is in the game that Toady wants, that is when people should go back and look over it, find ways to make it faster, whatever. There's simply no point wasting time on something that could quite easily be rendered obsolete so quickly.

Besides, I for one would MUCH rather Toady worked on shiny new things and getting rid of bugs then optimising it so I can have giant fortresses.
Title: Re: How is DF not technically doomed?
Post by: Kirkegaard on February 20, 2016, 08:34:59 am
It's entirely possible, but it's also entirely the wrong time in the game's life to do so.
...
Besides, I for one would MUCH rather Toady worked on shiny new things and getting rid of bugs then optimising it so I can have giant fortresses.

DF is in continuous development, new features are added and will be until the end of time, there will therefore be no end point when the game is done and can be optimized.  I would rather that Toady spend a year restructuring the code base now, and then continue to expand it than the current slow walk towards total fps dead.
Title: Re: How is DF not technically doomed?
Post by: MonkeyHead on February 20, 2016, 08:47:00 am
Also, performance is relative. A lot of newer DF players express opinions from time to time that 20 fps is "too slow for them", where a lot of older players have learnt to put up with as low as 5 fps. I suppose this all hinges on how "fast" you feel the game should be.

That is just excuses, from a player point of view. The game should be faster, a lot faster. Nothing is gained by playing in slow motion at 15-25 fps. If it is possible to convert all the ancient code into a more optimal running code is the question.

See, this just illustrates my point. I do not feel that 15 to 25 fps is "slow motion", and more than tolerable. How fast the game "should" be running is fairly subjective.
Title: Re: How is DF not technically doomed?
Post by: MDFification on February 20, 2016, 09:23:14 am
Going multi-thread would not only be a colossal time investment on Toady's part, it's not actually a guaranteed performance boost. Multi-threading done right can be very powerful, but done wrong it can actually slow your program to a crawl if you even manage to keep it stable, and it's specifically dreaded in game programming. Multi-threading is typically only useful if your program has a lot of cache misses slowing it down, which DF probably has, but switching over is such a monumentally complicated, time-consuming and error-prone task that you could have played dozens of games over the years it could take Toady to manage making DF multithreaded without breaking the program.

If you're upset with poor performance, just let computer science advance and hold off playing the game until technology can support a faster DF without requiring unreasonably drastic changes to the program. Heck, within the next decade we could be seeing true commercial quantum computing, memristors or some other crazy invention.
Title: Re: How is DF not technically doomed?
Post by: NJW2000 on February 20, 2016, 09:27:23 am
^This, so much. While DF is growing, computer power is growing exponentially. Unlike other games, it might still be there and relevant, and is likely to be, ten years from now, in which case this will likely become meaningless.

DF is one of very few games that can afford to let technology improve faster than its performance, but I think this might be the most viable strategy.
Title: Re: How is DF not technically doomed?
Post by: Dirst on February 20, 2016, 10:14:20 am
Technically, Dwarf Fortress is doomed.  It won't survive the heat death of the Universe.  But this isn't particularly relevant to performance issues.

There are a very small number of people that Toady seems to trust on coding advice on bugs (Quietust and Ag that I know of), and of course the SDL implementation involved outside help, so it's not like Toady is religiously dead-set against accepting help.  But my understanding is that the SDL experience did not go well, so whoever does get tapped to assist is going to have to play by Toady's rules.

Multi-threading may or may not help.  Personally I think that offloading periodic updates to a GPU would be more fruitful.
Title: Re: How is DF not technically doomed?
Post by: galneon on February 20, 2016, 10:36:24 am
Going multi-thread would not only be a colossal time investment on Toady's part, it's not actually a guaranteed performance boost. Multi-threading done right can be very powerful, but done wrong it can actually slow your program to a crawl if you even manage to keep it stable, and it's specifically dreaded in game programming. Multi-threading is typically only useful if your program has a lot of cache misses slowing it down, which DF probably has, but switching over is such a monumentally complicated, time-consuming and error-prone task that you could have played dozens of games over the years it could take Toady to manage making DF multithreaded without breaking the program.

I didn't suggest Toady take care of it himself because I know that he simply cannot.

Quote
If you're upset with poor performance, just let computer science advance and hold off playing the game until technology can support a faster DF without requiring unreasonably drastic changes to the program. Heck, within the next decade we could be seeing true commercial quantum computing, memristors or some other crazy invention.

This is not how hardware scales over time, and I won't speculate on radically different architecture with an uncertain future.  In 10 years will DF run better?  Yes, of course.  Will FPS death still be an issue if development continues at its current rate and direction?  Undoubtedly.

I don't care if improvements come from the most brilliant implementation of multithreading in gaming history or some other means.  I just know something dramatic must be done, and that doesn't involve waiting for hardware to improve in a magical way that makes an inefficient engine behave otherwise.  I hope the options, however daunting, are being considered.
Title: Re: How is DF not technically doomed?
Post by: AzyWng on February 20, 2016, 10:39:39 am
Technically, Dwarf Fortress is doomed.  It won't survive the heat death of the Universe.  But this isn't particularly relevant to performance issues.

Sigged.
Title: Re: How is DF not technically doomed?
Post by: AbstractTraitorHero on February 20, 2016, 10:42:49 am
What you talking about dwarf fortress will be saved by time travelers who then escape the universe with it!
Title: Re: How is DF not technically doomed?
Post by: therahedwig on February 20, 2016, 11:49:14 am
The problem here is that you want reassurance that something will be done, specifically with a nice timeline so that you feel your anxiety lessen.

You're not gonna get that.

What you are gonna get is "this is toady's baby, he'll inevitably work on fps issues as it starts bothering them". Does this mean that maybe he'll spend a whole year rewriting fps blockers? Probably. Will this kill player enthusiasm for Dwarf Fortress? Well, considering he's done 3 big updates that took a full year already, I somehow doubt this.

DF has been in development for a long time. The community is used to living the slow life and is not gonna topple over when toady isn't releasing new updates every week. (Maybe, this final update before speedup cleaning will finally allow Masterwork to catch up ;) )
Title: Re: How is DF not technically doomed?
Post by: Salmeuk on February 20, 2016, 12:49:04 pm
This is not how hardware scales over time, and I won't speculate on radically different architecture with an uncertain future.

Dwarf Fortress is both radical and different, and you can practice architecture within it, yet you seem to be quite willing to speculate on it's uncertain future.

This kind of 'call to arms' post doesn't get much support around here (IMPENDING DOOM and DISMAY just don't sell around these parts, perhaps due to the amount of time we spend playing DF) though it does provoke interesting discussion about the nature of game development so I welcome you to continue your sign-waving.

The game slows down, sure, but much like the ASCII people have come to terms with this. I don't think anyone wishes for the game to become slower. However, the opportunity to further enjoy a procedurally-generated fantasy simulator of this magnitude is far more important than the speed of that enjoyment.

And this has already been noted, but to reiterate: Toady makes this game because he wants to. The community that followed was almost an accident, but it's turned out to be a rather productive relationship for all concerned. As near as I can tell, if the community dries up the development will go on. Dwarf Fortress won't just die like some kickstarter or early access, so your fears are unfounded.
Title: Re: How is DF not technically doomed?
Post by: Isngrim on February 20, 2016, 01:49:27 pm
Going multi-thread would not only be a colossal time investment on Toady's part, it's not actually a guaranteed performance boost. Multi-threading done right can be very powerful, but done wrong it can actually slow your program to a crawl if you even manage to keep it stable, and it's specifically dreaded in game programming. Multi-threading is typically only useful if your program has a lot of cache misses slowing it down, which DF probably has, but switching over is such a monumentally complicated, time-consuming and error-prone task that you could have played dozens of games over the years it could take Toady to manage making DF multithreaded without breaking the program.

I didn't suggest Toady take care of it himself because I know that he simply cannot.
I wouldn't go that far,just 30 seconds of research would show you Toady is likely more then capable of it:
Quote from: Wikipedia
Adams earned a degree in mathematics at the University of Washington.[2] He applied for his doctorate at Stanford University, completing it in 2005 with a dissertation titled "Flat Chains in Banach Spaces", which was published in The Journal of Geometric Analysis. During his first year at Stanford, he was under pressure, the professional environment and competitiveness affected him negatively. He cited the conflict between studying mathematics and developing video games as the reason. This stressful situation left him depressed and he admitted to having a brief encounter with drugs.[8]

In 2006, he started his post doctorate in Texas A&M, which was his goal since his undergraduate days. He decided to leave during the first year due to the increasingly stressful situation[3] and is said to have broken down in the head of department's office. He left in the same year after receiving a stipend, to devote his full attention to developing Dwarf Fortress and other games, which was until then only a hobby. He said, "At the end of a math problem, you have a paper and maybe you publish it, and the paper can be a building block for the edifice of mathematics, but to me that’s not so important. But working on a problem and having a game when you’re done? That’s pretty damn cool."[2]

other then that,everybody else beat me to the point.
Title: Re: How is DF not technically doomed?
Post by: Kirkegaard on February 20, 2016, 03:09:41 pm
Going multi-thread would not only be a colossal time investment on Toady's part, it's not actually a guaranteed performance boost. Multi-threading done right can be very powerful, but done wrong it can actually slow your program to a crawl if you even manage to keep it stable, and it's specifically dreaded in game programming. Multi-threading is typically only useful if your program has a lot of cache misses slowing it down, which DF probably has, but switching over is such a monumentally complicated, time-consuming and error-prone task that you could have played dozens of games over the years it could take Toady to manage making DF multithreaded without breaking the program.

I didn't suggest Toady take care of it himself because I know that he simply cannot.
I wouldn't go that far,just 30 seconds of research would show you Toady is likely more then capable of it:
Quote from: Wikipedia
Adams earned a degree in mathematics at the University of Washington.[2] He applied for his doctorate at Stanford University, completing it in 2005 with a dissertation titled "Flat Chains in Banach Spaces", which was published in The Journal of Geometric Analysis. During his first year at Stanford, he was under pressure, the professional environment and competitiveness affected him negatively. He cited the conflict between studying mathematics and developing video games as the reason. This stressful situation left him depressed and he admitted to having a brief encounter with drugs.[8]

In 2006, he started his post doctorate in Texas A&M, which was his goal since his undergraduate days. He decided to leave during the first year due to the increasingly stressful situation[3] and is said to have broken down in the head of department's office. He left in the same year after receiving a stipend, to devote his full attention to developing Dwarf Fortress and other games, which was until then only a hobby. He said, "At the end of a math problem, you have a paper and maybe you publish it, and the paper can be a building block for the edifice of mathematics, but to me that’s not so important. But working on a problem and having a game when you’re done? That’s pretty damn cool."[2]

other then that,everybody else beat me to the point.

It is a specialists job. Not every programmer can do everything equally well, especially not if one to a degree is self taught.
Title: Re: How is DF not technically doomed?
Post by: cochramd on February 20, 2016, 04:34:33 pm
(Maybe, this final update before speedup cleaning will finally allow Masterwork to catch up ;) )
Given how much fun new stuff has come out in v42, I am doubtful that there will be much interest in Masterwork by the time Toady decides he needs to optimize. However, I've never used Masterwork so I might very well, much like OP, be talking about something I know nothing about.
Title: Re: How is DF not technically doomed?
Post by: Livingdeath on February 20, 2016, 04:42:22 pm
To quote scripture, premature optimization is the root of all evil.

Toady could very easily optimize a lot of things right now on that front, that could give in principle enormous speed up benefits..   Like a factor of 10 or more.  Pathing for instance is a major compute hog, and could be ameliorated considerably.

The problem is, these sorts of optimizations are so specific that it's unlikely they will continue giving the same benefits if something changes drastically (Pathing for instance will radically change if you implement a rail system) and in fact could make things worse.

You really want the optimizations right before the final release.

So while hardware is unlikely to really keep up, software here really does have a large amount of wiggle room.
Title: Re: How is DF not technically doomed?
Post by: galneon on February 20, 2016, 05:10:02 pm
The problem here is that you want reassurance that something will be done, specifically with a nice timeline so that you feel your anxiety lessen.

You're not gonna get that.

No, I don't.  I never said any of that or anything resembling it.  I never requested "a nice timeline," and I don't want "reassurance" because I don't frankly care enough about playing the game.  I don't play a ton of DF, but I follow it because I love what it represents and I would hate to see someone's life's work plagued with technical issues that are never resolved and possibly even worsen as complexity increases while some of the most vocal fans suggest FPS death doesn't really matter.  I made this thread (I'm hardly the first) because the issue should be brought up frequently.  Keep your straw-men in the closet next time.

Quote
What you are gonna get is "this is toady's baby, he'll inevitably work on fps issues as it starts bothering them". Does this mean that maybe he'll spend a whole year rewriting fps blockers? Probably. Will this kill player enthusiasm for Dwarf Fortress? Well, considering he's done 3 big updates that took a full year already, I somehow doubt this.

DF has been in development for a long time. The community is used to living the slow life and is not gonna topple over when toady isn't releasing new updates every week. (Maybe, this final update before speedup cleaning will finally allow Masterwork to catch up ;) )

Now that we've established I don't care about "when" and am not seeking to quell my anxiety, only that eventually something is done for the good of the game, I think it's clear we agree on most of this--though I think if major improvements to performance are made, I don't think it will be solely Toady who is responsible.

As for player enthusiasm, I don't think it's likely to die regardless of the direction of development as there will always be die-hards who, as I mentioned before, consider FPS death a neat feature and not a problem.  The sycophant doesn't always provide the best feedback, though, and it would be a shame if eventually they became the majority.  They just might become the majority in this thread, though, and I'm not counting you among them.

It is a specialists job. Not every programmer can do everything equally well, especially not if one to a degree is self taught.

Thank you.  Toady himself has said that multithreading is not his forte.  I'm not suggesting he's stupid, or a bad programmer.  (But of course we know that multithreading is not the only thing that could help.)

Given how much fun new stuff has come out in v42, I am doubtful that there will be much interest in Masterwork by the time Toady decides he needs to optimize. However, I've never used Masterwork so I might very well, much like OP, be talking about something I know nothing about.

I'm disappointed...  You didn't even try to misrepresent my words--just an artless attack on my credibility without anything (real or imagined) to actually discredit me.  Boring.  I'm surprised you manage to even get through world generation.

To quote scripture, premature optimization is the root of all evil.

Toady could very easily optimize a lot of things right now on that front, that could give in principle enormous speed up benefits..   Like a factor of 10 or more.  Pathing for instance is a major compute hog, and could be ameliorated considerably.

The problem is, these sorts of optimizations are so specific that it's unlikely they will continue giving the same benefits if something changes drastically (Pathing for instance will radically change if you implement a rail system) and in fact could make things worse.

Pathfinding is actually the sort of thing that wouldn't break as easily as the codebase expands, and overhauled pathfinding would indeed be a big improvement.  You're right though that little performance hacks do tend to break over time.  Those would not be the sort of improvements needed.

Quote
You really want the optimizations right before the final release.

Final release?  Are you sure we're talking about the same game? :P
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 20, 2016, 05:24:13 pm
Multithreading would require absolutely gutting the engine and reassembling everything in a vastly (vastly) more complicated manner than it's currently arranged (which is already really complicated).
I don't doubt that Toady could do it, but it's the sort of thing that would need an army of Toady-clones to get done in a reasonable timeframe, and even then you'd still have endless bugs to deal with.
Simply put: Multithreading the mechanics of a game like DF is really sodding hard. The performance boost is probably not worth it.

Quote
some of the most vocal fans suggest FPS death doesn't really matter
For the record, nobody actually thinks this (and if they do they're wrong) but it isn't a priority while the game is in active development.
Toady can optimise the game further (and he does, as major problems arise), but that's not his priority. DF is currently in alpha, which means adding features (and fixing major bugs, but mostly adding features). If the game makes it to beta, then he'll get on to bug-squashing and optimisations.
Title: Re: How is DF not technically doomed?
Post by: therahedwig on February 20, 2016, 06:23:47 pm
Bzwah? So you just want to sit around here and poke us so that we will forever be discussing the same oldass boring topic? You do realise we play this game for fun right?

Well, if you're into that, how about you start a thread about the UI as well then?

I just assumed you were one of those people who didn't know how to use the search function. Guess I was wrong.
Title: Re: How is DF not technically doomed?
Post by: Miuramir on February 20, 2016, 07:47:35 pm
My 2☼:

In the long run, some sort of technological change in the code will be necessary.  That said, with most estimates of something that would be called 1.0 off in the 20 year timeframe, predicting tech that far out is not a good use of effort.  There's reasonable odds that simply compiling it with Visual Studio 2030 will take advantage of whatever massively-parallel, quantum, or whatever hardware exists at the time.  (Among other things, compilers are starting to become more parallel aware; I suspect that the era of hand-optimizing for multiple CPUs is a temporary one.)  Spending a huge chunk of time optimizing DF for pre-2020 computing tech isn't a good investment.

That said, building in *flexibility* is a useful investment. It's difficult to predict things like screen sizes, for instance, but the odds that at some point someone will want to play DF maximized on a next-gen 8k display are reasonable; making configuration options handle larger than current numbers is wise.  You can buy dual 20-core desktops with a terabyte of RAM *today*, not to mention GPGPU computing where you're dealing with thousands of cores.  We *really* don't know what the future will look like. 

(Side note: the rapid growth of power optimization may mean that the future gets heavily into things like reversible computing... talk about needing a whole new paradigm of compilers, it makes rewriting for massively parallel look like a walk in the park.) 
Title: Re: How is DF not technically doomed?
Post by: cochramd on February 20, 2016, 08:25:01 pm
(removed)
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 20, 2016, 08:47:43 pm
~~~
Please don't bicker
Title: Re: How is DF not technically doomed?
Post by: Fayrik on February 20, 2016, 09:54:35 pm
I'm sure someone will correct me if I've forgotten something here, but I'm fairly certain that there are only four areas of Dwarf Fortress that cause considerable FPS drops.
I can't think of any other parts of the game that can come close in comparison to the amount of time these parts of the simulation use. They're the heavy numbers behind everything, after all.
So, if you limit your pop-cap to 20, ensure there's no large water bodies, turn off all the cavern layers and underground features, and switch off weather for good measure... You'll find a fort like this would take much much longer to slow down at all.
But even at this hyper optimized super fast fort, it would eventually slow down, as you modify the environment and accrue dead creatures and such.
Trying to make a single game last forever is never going to work, due to the nature of forever.

Basically Dwarf Fortress can either be played with everything switched on for a short while, or with everything switched off for a long while. Either way there is a very real upper limit the length of time you can run a single fortress for, and that's not in any way a fault of the game, but rather fault of the universe our computers exist in.

In fact, even the most theoretically ideal multi-threaded environment could be brought to a very painful halt when the entirety of the goblin race decides to invade.
(Although, in practice it would likely suffer a more boring slowdown, as hundreds of dwarves interact with a limited set of items, grinding everything to a halt in a hideous mess of memory locks.)
Spoiler (click to show/hide)
Title: Re: How is DF not technically doomed?
Post by: Untrustedlife on February 20, 2016, 09:58:44 pm
It's entirely possible, but it's also entirely the wrong time in the game's life to do so.
...
Besides, I for one would MUCH rather Toady worked on shiny new things and getting rid of bugs then optimising it so I can have giant fortresses.

DF is in continuous development, new features are added and will be until the end of time, there will therefore be no end point when the game is done and can be optimized.  I would rather that Toady spend a year restructuring the code base now, and then continue to expand it than the current slow walk towards total fps dead.

Toady has made 2 year releases before, he can do it again too.
Actually he has a well laid out plan for the game (ON NOTECARDS believe it or not) and the 42, means its 42% done, when that hits 100% its done and he can optimize. SO yes there is an end.It might take 20 years, but there is a n end.
And even if optimizations take 2 years people will still play the game.

Optimizing the current path algorithm isn't a good investment yet actually as toady plans to implement parallel worlds/other planes and this will require a massive pathfinding rewrite anyhow.
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 20, 2016, 10:23:19 pm
Toady has made 2 year releases before, he can do it again too.
Except he doesn't want to, because he didn't like it, the fans didn't like it, and the donations dropped significantly over that period. Toady has said many times that he wants to make smaller updates with a shorter cycle.

Actually he has a well laid out plan for the game (ON NOTECARDS believe it or not) and the 42, means its 42% done
That's not how version numbers work. 0.42 means Toady has made forty-two major versions of the game thus far. It could finish at 0.85, or go on to 0.1337. It is not a percentage.
Title: Re: How is DF not technically doomed?
Post by: Untrustedlife on February 20, 2016, 10:34:38 pm
Toady has made 2 year releases before, he can do it again too.
Except he doesn't want to, because he didn't like it, the fans didn't like it, and the donations dropped significantly over that period. Toady has said many times that he wants to make smaller updates with a shorter cycle.

Actually he has a well laid out plan for the game (ON NOTECARDS believe it or not) and the 42, means its 42% done
That's not how version numbers work. 0.42 means Toady has made forty-two major versions of the game thus far. It could finish at 0.85, or go on to 0.1337. It is not a percentage.
You are wrong, his version scheme is based on 100 and it is also based on core components 100 core components is version 1.0 . http://dwarffortresswiki.org/index.php/DF2014:Version_number http://dwarffortresswiki.org/index.php/v0.34_Talk:Version_number
it is essentially percentages. And toady has even  stated this. which is why he was so happy with 34 he was like we are now over a third done (listen to the df talk podcasts)

also
Quote
Toady also said that they need make a new list of what needs to go in before it qualifies for v1.0.0 status so they can better estimate that "percentage" number for future versions (I think this was in one of the DFTalk podcasts).
Since this quote toady did that. and it is now in fact approximating percentages.
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 20, 2016, 10:42:09 pm
Oh, huh. Didn't expect that one.
Title: Re: How is DF not technically doomed?
Post by: Libash_Thunderhead on February 20, 2016, 10:54:41 pm
I am currently playing on an old 32-bit pc. I'm statisfied when fps reaches 30 after 5 years of in-game time. And I seldom play maps larger than 2x2.
When I ran the game on another pc which had a better cpu (i3-2120, not too good but still better than that Pentium D), my first reacton was "wow, everything is so fast, let me try a bigger map".

I'm curious: performance aside, how big do you think a typical df map should be? How big the world map should be? How long the history should be?

Fortress map: 4x4, 8x8, 16x16, or even bigger?
World map: medium, large, very large or ...?
History: 200 years, 500 years, 1000 years, or ...?
Title: Re: How is DF not technically doomed?
Post by: Killgoth on February 20, 2016, 11:43:05 pm
This technology will come to processing speed in no time:  http://www.pcgamer.com/experimental-5d-data-storage-could-store-360tb-of-games-for-138-billion-years/ (http://www.pcgamer.com/experimental-5d-data-storage-could-store-360tb-of-games-for-138-billion-years/)
Title: Re: How is DF not technically doomed?
Post by: Arbinire on February 21, 2016, 02:00:05 am
Alpha game is Alpha, other than a general bit here and there to keep the game running relatively smooth, optimization is not a concern at all right now, Mr. Escaped Lunatic.  And no, these posts don't need to be brought up frequently, it is not helpful, altruistic, or for the good of the game, and no it is not doomed, technically or otherwise.

This post is just as asinine as the UI and Graphics posts claiming that if DF doesn't make these adjustments right this minute then the game is doomed to fail, and those posts have been popping up for years now, yet the game is still going strong in a functioning manner despite the cries that the sky is falling.
Title: Re: How is DF not technically doomed?
Post by: Col_Jessep on February 21, 2016, 04:57:12 am
This technology will come to processing speed in no time:  http://www.pcgamer.com/experimental-5d-data-storage-could-store-360tb-of-games-for-138-billion-years/ (http://www.pcgamer.com/experimental-5d-data-storage-could-store-360tb-of-games-for-138-billion-years/)
That's only for data storage, think of it as a high-capacity DVD/Blu-Ray. It won't speed up the processing of the data. It means that we might be able to store an entire galaxy of generated DF worlds with millions of years of history onto one single disk. Enjoy the lag! =)
Title: Re: How is DF not technically doomed?
Post by: Kirkegaard on February 21, 2016, 06:54:55 am
I think it is a mistake to look at it as "multi threading or no changes at all" there are many other ways to optimize performance. It is my impression that most of the basic code is +10 years old, and with 10 years more experience I would find it profoundly odd if there was not rather large gains in both speed and general code structure to be gained by having a look at it and "cleaning the code".

A entire other option is to remove some of the features designed over the years, like the dynamic world, in principle it is a very cool feature, but when playing a fort. Do one really care if the rest of the world is changing? As I remember it, that feature did cost something around 20% of the fps. 
Title: Re: How is DF not technically doomed?
Post by: MDFification on February 21, 2016, 09:32:10 am
I don't care if improvements come from the most brilliant implementation of multithreading in gaming history or some other means.  I just know something dramatic must be done, and that doesn't involve waiting for hardware to improve in a magical way that makes an inefficient engine behave otherwise.  I hope the options, however daunting, are being considered.

The problem isn't that DF is inefficient (though it could stand to be more efficient, although optimizing early is problematic), the problem is that it's setting out to do a ludicrously large, complex simulation. It's now looking like versions in the far future won't be able to run on 32bit. As the complexity of DF continues to escalate as planned, you are not going to see dramatic improvements in performance without better hardware, even if Toady decides optimizing a partial alpha build is worth making his job more difficult.

The major causes of FPS death that the community is aware of are pathing, fluid dynamics and changes to an item's state (contaminants, temperature changes etc). Of these, Toady is unsatisfied with fluid dynamics already, and finding a more efficient way to do the other two isn't easy. This isn't in the sense that only an expert coder could do it; there's just only so many methods available, each with their own benefits and drawbacks, and very few of them are suitable for DF.
Title: Re: How is DF not technically doomed?
Post by: Witty on February 21, 2016, 12:41:08 pm
... "this is toady's baby, he'll inevitably work on fps issues as it starts bothering them". Does this mean that maybe he'll spend a whole year rewriting fps blockers? Probably.

This is pretty much the only answer on the subject, imo. The Great FPS Death is coming, but it'll get fixed. Even if it takes a two or three year rewrite to do so.

Is that ideal? Of course not. But that's almost certainly what's going to happen. And I don't really think the community will collapse because of it. Maybe some will quibble a bit - but that's always been the case, and there's nothing wrong with that.

And as others have already said - neither 64-bit or even multithreading will have a huge impact on improving DF's current FPS issues. Fayrik already listed the major FPS killers. Once those get some work - long term FPS will improve dramatically.
Title: Re: How is DF not technically doomed?
Post by: Willfor on February 21, 2016, 01:05:03 pm
A entire other option is to remove some of the features designed over the years, like the dynamic world, in principle it is a very cool feature, but when playing a fort. Do one really care if the rest of the world is changing? As I remember it, that feature did cost something around 20% of the fps.
Hey, yeah, why don't we remove the primary feature that makes DF so great? The thing that none of the DF clones actually even try to copy? The part of the game the Toady actually really, truly enjoys making, and part of what makes it a game worth featuring in the museum of modern art? That'll really help development along.

:V
Title: Re: How is DF not technically doomed?
Post by: Kirkegaard on February 21, 2016, 03:03:07 pm
A entire other option is to remove some of the features designed over the years, like the dynamic world, in principle it is a very cool feature, but when playing a fort. Do one really care if the rest of the world is changing? As I remember it, that feature did cost something around 20% of the fps.
Hey, yeah, why don't we remove the primary feature that makes DF so great? The thing that none of the DF clones actually even try to copy? The part of the game the Toady actually really, truly enjoys making, and part of what makes it a game worth featuring in the museum of modern art? That'll really help development along.

:V

I don't think you understand what I mean, or else have you maybe just started playing this version?
In a not so ancient past, when you started the game the rest of the world froze, whereas now the game simulate a lot of stuff that at the moment have next to no effect on anything related to your game at all.
Title: Re: How is DF not technically doomed?
Post by: Willfor on February 21, 2016, 03:19:27 pm
A entire other option is to remove some of the features designed over the years, like the dynamic world, in principle it is a very cool feature, but when playing a fort. Do one really care if the rest of the world is changing? As I remember it, that feature did cost something around 20% of the fps.
Hey, yeah, why don't we remove the primary feature that makes DF so great? The thing that none of the DF clones actually even try to copy? The part of the game the Toady actually really, truly enjoys making, and part of what makes it a game worth featuring in the museum of modern art? That'll really help development along.

:V

I don't think you understand what I mean, or else have you maybe just started playing this version?
In a not so ancient past, when you started the game the rest of the world froze, whereas now the game simulate a lot of stuff that at the moment have next to no effect on anything related to your game at all.
Oh, no, I am fully aware of that. I just have two questions for you.

1) Now that armies and visitors move on the world map, how is anyone going to arrive at your fort if they are not allowed to move in the world? 2) When we're able to send armies out from our fortresses, a feature that is in the works, how exactly are they going to be able to move if the rest of the world isn't active?

The active world is actually the most important part of the game for me. That there is a living world outside my fortress makes everything a lot better than when the world simply stopped. Dwarf Fortress as a project is 100% about that feature being expanded as opposed to eliminated.
Title: Re: How is DF not technically doomed?
Post by: MobRules on February 21, 2016, 03:37:21 pm
I made this thread (I'm hardly the first) because the issue should be brought up frequently.

Why? Do you think that anyone is going to forget that the game will need some optimization eventually? What are you trying to accomplish?
Title: Re: How is DF not technically doomed?
Post by: Kirkegaard on February 21, 2016, 04:14:51 pm
A entire other option is to remove some of the features designed over the years, like the dynamic world, in principle it is a very cool feature, but when playing a fort. Do one really care if the rest of the world is changing? As I remember it, that feature did cost something around 20% of the fps.
Hey, yeah, why don't we remove the primary feature that makes DF so great? The thing that none of the DF clones actually even try to copy? The part of the game the Toady actually really, truly enjoys making, and part of what makes it a game worth featuring in the museum of modern art? That'll really help development along.

:V

I don't think you understand what I mean, or else have you maybe just started playing this version?
In a not so ancient past, when you started the game the rest of the world froze, whereas now the game simulate a lot of stuff that at the moment have next to no effect on anything related to your game at all.
Oh, no, I am fully aware of that. I just have two questions for you.

1) Now that armies and visitors move on the world map, how is anyone going to arrive at your fort if they are not allowed to move in the world? 2) When we're able to send armies out from our fortresses, a feature that is in the works, how exactly are they going to be able to move if the rest of the world isn't active?

The active world is actually the most important part of the game for me. That there is a living world outside my fortress makes everything a lot better than when the world simply stopped. Dwarf Fortress as a project is 100% about that feature being expanded as opposed to eliminated.

1) Like they did before. They just spawn (and thereby eliminate a lot of problems, with enemies that never show up)
2) That will be a nice thing, but it is also something that very well could be two or more years out into the future. If it is even added. I don't think ideas of what can be done should be given much weight in regard to current features, especially not in a game like DF with a very slow development (one guy).
Title: Re: How is DF not technically doomed?
Post by: Urlance Woolsbane on February 21, 2016, 04:19:41 pm
A entire other option is to remove some of the features designed over the years, like the dynamic world, in principle it is a very cool feature, but when playing a fort. Do one really care if the rest of the world is changing? As I remember it, that feature did cost something around 20% of the fps.
Hey, yeah, why don't we remove the primary feature that makes DF so great? The thing that none of the DF clones actually even try to copy? The part of the game the Toady actually really, truly enjoys making, and part of what makes it a game worth featuring in the museum of modern art? That'll really help development along.

:V

I don't think you understand what I mean, or else have you maybe just started playing this version?
In a not so ancient past, when you started the game the rest of the world froze, whereas now the game simulate a lot of stuff that at the moment have next to no effect on anything related to your game at all.
Oh, no, I am fully aware of that. I just have two questions for you.

1) Now that armies and visitors move on the world map, how is anyone going to arrive at your fort if they are not allowed to move in the world? 2) When we're able to send armies out from our fortresses, a feature that is in the works, how exactly are they going to be able to move if the rest of the world isn't active?

The active world is actually the most important part of the game for me. That there is a living world outside my fortress makes everything a lot better than when the world simply stopped. Dwarf Fortress as a project is 100% about that feature being expanded as opposed to eliminated.

1) Like they did before. They just spawn (and thereby eliminate a lot of problems, with enemies that never show up)
2) That will be a nice thing, but it is also something that very well could be two or more years out into the future. If it is even added. I don't think ideas of what can be done should be given much weight in regard to current features, especially not in a game like DF with a very slow development (one guy).
Here's a thought: Why not pitch a "Turn Continuous World-Gen Off" feature on the Suggestions Forum? I mean, you can turn off temperature and whatnot, so it's not too far out.
Title: Re: How is DF not technically doomed?
Post by: Shonai_Dweller on February 21, 2016, 05:12:16 pm
A entire other option is to remove some of the features designed over the years, like the dynamic world, in principle it is a very cool feature, but when playing a fort. Do one really care if the rest of the world is changing? As I remember it, that feature did cost something around 20% of the fps.
Hey, yeah, why don't we remove the primary feature that makes DF so great? The thing that none of the DF clones actually even try to copy? The part of the game the Toady actually really, truly enjoys making, and part of what makes it a game worth featuring in the museum of modern art? That'll really help development along.

:V

I don't think you understand what I mean, or else have you maybe just started playing this version?
In a not so ancient past, when you started the game the rest of the world froze, whereas now the game simulate a lot of stuff that at the moment have next to no effect on anything related to your game at all.
Oh, no, I am fully aware of that. I just have two questions for you.

1) Now that armies and visitors move on the world map, how is anyone going to arrive at your fort if they are not allowed to move in the world? 2) When we're able to send armies out from our fortresses, a feature that is in the works, how exactly are they going to be able to move if the rest of the world isn't active?

The active world is actually the most important part of the game for me. That there is a living world outside my fortress makes everything a lot better than when the world simply stopped. Dwarf Fortress as a project is 100% about that feature being expanded as opposed to eliminated.

1) Like they did before. They just spawn (and thereby eliminate a lot of problems, with enemies that never show up)
2) That will be a nice thing, but it is also something that very well could be two or more years out into the future. If it is even added. I don't think ideas of what can be done should be given much weight in regard to current features, especially not in a game like DF with a very slow development (one guy).
Here's a thought: Why not pitch a "Turn Continuous World-Gen Off" feature on the Suggestions Forum? I mean, you can turn off temperature and whatnot, so it's not too far out.
Because:
a) It's the whole point of the game. And integral to most of the systems right now. Toady's not going to programme a new game with randomly generated sieges, visitors, creatures. He already made it,  it's free to download on the website (or play one of the many other fortress building games out there).
b) 20% is a number pulled out of someone's ass. Multi-tile trees and pathing issues could have just as much impact. Evidence? Testing? Oh you turned off the persistant world somehow to test it? Right....
Title: Re: How is DF not technically doomed?
Post by: NJW2000 on February 21, 2016, 05:16:41 pm
Depends on world/lagginess of fort. Obviously. Also, object testing arena? You CAN turn off world activation for an experiment, by not having a world.
Title: Re: How is DF not technically doomed?
Post by: Bumber on February 21, 2016, 06:29:47 pm
Depends on world/lagginess of fort. Obviously. Also, object testing arena? You CAN turn off world activation for an experiment, by not having a world.
And weather. And tree growth(?). And jobs/wealth/HFS/wild animals/every other fort thing. All the world info that still needed to be tracked before the activation. It's never just the activation.
Title: Re: How is DF not technically doomed?
Post by: Urist McVoyager on February 21, 2016, 09:04:38 pm
People, there is a VERY obvious solution to all of this that was glanced on but not actually discussed.

See, every time a new version comes out, it breaks things like DF Hack and Dwarf Therapist. And those crews figure out the changes they need to make, and they make them. New version comes out. Now, I'm sure Toady has someone in mind for when he does need help. He could give them the code, tell them to optimize it wherever they can, and release it as a mod like all the other utilities that are out there. Call it DF Optimized!

Yes, I know, such things take a looooong time. But you know what else happens every time Toady makes a new release? Bugs. And complaint threads worse than this one where somebody actively bitches (this one isn't actually a bitch fest and if these threads are done RIGHT and encourage us thinking like I'm doing now, they'd honestly be a great thing) before saying "I'm going back to version (enter number here) where you actually got it right." So we know right off the bat that even if DF Optimized version .42 didn't come out for another year when DF regular got its own update, there would still be a playerbase for it. Heck, probably a big one. Because when you're given a choice between "Buggy as Hell experimental version that could be an enjoyable new game" and "Upgraded but otherwise familiar older version" there's a high chance you'll check your hard drive space before downloading both and enjoying them.
Title: Re: How is DF not technically doomed?
Post by: Witty on February 21, 2016, 09:30:45 pm
words

This isn't how the Toad rolls. Coding with others, or sharing the code at all isn't going to happen. Hell, the only thing I can think of that might change Toady's mind on the subject is if the FPS Death becomes totally unmanageable or something. And even then I doubt it'll happen. 
Title: Re: How is DF not technically doomed?
Post by: Urist McVoyager on February 21, 2016, 10:12:52 pm
It's already stated that Toady has plans in place to make the code open sourced if he dies in a non-murdery way. So that whole not sharing thing isn't necessarily true. That being said, you're absolutely right in that it's not likely at all. Unless he has a coding friend he can trust to sort through his Frankenstein code and fix it. Which hasn't happened yet. It probably never will, but probably never is a far cry from absolutely never.
Title: Re: How is DF not technically doomed?
Post by: NorkasAradel on February 21, 2016, 10:53:32 pm
it's toady's pet project (he'll never stop working on it), and it's fanbase is insanely dedicated to the game (they'll never stop playing it)
it ain't goin anywhere m8
Title: Re: How is DF not technically doomed?
Post by: amistospindraca on February 21, 2016, 11:08:12 pm
Technically, Dwarf Fortress is doomed.  It won't survive the heat death of the Universe.  But this isn't particularly relevant to performance issues.

It was inevitable.

(Obligatory...)
Title: Re: How is DF not technically doomed?
Post by: TheBiggerFish on February 22, 2016, 07:11:40 am
I'm going to PTW, but this is a bit much !!NEEDLESS PANIC!!.
Title: Re: How is DF not technically doomed?
Post by: exdeath on February 22, 2016, 07:13:44 am

A entire other option is to remove some of the features designed over the years, like the dynamic world, in principle it is a very cool feature, but when playing a fort. Do one really care if the rest of the world is changing? As I remember it, that feature did cost something around 20% of the fps.

What???? This is one of the most important feature, so important that my opinion releasing this feature in anything other than the first version of an game, is releasing it too late.
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 22, 2016, 07:22:17 am
Yeah, the dynamic world is basically the whole point of the game. It doesn't do much right now, but as development continues we'll be interacting with the world as a whole in very meaningful ways, and vice versa.
Title: Re: How is DF not technically doomed?
Post by: Aachen on February 22, 2016, 04:13:14 pm
Doesn't anyone remember how Z levels killed this game?!
Title: Re: How is DF not technically doomed?
Post by: Putnam on February 22, 2016, 04:25:39 pm
A entire other option is to remove some of the features designed over the years, like the dynamic world, in principle it is a very cool feature, but when playing a fort. Do one really care if the rest of the world is changing? As I remember it, that feature did cost something around 20% of the fps.

1. that's the point of the game

2. the activated world's impact on FPS is near-negligible and constant; it's completely and utterly ridiculous to think that it's related to FPS death, since, y'know, it's explicitly the exact part of the simulation that isn't directly affected by fortress activities.

Also, to add: Moore's law is dead. Can't rely on that anymore.
Title: Re: How is DF not technically doomed?
Post by: Untrustedlife on February 22, 2016, 05:54:24 pm
Yeah, the dynamic world is basically the whole point of the game. It doesn't do much right now, but as development continues we'll be interacting with the world as a whole in very meaningful ways, and vice versa.

You can already interact really deeply with it in adventure mode, anyone suggesting to remove that feature clearly doesn't get the point of dwarf fortress.
Its been toady's goal the entire time and its finally in removing that would be indistinguishable from ruining the point of the game.

Its actually scary to think that someone wants it removed/thinks its a good idea,  its the point of dwarf fortress to effect the world and participate in history and world activation is a huge part of that.
removing that is a horrible step backward.
.
Title: Re: How is DF not technically doomed?
Post by: thvaz on February 22, 2016, 06:06:17 pm
Doesn't anyone remember how Z levels killed this game?!

Maybe my sarcasmmeter is broken, but you are right - doomsday people have been calling the end times of Dwarf Fortress since the old days.
Title: Re: How is DF not technically doomed?
Post by: NJW2000 on February 22, 2016, 06:08:55 pm
Slaves to Armok died when it went ASCII. People just can't accept that.


I wasn't actually born then, I suspect.
Title: Re: How is DF not technically doomed?
Post by: therahedwig on February 22, 2016, 06:40:51 pm
Noes, noes gaiz, ur all sycopanties, don't u see?

Obviciously, teh gaem dat cals itzelf "generic fantasy world simulator" shuld not simmerlatte phantasie wurlds.

Id ys fur simmerlating suckybies. *nods sagely*.

Kirkegaard, the above is not particularly aimed at you despite what context may imply. I have seen more often that people say that DF is *anything but fantasy world simulator*, and often this is a case of people honing in on one bit they like.

Like others have implied, world gen doesn't do much damage.

The new trees, which came in the same release are a different story. Furthermore, there's a thread in dwarf mode about a fort of nearly 250 years where the author can confirm the biggest drain is still the large ammount of dwarves.

World activation may not seem much now, especially if you live for infinite sieges, but within the next two years, with artefacts getting more meaning and armies arriving for them specifically or starting scenarios, it'll be vital. Hence why everyone is so confused over your statement.
Title: Re: How is DF not technically doomed?
Post by: Miuramir on February 22, 2016, 08:18:24 pm
Another thought I just had:

Toady's job is to create the best fantasy world generator and simulator.  Intel's job is to create a computer that can run it.  Right now, despite having over 100,000 employees, assets over $100 billion, and revenue over $55 billion... Intel is the one falling behind on their end of the process :)
Title: Re: How is DF not technically doomed?
Post by: TheBiggerFish on February 22, 2016, 08:21:53 pm
Another thought I just had:

Toady's job is to create the best fantasy world generator and simulator.  Intel's job is to create a computer that can run it.  Right now, despite having over 100,000 employees, assets over $100 billion, and revenue over $55 billion... Intel is the one falling behind on their end of the process :)
Hah!  Hahahahaha!
Hah!
Yes!
Yessss!
Sig'd!
Title: Re: How is DF not technically doomed?
Post by: AzyWng on February 22, 2016, 09:57:11 pm
Another thought I just had:

Toady's job is to create the best fantasy world generator and simulator.  Intel's job is to create a computer that can run it.  Right now, despite having over 100,000 employees, assets over $100 billion, and revenue over $55 billion... Intel is the one falling behind on their end of the process :)

FUCKING SIGGED!
Title: Re: How is DF not technically doomed?
Post by: TheBiggerFish on February 22, 2016, 10:10:00 pm
HEY!  I WAS THERE FIRST!  NO SIG THIEF!
Title: Re: How is DF not technically doomed?
Post by: funkydwarf on February 22, 2016, 11:20:26 pm
The facts:

1.it uses dev time to optimize. further devving (the other 57.94% of the game) will break most prior optimizations. Why waste all that devtime to optimize each microversion of this alpha when it will change?

2.Just cause it fun to play and works (mostly) doesn't mean its a "Release" ready 1.0 product. You get to play the alpha.(lucky you!)


these are easy to understand.  #1 in particular makes it to easy to see why Toady chooses the strategy of "optimizing once at the end" over "optimize every 10% or so"

It is a chosen strategy chosen by Toady.
People who press on insisting we will not be able to play DF in 2017 or even 2024, after learning fact #1,is trolling.

There is a version without world generation and big trees, its 34.11.  Its still available. The only thing missing is world gen and big trees...

added opinion: the cpu industry will be focusing on IPC(instructions per sec) again soon to now
Title: Re: How is DF not technically doomed?
Post by: tolkafox on February 23, 2016, 12:17:03 am
Ugh, just the title of this thread is enough to stir the grammar nazi within me.

The change logs are almost as entertaining as the game itself, therefore the game is not doomed as long as the change logs continue to bring spurs of spontaneous hilarity.

Coming up next: How is this thread not technically doomed?
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 23, 2016, 01:02:36 am
Coming up next: How is this thread not technically doomed?
Perpetual motion
Title: Re: How is DF not technically doomed?
Post by: Putnam on February 23, 2016, 01:19:25 am
(the other 57.94% of the game)

the third number in the version number refers to updates too small to add a percent since last percentage, not hundredths of percents. Next release is probably 0.42.07, but I'd hazard a guess that it's about halfway to 0.43.01. I had 0.42.01 pegged before release, and I had guessed that 0.40.01 would be somewhere between 0.38 and 0.42 and I figured 0.34 would be somewhere around 0.33-36, so I've been pretty good so far.
Title: Re: How is DF not technically doomed?
Post by: funkydwarf on February 23, 2016, 01:36:47 am
Heh, oh yeah that makes sense. The versioning information.

We should make this the general chat thread.

Title: Re: How is DF not technically doomed?
Post by: Dirst on February 23, 2016, 06:10:32 am
Heh, oh yeah that makes sense. The versioning information.
I think we are more than 42% of the way there.  Some of the major features (the .01s) are bigger than others, and world activation was a really big one.  Another big one or two coming near then end will be cleaning up the interface.

We should make this the general chat thread.
I like corn chips.
Title: Re: How is DF not technically doomed?
Post by: Shonai_Dweller on February 23, 2016, 08:25:08 am
Artifacts, magic and alternate dimensions will be big.
The world economy will be massive.
Laws, crime and punishment will have a pretty big effect.
Playable human, elf and goblin sites will need a whole lot of extra features to be anything other than 'dwarves in trees/pits/houses'.
Controllable armies/raiding squads will be big.

Honestly I'm surprised we're not still at version 0.25. :)

The one I'm looking forward to which isn't too huge and hopefully will get started with artifacts is the nemesis arc. A fantasy world simulator is a wonderful thing but it'll never truly make epic fantasy stories without totally evil bad guys acting out their dark ambitions to world shattering effect.
Title: Re: How is DF not technically doomed?
Post by: Urist McVoyager on February 23, 2016, 08:45:46 am
I'm just looking forward to Toady adding plant based farming and processing to the ADVFort stuff he's got going on right now. Hands down if he adds in the ability to make and run a farm, I will playtest it myself until I can honestly say it's the best Harvest Moon sequel out there. :P
Title: Re: How is DF not technically doomed?
Post by: khearn on February 23, 2016, 09:31:18 pm
I just read through this, and boy, there are some misconceptions. I'm going to say some things a lot of DF fans don't want to hear, but that doesn't make them any less true. I'm a big DF fan. I've been playing for years, off and on (I just checked and my first post was back in 2011), and I don't particularly like writing this. But just ignoring reality because you don't want it to be true doesn't really make things better.

A little background: I work at Google as a Release Engineer, and I've been in the software engineering field since 1990 doing development for a while (compiler optimizers and kernel/NFS development) and then switching to Release Engineering for most of my career. I'm not an expert in multi-threading, but I know a pretty fair amount about the software life cycle and when you need to do certain tasks along the way. And I've seen a lot of mistakes made. I also have a tendency to make long sentences with too many commas in them. I apologize in advance for that.

1) CPUs will not magically continue to get faster and save us all from FPS death. Moore's law is pretty much dead. Single threaded CPU performance on consumer-grade CPUs has plateaued, and will not improve much unless someone figures out a way to change either the speed of light, the laws of thermodynamics, the size of a silicon atom, or the charge on an electron. We're up against some basic, low-level physics limitations and that's not likely to change. Ever.

2) Quantum computing will not magically make DF faster, because DF can't run on a quantum computer without a complete re-write that would make multi-threading look trivial. Quantum computers are weird, probability engines, that give me a headache just trying to figure out what they are capable of doing. They're not just magically faster CPUs that can run the same code as X86s. Same goes for most other non-silicon based future computer designs out there.

3) You can't just put off optimization until the code is feature complete and wave your magic wand of optimization (-O5) and make everything faster. You need to design in optimization from the start, because when it comes time to optimize, if you didn't plan on doing it, you'll probably have to make significant changes in your code to do it. And that will break other things, which will require significant changes, which will break other things, and so on. If you are going to have to do something with every object on the map, you'd better make sure from the start that what you do to one object doesn't affect what you will do with the next one, or you are doomed to having poor performance because you have to do them all sequentially. Once you have a situation like that, and at the end of the development cycle you decide to make it parallelizable because it's a major bottleneck (which it certainly will be), you now have to change they way things work at a very basic level, which will break other things. if nothing else, it will break every existing fort design that depends on that functionality, because you'll have to change how things actually function in the game, not just how they're implemented.

This is where I suspect Toady has currently gotten himself (but I obviously don't know for sure). He started writing DF when Moore's law was still going full steam, and making it multi-threadable didn't seem important at the time. Plus, I doubt he had much experience with multi-threading, so he probably didn't design for it from the start. It's non-trivial. I almost certainly wouldn't have done it either. And I'd be in the same state as he is now.

4) Saying "I'm not going to optimize this version because I may change things in the future and have to re-optimize" is just wrong. Because if you aren't thinking about optimization now, when will you start thinking about it? When you re-implement this feature? No, because you'll still be saying "I'm not going to optimize this version because I may change things in the future and have to re-optimize". Until you get to the end and you have a completely un-optimizable design and have to redesign lots of major parts. It might actually be easier at that point to start over from scratch (really, I'm completely serious).

The only way I can see to get significant speed improvements for DF is to implement multi-threading. There are just too many operations that are done on either every creature on the map, or every object, or even every tile (temperature, I'm looking at you), and doing that kind of thing sequentially is simply not scalable. This year's CPUs aren't more powerful than last year's because they do sequential things faster. They're faster because they do parallel things faster, and modern programs are designed to do things in parallel. And that's the way things are going to be for the foreseeable future. There may be some minor tweaks that can be done to make a sequential program like DF a little faster, but that will only take you so far. It won't get you past the very basic structural limitation of having to do everything in sequence,      one      thing       at      a      time.

Google isn't able to give you search results while you're still typing your query because they run it on one, super-fast CPU. I don't know off the top of my head what clock speed the current machines are running at (and even if I did know I couldn't tell you), but they're not something exotic that requires cryo-cooling. Google gives amazingly fast results because they shard the problem out to multiple threads on multiple, fairly ordinary, machines (that much, I can tell you). That's the way Deep Blue beat Kasparov at Chess, that's the way Watson beat Rutter and Jenning at Jeopardy, and that's the way AlphaGo beat Fan Hui at Go.

Putting multi-threading off until the end won't make it less work, it will make it more work. Designing things from the start for multi-threading, and making sure every re-design along the way supports multi-threading is actually the easiest way to do it. Taking a big, complex single-threaded program and making it multi-threaded is going to be nearly impossible. It's actually far, far easier to just make it multi-threaded as early as possible and just keep it multi-threaded as you go.  At some point he's just going to have to bite the bullet and do it and the longer he puts it off, the harder it's going to be. I just hope it's not already too late.

Frankly, I don't know what he can do at this point. He needs to either get some serious experience with multi-threading, which isn't going to happen while he's implementing single-threaded features in DF, or he needs to decide that he trusts someone who has experience in multi-threading with his code, which also seems unlikely. But either way, he's got to learn about multi-threading so he can continue coding without breaking things once it has been multi-threaded.

Trying to learn about multi-threading while implementing it on something as complex as DF is probably just going to result in a badly implemented multi-threaded DF. It's just too complicated to get it all right the first time you do it. Maybe he needs to start a side project. Some other program that he can work on with the idea of making it multi-threaded from the start. Maybe collaborating with someone experienced who would be willing to mentor him and teach him the ropes (threads?). So them he can take what he learns from the other project and apply it to DF. It would slow down DF development for a while, but he's got to learn it at some point, and the longer he puts it off, the worse it's going to be.

The other option I see is that he never gets around to optimization and DF just grinds to, well, not really a halt, but to the point where it's no longer able to do what he wants.

I'm sorry if the above ruffles some feathers. Those of you who hang around the Dwarf Mode Discussion board should know that I'm a fan of the game and generally know what I'm talking about, but am willing to be clear about it when I'm not sure of what I'm saying. I'm not someone who showed up, played a few times, and decided it's all wrong and needs to be changed to suit what I want from it. I know it's Toady's game, and I have great respect for him for keeping it as his game. I've made multiple donations over the years because I respect what he's doing. But that doesn't mean I think he's doing everything right, and I think I do him more of a favor by pointing out where I think he needs to make changes, rather than just saying "everything will be sunshine and unicorns."

Sorry this got so long.
Title: Re: How is DF not technically doomed?
Post by: TheBiggerFish on February 23, 2016, 09:55:49 pm
Makes sense...
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 23, 2016, 10:08:47 pm
Makes sense...
Yeah, but a lot of the principles apply to things that aren't DF.

1) CPUs will continue to get faster; ferex. AMD is working on a new line of processors optimising single-core performance. Moore's law may be dead, but we will see improvements until the end of time. That's how technology works. It's not something to rely upon, but saying technology won't improve is very strange.

3) You can of course put off optimisation until the code is feature-complete and then gut the entire thing to make it faster. It's not necessarily the best tactic, but it's the one Toady's following (presumably because the bulk of the engine was written ~10 years ago and Toady admits he was not the programmer then that he is now).

Multithreading is basically untenable for DF mechanics-wise. 90% of the stuff the game does requires things to be done in order, i.e. one thing at a time. It's like multithreading Minecraft - you can put chunk loading, rendering, and all these other things in separate threads, but you can't split up the core game (i.e. where most of DF's lag comes from) without buggering the core mechanics.

Quote
The other option I see is that he never gets around to optimization and DF just grinds to, well, not really a halt, but to the point where it's no longer able to do what he wants.
No, not at all. When .40 was released the world simulation was really really slow, so Toady spent a few days fixing it up to run faster. Now it's good enough that it has very little impact on gameplay. Toady is capable of optimising when he wants to.
Title: Re: How is DF not technically doomed?
Post by: TheBiggerFish on February 23, 2016, 10:50:44 pm
Aaaaand that ALSO makes sense.
Title: Re: How is DF not technically doomed?
Post by: Libash_Thunderhead on February 23, 2016, 10:52:42 pm
Multithreading is basically untenable for DF mechanics-wise. 90% of the stuff the game does requires things to be done in order, i.e. one thing at a time. It's like multithreading Minecraft - you can put chunk loading, rendering, and all these other things in separate threads, but you can't split up the core game (i.e. where most of DF's lag comes from) without buggering the core mechanics.
Either that, or put things like AI(include pathing) in other threads. Problem is you'll never get the same result even if you start the game with exactly the same RNG seed.
Title: Re: How is DF not technically doomed?
Post by: cochramd on February 23, 2016, 11:07:52 pm
Multithreading is basically untenable for DF mechanics-wise. 90% of the stuff the game does requires things to be done in order, i.e. one thing at a time. It's like multithreading Minecraft - you can put chunk loading, rendering, and all these other things in separate threads, but you can't split up the core game (i.e. where most of DF's lag comes from) without buggering the core mechanics.
Either that, or put things like AI(include pathing) in other threads. Problem is you'll never get the same result even if you start the game with exactly the same RNG seed.
That doesn't sound like a problem at all.
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 23, 2016, 11:23:34 pm
Pathing doesn't use random seeds anyway.

I could see AI/pathing stuff working if done multi-threadedly, in a fairly simplistic way. Trying to do asynchronous AI updates in DF would be nightmarish.
Title: Re: How is DF not technically doomed?
Post by: Libash_Thunderhead on February 23, 2016, 11:37:27 pm
Pathing doesn't use random seeds anyway.

I could see AI/pathing stuff working if done multi-threadedly, in a fairly simplistic way. Trying to do asynchronous AI updates in DF would be nightmarish.
What I was trying to say is you don't have the same result even if you stard with the same save.
One time, maybe the goblin out smart Urist and another time, Urist kills the goblin because the latter's thread fails to complete before his?
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 23, 2016, 11:43:24 pm
Oh, yeah, that's what I meant by asynchronous.
Title: Re: How is DF not technically doomed?
Post by: khearn on February 24, 2016, 12:00:37 am
Makes sense...
Yeah, but a lot of the principles apply to things that aren't DF.

1) CPUs will continue to get faster; ferex. AMD is working on a new line of processors optimising single-core performance. Moore's law may be dead, but we will see improvements until the end of time. That's how technology works. It's not something to rely upon, but saying technology won't improve is very strange.

No. Once you get transistors so small that the charge from one starts causing the one next to it to fire (which is where they are now), you can't make them any smaller. If they can't get any smaller, they can't really get much faster. There is a smallest size something can be, and we're pretty much there. There may be room for a little more improvement, but you won't see the increases we've seen so far. My first PC had a clock in single-digit MHz, now there' in single digit GHz, about a thousand times faster. We won't ever see another thousand time improvement in single threaded performance. I doubt they'll even manage to double what they've got now, as far as single threaded goes. There's just no place to get it.

3) You can of course put off optimisation until the code is feature-complete and then gut the entire thing to make it faster. It's not necessarily the best tactic, but it's the one Toady's following (presumably because the bulk of the engine was written ~10 years ago and Toady admits he was not the programmer then that he is now).

Multithreading is basically untenable for DF mechanics-wise. 90% of the stuff the game does requires things to be done in order, i.e. one thing at a time. It's like multithreading Minecraft - you can put chunk loading, rendering, and all these other things in separate threads, but you can't split up the core game (i.e. where most of DF's lag comes from) without buggering the core mechanics.

It's only untenable because it wasn't designed to be multi-threaded. That's exactly my point. It shouldn't require stuff to be done in order. Are you familiar with Conway's game of Life? Every cell changes at the same effective moment, even though they may be calculated either sequentially or in parallel. If you implement it starting in the top left and changing cells as you go, it's ends up all wrong. You go through the entire array, calculating each cell independently, and creating a new array with the results. Then swap the arrays when everything is done.

The timing of mechanisms shouldn't depend on the build order (which indicates that he's just going sequentially through a list, making changes in place). If he just calculated each device based on the state of other devices at the start of the tick, then changed states of everything at once, then everything could be done in parallel.

Temperature calculations are also amenable to the same technique.

Most pathfinding and AI decisions could probably also be done in parallel, if they were written to be done so.

But changing them to be parallelizable will break other things that rely on the current behavior. And trying to change them all at the last minute will cause lots of breakages at once, which will be much harder to debug.

Quote
The other option I see is that he never gets around to optimization and DF just grinds to, well, not really a halt, but to the point where it's no longer able to do what he wants.
No, not at all. When .40 was released the world simulation was really really slow, so Toady spent a few days fixing it up to run faster. Now it's good enough that it has very little impact on gameplay. Toady is capable of optimising when he wants to.
There's only so much low-hanging fruit he can optimize. Every time it will take more effort to get less gain. Eventually he'll be spending a month to get a 1% gain. There's only so much he can get without dealing with the elephant in the room.

I'm not sure I've ever seen a program that screams out for multi-threading as much as DF. There are just so many places where he goes through a list or array, doing the exact same operation to every element. That's exactly the type of thing where multi-threading wins. if you go from one thread to 4, you get through the list almost 4 times as fast. And 4 threads is pretty low for a modern CPU. Most can probably handle more like 10-16 threads. He won't ever get that kind of improvement just optimizing single-threaded code.
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 24, 2016, 12:54:56 am
Quote
No. Once you get transistors so small that the charge from one starts causing the one next to it to fire (which is where they are now), you can't make them any smaller. If they can't get any smaller, they can't really get much faster.
That's the same logic that says we'll never be able to go from Moscow to Beijing in a day or two because horses can only gallop so fast.

Anyway, re: multithreading:
Quote from: Toady on the reddit AMA
The short answer is that I don't know how to do it [muktithreading], it'd probably break things and take forever, but there are definitely places where it would help.
Should it be done? Probably. Is it going to happen? Not any time soon.
Title: Re: How is DF not technically doomed?
Post by: khearn on February 24, 2016, 01:35:33 am
Quote
No. Once you get transistors so small that the charge from one starts causing the one next to it to fire (which is where they are now), you can't make them any smaller. If they can't get any smaller, they can't really get much faster.
That's the same logic that says we'll never be able to go from Moscow to Beijing in a day or two because horses can only gallop so fast.
No, it's the logic that says we'll never travel from Moscow to Beijing in less than 19.31 milliseconds.

(That's 5,790 km from Moscow to Beijing divided by the speed of light.)

We can go faster than horses. We can't go faster than light. There are absolute limits in this universe. We're running up against them when it comes to semiconductors. Really. Science isn't this magical hat you can always pull one more rabbit out of. Eventually you simply hit a limit.

Anyway, re: multithreading:
Quote from: Toady on the reddit AMA
The short answer is that I don't know how to do it [muktithreading], it'd probably break things and take forever, but there are definitely places where it would help.
Should it be done? Probably. Is it going to happen? Not any time soon.
Exactly. He knows he needs to do it and doesn't know how, so he needs to learn. That's what I said.

The other option is that he does nothing but keeps adding features and it keeps getting slower. He's only got less than half of the features done. And already a lot of people are doing 2x2 embarks with only one cavern layer, severely lowering their pop caps, and religiously atom-smashing everything they can. The ostrich algorithm isn't going to work much longer here.
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 24, 2016, 02:00:14 am
Well, whatever.
Title: Re: How is DF not technically doomed?
Post by: Putnam on February 24, 2016, 02:29:10 am
sorry i just tried implementing a liquid system using multithreading as a proof of concept and adding a print statement to the start of the chunk processing function makes it run faster

i'm... gonna... just sorta... cry? a little bit
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 24, 2016, 03:11:42 am
sorry i just tried implementing a liquid system using multithreading as a proof of concept and adding a print statement to the start of the chunk processing function makes it run faster

i'm... gonna... just sorta... cry? a little bit
Your code is haunted.

Anyway, Terraria does a multithreaded fluid thing, which is pretty cool. Means you can drain an ocean and only the water will lag, not the rest of the game.
Title: Re: How is DF not technically doomed?
Post by: Libash_Thunderhead on February 24, 2016, 03:28:24 am
sorry i just tried implementing a liquid system using multithreading as a proof of concept and adding a print statement to the start of the chunk processing function makes it run faster

i'm... gonna... just sorta... cry? a little bit
Your code is haunted.

Anyway, Terraria does a multithreaded fluid thing, which is pretty cool. Means you can drain an ocean and only the water will lag, not the rest of the game.
Does it mean on a slower pc, it drains slower? In DF, your miner has a high chance to survive than on a fast pc?
Title: Re: How is DF not technically doomed?
Post by: Putnam on February 24, 2016, 03:30:44 am
Yeah, I would probably have the main thread wait for the water code to complete. I doubt it would cause it to be slower... well, I don't doubt that at all actually, for a bad implementation, but that's a bit pessimistic to assume.
Title: Re: How is DF not technically doomed?
Post by: Bumber on February 24, 2016, 07:36:03 am
Quote
No. Once you get transistors so small that the charge from one starts causing the one next to it to fire (which is where they are now), you can't make them any smaller. If they can't get any smaller, they can't really get much faster.
That's the same logic that says we'll never be able to go from Moscow to Beijing in a day or two because horses can only gallop so fast.
No, it's the logic that says we'll never travel from Moscow to Beijing in less than 19.31 milliseconds.

(That's 5,790 km from Moscow to Beijing divided by the speed of light.)

We can go faster than horses. We can't go faster than light. There are absolute limits in this universe. We're running up against them when it comes to semiconductors. Really. Science isn't this magical hat you can always pull one more rabbit out of. Eventually you simply hit a limit.
Dig a tunnel. Build a larger/smarter CPU. Lateral thinking. Improvement doesn't have to be limitless, just enough to serve our purposes.

Maybe someone will develop a library that makes multithreading less difficult than it is right now.
Title: Re: How is DF not technically doomed?
Post by: Dirst on February 24, 2016, 09:53:59 am
Multithreading is not as simple as setting a compiler flag, but it's also not an indivisible design foundation that must be all-or-nothing.  Toady can start by making more formal interfaces to tasks so that they accept a state-of-the-world and return output (which may or may not be a copy of that data structure in a new state).  At first everything would still be executed sequentially, but the "encapsulation" troubleshooting won't be commingled with timing troubleshooting.  Once there are a handful of severable tasks, then he can worry about spawning threads and weaving the results back in.

Of course, it makes sense to have a notion of how multithreading works before the start to identify the relatively low-hanging fruit.

The reason I said that multithreading "may or may not help" is because the updates that cause lag are already stuttered across time (growth checks every ten ticks, flow is not calculated for every tile every tick, temperature is only checked when certain events occur, etc.).  Players may not see a performance boost from a multithreaded simulation, but the simulation itself ought to be smoother.  Fortunately, this means that if some update cycles that take several ticks per run, it won't alter the fundamental nature of the game.  Though it will probably affect edge cases like carving fortifications into warm stone.
Title: Re: How is DF not technically doomed?
Post by: khearn on February 24, 2016, 11:41:50 am
Multithreading is not as simple as setting a compiler flag, but it's also not an indivisible design foundation that must be all-or-nothing.  Toady can start by making more formal interfaces to tasks so that they accept a state-of-the-world and return output (which may or may not be a copy of that data structure in a new state).  At first everything would still be executed sequentially, but the "encapsulation" troubleshooting won't be commingled with timing troubleshooting.  Once there are a handful of severable tasks, then he can worry about spawning threads and weaving the results back in.
Quote

I agree 100%. This is why he needs to start working on it now, not just put it off until "the end." If he decides to redo the way mechanisms work, he should go ahead and redo it in a way that makes each operation that takes place in a tick be independent of the other operations in the same tick. So that some time in the future it will be possible to multithread it without another major rewrite.

If you say "I'm not going to optimize this for multithreading now, because I might rewrite it some time in the future" what you're really saying is "I will have to rewrite this in the future when I get around to multithreading."

Of course, it makes sense to have a notion of how multithreading works before the start to identify the relatively low-hanging fruit.

Yeah, this is the tough part. It's a complicated thing, and trying to learn while implementing it on a major project like DF is likely to result in plenty of "learning experiences." That's why I think he should try a side project specifically so he can get experience at multithreading before trying to implement it in DF. A mentor who can coach him through the learning process would also be wonderful, but hard to come by. I'm not volunteering because I don't have enough experience in the subject to be able to help.

If I got stuck managing a software project similar to DF, something singlethreaded that really needed to be multithreaded, but had no one on the team with multithreading experience, I wouldn't enroll my programmers in multithreading courses. I'd try to hire someone with experience who can join the team and act as a guide and architect. But DF isn't being developed by a team, and that's not likely to change (and I'm not criticizing that, I respect Tarn for it). That does make it a lot harder to add new skills when they are required, though. But it doesn't mean those new skills shouldn't be acquired.

And as a programmer who is getting a little bit along in years, I can say from experience that it's easier to learn major new paradigms earlier than later. When I was in my 20s & 30s, picking up new languages and systems was easy, now that I'm in my 50s I have to work a lot harder at it. He can learn multithreading now, or he can wait 20 years and have to work a lot harder.

Or I suppose he can just hope he dies before he gets to the point where he has to deal with it, but I sure hope he's not taking that strategy. :)
Title: Re: How is DF not technically doomed?
Post by: Shonai_Dweller on February 24, 2016, 05:18:49 pm
Toady often mentions that he takes breaks from coding DF to work on 'side projects' but doesn't like to mention what they are. Since one of these resulted in a 64-bit DF, it could be that he's already been experimenting and learning about multi-threading (and more effective pathing and other such stuff) for a while. Just because he hasn't mentioned it, doesn't mean he isn't aware of the issue or is hoping it will go away as a lot of these type of threads seem to imply.
Title: Re: How is DF not technically doomed?
Post by: Bumber on February 24, 2016, 05:35:45 pm
The reason I said that multithreading "may or may not help" is because the updates that cause lag are already stuttered across time (growth checks every ten ticks, flow is not calculated for every tile every tick, temperature is only checked when certain events occur, etc.).  Players may not see a performance boost from a multithreaded simulation, but the simulation itself ought to be smoother.  Fortunately, this means that if some update cycles that take several ticks per run, it won't alter the fundamental nature of the game. Though it will probably affect edge cases like carving fortifications into warm stone.
And there might be other things that could be checked less often, but aren't.

In my fort I had jobs for clothing queued up in the manager. When my cloth ran out, my announcements were filled with constant spam that dropped my FPS from 100 down to 20. Checks like this need to happen less frequently because they are not high precision and aren't likely to change state quickly. This would also apply to unreachable (e.g., in a tree) items. If you can't reach it, stop trying for a while. It's not going to change unless the map changes. Unnecessary pathfinding is expensive.
Title: Re: How is DF not technically doomed?
Post by: Libash_Thunderhead on February 24, 2016, 09:08:36 pm
In my fort I had jobs for clothing queued up in the manager. When my cloth ran out, my announcements were filled with constant spam that dropped my FPS from 100 down to 20.

Maybe it is because the game log. The messages are being written in gamelog.txt.

Title: Re: How is DF not technically doomed?
Post by: Putnam on February 25, 2016, 03:01:55 am
game...log... written to hard drive... as you play.

the game runs faster... with an ssd...

because...

SHIET
Title: Re: How is DF not technically doomed?
Post by: Miuramir on February 25, 2016, 12:01:13 pm
game...log... written to hard drive... as you play.

the game runs faster... with an ssd...

because...

SHIET

One thing I've noticed with both DF and KSP (Kerbal Space Program) is that the logging works OK under normal circumstances, but isn't well handled when something abnormal occurs.  In KSP that's usually because of a buggy mod (or interactions between two mods that don't play well with each other), but DF is more likely to generate weirdness due to odd combinations of player actions, and the default level of logging is higher. 

How practical would it be for someone to experiment with a setup that puts the files DF writes to regularly on a RAM drive, which then only copies to the actual hard drive in the background every so often (per minute?)?  A bit fiddly, but in certain cases it could probably provide a speed boost. 

In some senses, as an early Alpha piece of software, logging directly to disk as you go despite any performance issues is the "right" answer, in case the program crashes or locks up.  But from an "operational" standpoint, some sort of cached log is more efficient. 
Title: Re: How is DF not technically doomed?
Post by: Dozebôm Lolumzalìs on February 25, 2016, 03:25:09 pm
Honestly, the practical solution would to have saving sync the announcement file in RAM with the announcement file on the hard drive, because if the program crashes, you lose all progress since the last save.

So if it's:

1 Granite: Save

2 Granite: Do stuff

3 Granite: Crash

My way would have the log include everything up until Granite 1st, and thus include the actual history of the world after the crash.

The way it is now, the log would say:

1 Granite: Stuff

2 Granite: Stuff (that never happened)

3 Granite: Stuff (that never happened)

2 Granite: Stuff that happened

Which is very confusing.
Title: Re: How is DF not technically doomed?
Post by: Dozebôm Lolumzalìs on February 25, 2016, 07:29:51 pm
GUYS THERE IS A MISCONCEPTION

Multithreading DOES NOT afaik say, "do this until you're done, then merge it back in. We'll keep on doing stuff until you're done." It says, "everybody work on their own thing, then once every single thing is done we'll merge it all together and move on to the next tick."

There is absolutely no difference in the user's perceived results with or without you multithreading, except better FPS. (As long as it's done right) Multithreading allows for multiple processors (or some techy word like that) to work individually on a part of the workload at the same time.

Everyone who's saying things like "water speed will be dependent on processor speed" or "history could go differently" is very wrong. Unless there's this other thing called "multithreading" that involves really bad coding habits.

Now, I suppose for something like non-game coding, it might make sense to have one thread move on while the other is still working. But in DF, every thread's results can affect the entire world. In the-other-coding, there might be something else Thread 1 can work on that doesn't depend on Thread 2's results. There is no such thing Thread 1 could do, save another part of the processing for the tick.

For instance: Thread 1 does all the temperature, Thread 2 is still working on worldgen in the background, Thread 3 is still working on fluids, so Thread 1 moves on to pathfinding, but at the end of the day, the tick only advances when everything is done.
Title: Re: How is DF not technically doomed?
Post by: Libash_Thunderhead on February 25, 2016, 07:33:50 pm
game...log... written to hard drive... as you play.

the game runs faster... with an ssd...

because...

SHIET
Well I was talking about the job cancel message spam. Usually log has little to none effect against fps.
Title: Re: How is DF not technically doomed?
Post by: khearn on February 25, 2016, 08:11:37 pm
Normally the traffic to the gamelog is pretty minor. Well under one line per second. Even when in siege lockdown and lots of burrow-related cancellations it shouldn't be enough to seriously affect your FPS. Even when you run out of a resource with jobs in the manager depending on that resource, the writing to gamelog.txt shouldn't be significant.

As a test, I just queued up 20 gold chains in the manager, while I have no gold bars. I was at 85 FPS when I did this. I'm now  getting the cancellations, but I'm only getting about 1 line per second in my gamelog.txt, and most of those lines are like this:

'Metalcrafter' Adiltaguz, Engraver cancels Forge gold Chain: Needs 1 gold bars.
x2
x3
x4
x5
x6
x7
x8

I'm seeing about 1 "xN" per second. That's pretty insignificant, even on a spinning aluminum disk. My FPS is now at 79. I then cancelled the manager job, and now my FPS is at 83. So the cancellation spam isn't enough to drop you from 100 to 20 by itself.

jwoodward48df: while I agree with you about multi-threading not causing things like speed to change relative to everything else, I can see how multithreading could cause history to go differently.

In a single-threaded world, if you start with a given random number seed, you can count on the game doing the same thing each time because every access to the RNG will happen in the same sequence. The first run through it will decide what Urist s going to do, pick some random numbers in the process, then decide what Sibrek will do, picking some random numbers, then Tosid, etc. And the next time you replay with the same seed, it will go through in the same order, and pick the same numbers, and come up with the same decisions.

But in a multi-threaded world, It will create separate threads for Urist, Sibrek, Tosid, and everyone else, and process each thread independently. Given that there are probably other processes on the machine, there is no guarantee that the dwarves will be handled in the same order each time. Sibrek's thread could be on the same processor as some malware you didn't know about that's sending out 1000 emails advertising Viagra, and thus not run as fast (or maybe you just opened gmail in chrome, whatever). So Tosid's thread hits the RNG before Sibrek's thread, and the numbers come out in a different order, resulting in different decisions being made.

I suppose it's possible to make some sort of system that creates a separate RNG seed for each thread as they are created (which should always be in the same order), so each thread will always get the same numbers, regardless of timing. But I don't know if that's actually done. If something like that really is done, then I would agree, that multi-threading wouldn't change history from run to run with the same seed.


Title: Re: How is DF not technically doomed?
Post by: Dozebôm Lolumzalìs on February 25, 2016, 09:20:17 pm
1. It would be "thread one is fluids, thread two is paths", NOT "thread one is Urist".

And I'm not sure how DF isn't already how you're describing it: like the universe, it is not quite predetermined from a given input. Try saving the game just before a battle, then providing no player input. If I'm right, multiple playthroughs of the same battle will produce different results. An easy way is to record your dwarves' deaths.
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 25, 2016, 09:29:40 pm
Battles will turn out differently because to-hit chances are fairly random. The AI is mostly not random AFAIK.

...

Multithreading would be much more simple to implement in this sort of pattern:

Call for tick update
Spawn threads to calculate AI, pathing, fluids, etc. based on the last tick
Wait for each thread to finish
Update the world to match the results

rather than doing the parallel updates thing you guys think to seem would happen.
Title: Re: How is DF not technically doomed?
Post by: Libash_Thunderhead on February 25, 2016, 10:12:35 pm
As long as DF doesn't implement something like action replay it shouldn't be a problem.

Spawn threads to calculate AI, pathing, fluids, etc. based on the last tick
Wait for each thread to finish
Update the world to match the results

rather than doing the parallel updates thing you guys think to seem would happen.
Oh, I think I get what you mean. It is like putting AI in another thread other than putting Urist's AI and Tosid's AI in different threads.
 For example, Urist and Tosid both move towards the same tile. The result would be different if Tosid's pathing was done before Urist's and vice versa.  But still, some thread may need results from another thread to complete its calculations, means it has to wait. Fluid first or pathing first may have different outcomes.
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 26, 2016, 03:03:25 am
It's more that all the processing done each tick gets divided up so that one core isn't doing all the work. The way it generally works is that you have a thread "pool". Tasks are assigned to each thread, and once they finish their task they move on to the next one. All tasks done, everything syncs up, and you're done.
This is what I was trying to say. Thanks.
Title: Re: How is DF not technically doomed?
Post by: NJW2000 on February 26, 2016, 12:09:55 pm
So... can I just check I'm taking the right information out of this?

1. Modern computer speed gains are almost entirely dependent on multi-threading.

2. Multi-threading is different from most other optimising, which would be doing little tricks with the code done, rather than changing the way the computer runs DF.

3. Multi-threading as opposed to optimising the way the linear computing works would be more efficiently and easily implemented now as opposed to later.

4. Whether or not multi-threading could actually work really depends on how important the order of tasks completed is in DF: whether the computer can do all or any at once, or if there's a set order.

Pls Confirm for laymen.

Title: Re: How is DF not technically doomed?
Post by: funkydwarf on February 26, 2016, 05:25:17 pm
So if the only way to make a single core of a processor faster is to use a smaller manufacturing process, does that mean an AMD and Intel chip at the same manufacturing process size and hertz deliver exactly the same performance? Of course not, architecture matters, and the upcoming AMD Zen chip is trying to close the gap with Intel and is supposedly sporting a 40% IPC gain from architecture alone, independent of manufacturing process.

Don't be so sure we are done making cores run faster.
Title: Re: How is DF not technically doomed?
Post by: NJW2000 on February 26, 2016, 06:17:08 pm
Yes to all 4, and that multithreading also requires an entirely different perspective on how the game functions as a whole. Instead of things changing the map, you have things creating a stream of pending changes to the map that are then processed each tick. There's more to it, but generally it requires a complete restructure of thought.

More specifically:

1) Yes; more so as time increases and we reach worse and worse limits when it comes to individual processor improvements
2) Yep; it requires significant code restructuring, not just a few inserted lines here and there
3) It's more efficient than simply trying to optimize linear functions when done correctly, and will always be easier the earlier you implement
4) Yep; if Toady relies on, say, the water in the area being updated before he does action processing for combat, that'll be a big problem

Regarding 4) : should someone who knows what they're talking about ask toady if a lot of DF functions like this in a future of the fortress question?
Title: Re: How is DF not technically doomed?
Post by: Miuramir on February 26, 2016, 06:21:12 pm
So... can I just check I'm taking the right information out of this?

1. Modern computer speed gains are almost entirely dependent on multi-threading.

Not really... but the diminishing returns are leveling off.  The three major categories of improvement *other* than "more cores" are raw clock speed, architecture improvements, and process size.  Raw clock speed improvements has been leveling off for some time, process size improvements (die shrink) is leveling off sharply, and architecture improvements are starting to level off. 

Consider:
This chart of single-thread performance (http://"https://www.cpubenchmark.net/singleThread.html")
This 2012 article on historical single-core performance (http://"http://preshing.com/20120208/a-look-back-at-single-threaded-cpu-performance/")

Back in the earlier days of DF, single-core performance was climbing at around 50% per year.  Somewhere around 10 years ago, it started to level off toward 20% per year by some measures, or even negative by others.  And most of the gain was from Intel. 

Clock speeds have severely leveled out; a nice but not exceptional CPU from 2008 might be 3.3 GHz, and fairly few people today have CPUs over 4 GHz.  In terms of single-thread performance, that 2008 CPU is about 700% of an (older) baseline, and the best available desktop today for single thread is only about 1,200%... so that's only about a 70% increase in *eight years*. 

Quote
2. Multi-threading is different from most other optimising, which would be doing little tricks with the code done, rather than changing the way the computer runs DF.

Optimizing, for multi-threading or otherwise, is rarely little tricks.  It's frequently a very time consuming process involving code analyzers, and doesn't port well; beyond the simplest stuff like taking out debug code, optimizing for 64-bit Linux on Intel CPU with gcc compiler may be completely different from optimizing for 32-bit Windows on Atom with Visual Studio, or whatever.

In particular, optimizing for newer CPUs frequently breaks compatibility with older ones.  A significant fraction of the speedup in modern CPUs is better ways of doing things, which aren't applicable or don't work on older ones.  Toady has been pretty good about leaving in support for older systems, partly because performance increases aren't as big of a concern this early, and maintaining multiple builds was a major hassle with his older setup; so having one "runs everywhere" build was the simplest solution. 

Among other things, the 64-bit build doesn't need to support anything older than around 2000 at all, basically Pentium 4 era, and quite possibly not older than 2003 or so.  If we are lucky, cleaning out the 386, 486, etc. structures may provide more improvements than the minor hit to word length costs. 
Quote
3. Multi-threading as opposed to optimising the way the linear computing works would be more efficiently and easily implemented now as opposed to later.
Multi-threading for *today's* computers of *today's code* would be more efficient done sooner.  Given that we really don't know what the computers of tomorrow will bring, it's highly speculative to say that optimization for the computers of today would help for the computers around when DF is closing in on 1.0.  How much effort to optimize for the new Pentium CPUs of 20+ years ago would still be valid today?  Much of the code has been replaced, and the architecture looks completely different; that's at least the sort of difference we may be looking at. 

One very possible answer is that CPUs may go the way of GPUs, with *thousands* of micro-cores.  In which case optimization might actually look at assigning a core (thread) per map tile and/or per dwarf, plus a few hundred for overhead.  Each micro-core would be responsible for tracking a "Game of Life" like simple state set for fluids like water, magma, and sand; plus some info about obstructions and occupancy.  (You could do this with GPGPU / OpenCL / CUDA programming on a GPU today, mind you; but that's very non-trivial to set up and would require a *second* powerful GPU in your system (other than any running your actual graphics), which is still rare.  There is a system down the hall that I work with that has four Tesla C2075 cards; each has fourteen 32-core subprocessors for 448 total cores, and 6 GB of on-board RAM, which sounds like a lot... but it's only 12 MB per core after ECC overhead and dividing it up.  Still, it's a more than 1,792 core system; it could for instance process a 32x32 sub-region in a single pass.)

If quantum processors kick in, one of the things that might be relevant is pathfinding; splitting up pathfinding into 2^(n-1) threads, where n is the number of Qubits in your quantum card, might be the thing to do. 

Quote
4. Whether or not multi-threading could actually work really depends on how important the order of tasks completed is in DF: whether the computer can do all or any at once, or if there's a set order.

That is ultimately adjustable.  For instance, the current fluid flow probably isn't the best way to do it if you're going massively parallel, for instance; but the subtle details of how fortresses flood under pressure may well change in the future as that is brought up to more modern standards.  I wouldn't count on u-bend tricks, wave behavior to trigger pressure plate timers, and the like working the same way ten years out, for certain. 

The important trick for multi-threading is *get the low hanging fruit first*.  Amdahl's law (http://"https://en.wikipedia.org/wiki/Amdahl's_law") will limit you eventually; nothing as complex as DF will ever be completely parallel, and cross-process communication takes an increasing toll.  It's also possible that things like memory access bottlenecks dominate performance so that parallel processing doesn't even affect much; if the limiting factor is really the amount of information that you can get between the main RAM and the CPU die, how many threads you're running on the die doesn't make much difference. 
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 26, 2016, 06:53:19 pm
Consider:
This chart of single-thread performance (http://www.cpubenchmark.net/singleThread.html)
This 2012 article on historical single-core performance (http://preshing.com/20120208/a-look-back-at-single-threaded-cpu-performance)
Fixed those links for you. The first is basically pointless because it lists CPUs in order of their single-thread performance, and all that tells us is that when you order CPUs by single-thread performance, it forms a gradually decreasing line. Shocking.
The second chart tells us that single-threaded performance has stopped increasing as quickly as it was, but is still going up steadily. Which kind of counters your point of "levelling off".
Title: Re: How is DF not technically doomed?
Post by: Bumber on February 27, 2016, 01:35:43 am
Don't hard disk writes require an interrupt that blocks the thread? Could be bad for single-thread DF if it works that way, although maybe it's handled elegantly by the compiler/OS.

Honestly, the practical solution would to have saving sync the announcement file in RAM with the announcement file on the hard drive, because if the program crashes, you lose all progress since the last save...
It's bad if you wanted to know what happened before the crash. The log prints **Loading Fortress** when you load the fortress back up, which helps weed out confusion.

GUYS THERE IS A MISCONCEPTION

Multithreading DOES NOT afaik say, "do this until you're done, then merge it back in. We'll keep on doing stuff until you're done." It says, "everybody work on their own thing, then once every single thing is done we'll merge it all together and move on to the next tick."
It's still much better than waiting for the first task to complete before even beginning the next. Only problem is you can't know what order things are being done in, which makes things damn near impossible to debug.

Oh, I think I get what you mean. It is like putting AI in another thread other than putting Urist's AI and Tosid's AI in different threads. For example, Urist and Tosid both move towards the same tile. The result would be different if Tosid's pathing was done before Urist's and vice versa. But still, some thread may need results from another thread to complete its calculations, means it has to wait. Fluid first or pathing first may have different outcomes.
It should be doable to put each creature's AI in its own thread, as long as you can handle the conflicts properly. Two dwarves try to grab the same sock? One of the tasks needs to be aborted when the threads rejoin. It's easy enough to solve thas issue, but there are all sorts of other ones you won't anticipate. That means lots of development time and headaches.

I don't think multi-threading is worth it right now when Toady needs to keep momentum towards getting all the Arcs done and shaping the game as only he can. I don't think it entirely unreasonable that Toady might end up opening up the source a little bit after he's taken the game as far as he's going to take it. Sure, it'll be hell trying to optimize it at that point, but we're talking about a community with people that maintain DFHack.
Title: Re: How is DF not technically doomed?
Post by: Sizik on February 27, 2016, 03:03:04 am
Disk writes shouldn't happen unless you're saving the game, so thread performance isn't really relevant there.
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 27, 2016, 03:09:25 am
But we literally just mentioned that the game log writes to disk during play
Title: Re: How is DF not technically doomed?
Post by: Sizik on February 28, 2016, 12:07:51 am
*facepalm*

Edit: Map writes are what I thinking of when I wrote that, which someone mentioned before.
Title: Re: How is DF not technically doomed?
Post by: Dozebôm Lolumzalìs on February 28, 2016, 12:19:59 am
Guys there is a misconception

I love that phrase, it's my new sig once I get back on my comp.

Anyway! I was responding to people who were afraid that if fluid logic had its own thread, the game would go on without it, and on slower computers, water would flow slower. Multi threading is great, and I never meant my statement to disparage its utility.
Title: Re: How is DF not technically doomed?
Post by: Dirst on February 28, 2016, 12:44:24 pm
Guys there is a misconception

I love that phrase, it's my new sig once I get back on my comp.

Anyway! I was responding to people who were afraid that if fluid logic had its own thread, the game would go on without it, and on slower computers, water would flow slower. Multi threading is great, and I never meant my statement to disparage its utility.
"What is that?"
"It's a wall of water rushing down the passage right for us!"
"So why is it, you know, just sitting there?"
"CPU must not be able to keep up the updates.  You know, more threads that cores."
"Wonder what is hogging up all the resources."
"Probably our AI.  So don't stop thinking."
Title: Re: How is DF not technically doomed?
Post by: galneon on February 28, 2016, 12:45:46 pm
This thread resulted in some excellent insights from khearn who could speak in more specific terms regarding the inevitable day of reckoning, and I hope Toady reads it at some point.  Khearn's well-established ethos warded off most of the rowdy locals in denial as DEET repels bloodthirsty mosquitoes.  I was not so protected, but I'm honored I was able to provide a platform for this dose of reality despite the protectionist furor it initially attracted.  I've emerged unscathed.
Title: Re: How is DF not technically doomed?
Post by: NJW2000 on February 28, 2016, 02:26:55 pm
This thread resulted in some excellent insights from khearn who could speak in more specific terms regarding the inevitable day of reckoning, and I hope Toady reads it at some point.  Khearn's well-established ethos warded off most of the rowdy locals in denial as DEET repels bloodthirsty mosquitoes.  I was not so protected, but I'm honored I was able to provide a platform for this dose of reality despite the protectionist furor it initially attracted.  I've emerged unscathed.
And you're being very agreeable about it.
Title: Re: How is DF not technically doomed?
Post by: Fniff on February 28, 2016, 02:32:30 pm
"What is that?"
"It's a wall of water rushing down the passage right for us!"
"So why is it, you know, just sitting there?"
"CPU must not be able to keep up the updates.  You know, more threads that cores."
"Wonder what is hogging up all the resources."
"Probably our AI.  So don't stop thinking."
And to the out-of-context thread she goes.
Title: Re: How is DF not technically doomed?
Post by: Dozebôm Lolumzalìs on February 28, 2016, 02:52:27 pm
Hey, khearn thought each dorf would have their own thread. What does he play on, a 10000-core machine? I DEMAND RECOGNITION FOR CORRECTING THE MISCONCEPTION

jk

Srsly, galneon, y u so mean? Who're u calling a "rowdy local in denial", a "bloodthirsty mosquito", a forumite with "protectionist furor"? Nobody deserves to be called that. Most everybody here has been civil. except u with ur mean words
Title: Re: How is DF not technically doomed?
Post by: Geltor on February 28, 2016, 03:11:14 pm
http://www.bay12forums.com/smf/index.php?topic=154172.0

this topic was approached from every direction in that thread. im surprised how many people think you need to re-invent df for concurrency support.

the only thing that stands in the way between you and an unlimited, 100 fps dwarf fortress forever is refactored path-finding with multi-threading. path-finding is the only major bottleneck of end-game performance in df (i say this with confidence). re-writing only that single section, no matter how difficult, surely must be easier than re-writing the entire game. if anything, that would be a great start.
Title: Re: How is DF not technically doomed?
Post by: Dirst on February 28, 2016, 03:34:03 pm
http://www.bay12forums.com/smf/index.php?topic=154172.0

this topic was approached from every direction in that thread. im surprised how many people think you need to re-invent df for concurrency support.

the only thing that stands in the way between you and an unlimited, 100 fps dwarf fortress forever is refactored path-finding with multi-threading. path-finding is the only major bottleneck of end-game performance in df (i say this with confidence). re-writing only that single section, no matter how difficult, surely must be easier than re-writing the entire game. if anything, that would be a great start.
It might be the place with the most bang for the buck, but it may not be the best place to start for any number of spaghetti-code reasons that only Toady knows.

Of course, if there is some off-the-shelf multithreaded A* solution lying around then pathing moves many places up in line for multithreading treatment.
Title: Re: How is DF not technically doomed?
Post by: Xazo-Tak on February 28, 2016, 04:12:01 pm
It's entirely possible, but it's also entirely the wrong time in the game's life to do so.
 all the time spent on the previous optimisation a waste

Making the game run better and faster is a job to wait until all the features are in, so there's less coding clashing going on. Once everything is in the game that Toady wants, that is when people should go back and look over it, find ways to make it faster, whatever. There's simply no point wasting time on something that could quite easily be rendered obsolete so quickly.
On the contrary, optimisation should be done as early as possible.
Otherwise you're building good code on a bad platform, and if the platform is changed the code has to be changed.
Unfortunately, it's too late in the game's development to do some really cool optimisations and improvements, moving away from a tile based system early on would have helped so much but now the whole game's built around tiles.

I had an idea for how pathfinding would work in mesh based terrain that could be applied to tile-based terrain though. Divide floors into rectangles as large as possible, since they're very simple to figure out pathfinding with.
Title: Re: How is DF not technically doomed?
Post by: Urlance Woolsbane on February 28, 2016, 04:17:50 pm
moving away from a tile based system early on would have helped so much but now the whole game's built around tiles.

Could you explain why you think that's the case? I don't see why it would be such a boon. Surely it would only make things more complicated?

It's worth noting that DF's predecessor, Slaves to Armok, wasn't tile-based. It's not as if Toady hasn't tried doing things that way
Title: Re: How is DF not technically doomed?
Post by: Xazo-Tak on February 28, 2016, 04:38:36 pm
moving away from a tile based system early on would have helped so much but now the whole game's built around tiles.

Could you explain why you think that's the case? I don't see why it would be such a boon. Surely it would only make things more complicated?

It's worth noting that DF's predecessor, Slaves to Armok, wasn't tile-based. It's not as if Toady hasn't tried doing things that way
It means objects can be located anywhere in space rather than being confined to a grid (Though it'd still be possible to keep the game looking exactly the same as it does now) which greatly simplifies physics calculations because there isn't the strange task of making physics apply to a tile-based game.
It also means that terrain and structures can be mesh-based, which is better for simulating their destruction and can have their vertices used as pathing nodes (If a beeline to the target destination is not possible, the AI is definitely going to make a beeline towards a vertex).
Title: Re: How is DF not technically doomed?
Post by: Putnam on February 28, 2016, 05:08:21 pm
moving away from a tile based system early on would have helped so much but now the whole game's built around tiles.

Could you explain why you think that's the case? I don't see why it would be such a boon. Surely it would only make things more complicated?

It's worth noting that DF's predecessor, Slaves to Armok, wasn't tile-based. It's not as if Toady hasn't tried doing things that way
It means objects can be located anywhere in space rather than being confined to a grid (Though it'd still be possible to keep the game looking exactly the same as it does now) which greatly simplifies physics calculations because there isn't the strange task of making physics apply to a tile-based game.

That is completely off-topic, unless you're actually saying that easy to program implies easy to compute. If so, I want this list sorted by bogosort in the next 5 minutes:

Code: [Select]
5 4 7 5 1 2 3 4 9 1 5 4 3 4 9 7 5 1 2 3 4 3 5 7 1 2

Bogosort is very simple to program, heck, here's a quick implementation in python:

Code: [Select]
import random
def bogosort(yourlist):
    while not all(yourlist[i] <= yourlist[i+1] for i in xrange(len(yourlist)-1)):
        random.shuffle(yourlist)
Title: Re: How is DF not technically doomed?
Post by: Urlance Woolsbane on February 28, 2016, 05:14:45 pm
moving away from a tile based system early on would have helped so much but now the whole game's built around tiles.

Could you explain why you think that's the case? I don't see why it would be such a boon. Surely it would only make things more complicated?

It's worth noting that DF's predecessor, Slaves to Armok, wasn't tile-based. It's not as if Toady hasn't tried doing things that way
It means objects can be located anywhere in space rather than being confined to a grid (Though it'd still be possible to keep the game looking exactly the same as it does now) which greatly simplifies physics calculations because there isn't the strange task of making physics apply to a tile-based game.
I'm not the most knowledgeable in this department, so have patience with my ignorance, but doesn't a tile-based system allows for Toady to "cheat" more easily than a mesh-based one? Most physical discrepancies in DF are invisible, which is beneficial not merely in terms of immersion, but also in regards to optimization. Surely not having to calculate each object's mesh (even rather primitive ones, per your proposal) frees up a fair amount of processing power for DF?

It also means that terrain and structures can be mesh-based, which is better for simulating their destruction and can have their vertices used as pathing nodes (If a beeline to the target destination is not possible, the AI is definitely going to make a beeline towards a vertex).
Agreed, but I'm not sure that's viable for something with the scale of DF. Look at the FPS-damage done merely by flooding or by smoke. Imagine the processing-strain resulting from simulating all the minuscule bits scattered by a cave-in.
Title: Re: How is DF not technically doomed?
Post by: Untrustedlife on February 28, 2016, 06:08:44 pm
moving away from a tile based system early on would have helped so much but now the whole game's built around tiles.

Could you explain why you think that's the case? I don't see why it would be such a boon. Surely it would only make things more complicated?

It's worth noting that DF's predecessor, Slaves to Armok, wasn't tile-based. It's not as if Toady hasn't tried doing things that way
It means objects can be located anywhere in space rather than being confined to a grid (Though it'd still be possible to keep the game looking exactly the same as it does now) which greatly simplifies physics calculations because there isn't the strange task of making physics apply to a tile-based game.

That is completely off-topic, unless you're actually saying that easy to program implies easy to compute. If so, I want this list sorted by bogosort in the next 5 minutes:

Code: [Select]
5 4 7 5 1 2 3 4 9 1 5 4 3 4 9 7 5 1 2 3 4 3 5 7 1 2

Bogosort is very simple to program, heck, here's a quick implementation in python:

Code: [Select]
import random
def bogosort(yourlist):
    while not all(yourlist[i] <= yourlist[i+1] for i in xrange(len(yourlist)-1)):
        random.shuffle(yourlist)

As a programmer That got me to laugh out loud +1 my friend +1.
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 28, 2016, 06:25:20 pm
If we're using python why not just list.sort()
Title: Re: How is DF not technically doomed?
Post by: Putnam on February 28, 2016, 06:26:43 pm
bogosort is bigger and better than list.sort(), which IIRC uses timsort. Timsort is, what, O(nlogn)? Bogosort is O(n!), much bigger number!
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 28, 2016, 06:29:10 pm
Hah, I can go bigger than that.
Code: [Select]
def sort(i):
    while True:
        pass
Title: Re: How is DF not technically doomed?
Post by: Putnam on February 28, 2016, 06:31:07 pm
but then it'll never get sorted

(the same is actually technically true of bogosort, since shuffle relies on a random function that'll probably have a period less than n!)
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 28, 2016, 06:38:48 pm
Code: [Select]
def sort(i):
    from time import wait
    wait (9999999999)
    return i.sort()
?
Title: Re: How is DF not technically doomed?
Post by: Putnam on February 28, 2016, 06:46:04 pm
that's still O(nlogn), just with a massive constant added to the front (which big-O doesn't care about)
Title: Re: How is DF not technically doomed?
Post by: Orange Wizard on February 28, 2016, 06:51:29 pm
Programming is hard.
Title: Re: How is DF not technically doomed?
Post by: Isngrim on February 29, 2016, 02:14:07 pm
-snip-
I'm not the most knowledgeable in this department, so have patience with my ignorance, but doesn't a tile-based system allows for Toady to "cheat" more easily than a mesh-based one? Most physical discrepancies in DF are invisible, which is beneficial not merely in terms of immersion, but also in regards to optimization. Surely not having to calculate each object's mesh (even rather primitive ones, per your proposal) frees up a fair amount of processing power for DF?

It also means that terrain and structures can be mesh-based, which is better for simulating their destruction and can have their vertices used as pathing nodes (If a beeline to the target destination is not possible, the AI is definitely going to make a beeline towards a vertex).
Agreed, but I'm not sure that's viable for something with the scale of DF. Look at the FPS-damage done merely by flooding or by smoke. Imagine the processing-strain resulting from simulating all the minuscule bits scattered by a cave-in.
Yep,Fps would get bad fast with the scale of things in DF (especially after breaching hfs),im to tired to go into a bunch of details,so download Unity or UDK,and blender.Then add 100 plus low poly shapes (something with at least couple hundred triangles more then a cube[ A simple capsule shape has 960 traingles]) have them move around,then add your controls and try moving about,.That's not taking into account for fluid physics,terrain destruction,temperature,AI (which needs to be more robust to traverse 3D space then a simple grid as i recall),and all the fun stuff that now happens outside of the Fort.then there is the FPS issue,with 3d graphics low FPS can actually render the game impossible to play,or make the player feel sick,were in 2d graphics it makes the game feel more like a turn based game without making the player queasy
Title: Re: How is DF not technically doomed?
Post by: Man of Paper on February 29, 2016, 03:51:37 pm
Just popping in to say that if DF has taught me anything, it's that everything is doomed.
Title: Re: How is DF not technically doomed?
Post by: evictedSaint on February 29, 2016, 05:06:25 pm
Just popping in to say that if DF has taught me anything, it's that everything is doomed.

It was inevitable.
Title: Re: How is DF not technically doomed?
Post by: Max™ on March 16, 2016, 12:08:11 pm
Programming is hard.
Code: [Select]
import:pythonKnowledge
      if false do find(pythonBooks) then
            if boredom ~= 1 do
                somethingElse
            return "Sort your own damn list!"
            end
      end
Title: Re: How is DF not technically doomed?
Post by: Ggobs on May 04, 2017, 12:45:20 pm
Just popping in to say that if DF has taught me anything, it's that everything is doomed.

sigged
Title: Re: How is DF not technically doomed?
Post by: Grand Sage on May 05, 2017, 02:22:17 am
I am sure someone has tried to explain this too you, but DF is NOT in continous development as, say, Minecraft would be. there is a finit dev-plan, and anyone who has bothered to take a look at the version number can see that it is ramping towards 1. DF is therefore NOT doomed, neither is it a broken ship that just keeps getting more features. It is, to stick with the metafor, an unfinished ship, that you have kindly been allowed to take out for a testdrive. once its done, it might very well end up being smooth as hell.
Title: Re: How is DF not technically doomed?
Post by: Kirkegaard on May 05, 2017, 01:38:36 pm
It is hardly relevant that there is a plan, it if the game end up not being playable.

And it is clearly in "continous development" and will of course stay so, since Toady like everyone else need an income to survive.
Title: Re: How is DF not technically doomed?
Post by: oldmansutton on May 05, 2017, 03:38:04 pm
It is hardly relevant that there is a plan, it if the game end up not being playable.

And it is clearly in "continous development" and will of course stay so, since Toady like everyone else need an income to survive.

I'm pretty sure it wasn't intended to be a game, as much as a fantasy story generator.  From what I remember reading of the initial vision.  And yeah, when Toady finishes development, he's going to be hurting so bad, with only that doctorate in mathematics to fall back on.

If, if, if.... Just enjoy the ride, you're not even required to chip in on the cab fare.  You're looking for a game that is basically v.34.  There's games out there that do that already, that run smoother.  But they're finished games.  This is still a work in progress, and until it's done, you don't know what it will be.  The rest of us are enjoying the ride to see where it ends up.  You can guess and what-if all day long, but until we get there, it's just that... guesses and what-if's.

If ifs and buts were candies and nuts, we'd all have a merry Christmas.
Title: Re: How is DF not technically doomed?
Post by: NJW2000 on May 05, 2017, 04:06:06 pm
Not to mention the fairly large fanbase clamoring for bugfixes and Slaves to Armok: God of Blood, Chapter III: ?????. Or anything else he decieds to do.
Title: Re: How is DF not technically doomed?
Post by: FakerFangirl on May 06, 2017, 03:04:32 pm
I find Dwarf Fortress lags much less than similar games of the same scale. So long as I set traffic routes.
Title: Re: How is DF not technically doomed?
Post by: Bumber on May 08, 2017, 08:06:40 pm
Just popping in to say that if DF has taught me anything, it's that everything is doomed.

sigged
10/10, best necro.
Title: Re: How is DF not technically doomed?
Post by: Kruniac on May 08, 2017, 09:17:45 pm
It is hardly relevant that there is a plan, it if the game end up not being playable.

And it is clearly in "continous development" and will of course stay so, since Toady like everyone else need an income to survive.

The game is perfectly playable.

You are cynical.

You should play something else.

That is all.
Title: Re: How is DF not technically doomed?
Post by: MrWiggles on May 10, 2017, 01:54:57 am
It is hardly relevant that there is a plan, it if the game end up not being playable.

And it is clearly in "continous development" and will of course stay so, since Toady like everyone else need an income to survive.
ToadyOne and ThreeToe have said a few times that if donations dry up, they'll just go back to making games part time. In so while ToadyOne and ThreeToe apperciate the donation, it doesn't matter to them. Its not why they're making DF.  And the Dev Plans havent been added to at all.