Bay 12 Games Forum

Please login or register.

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

Author Topic: I know DF is not open source, but ...  (Read 2601 times)

TheSilverHammer

  • Bay Watcher
    • View Profile
I know DF is not open source, but ...
« on: January 02, 2008, 02:18:00 pm »

Are any of the sub-systems open for coding assistance?  For example, I know that the water flow system uses a big chunk of time (just unleash a large flood and watch the game come to a crawl).  I would find it interesting to try and tackle the problem and see if there was a much more efficient way to do water flow.   Maybe you are doing it the best way already, or maybe not.

Is DF open to 'code' suggestions or incorporating 3rd party code (after you review it) of course?  Pathing might also be something that might be optimized heavily.  I have seen demos of many 100s if not 1000s of pathing objects that seemed to run very smoothly.  I haven't tried it myself so I do not really know how hard it is to do, nor do I have any idea how DF tackles the problem.

There are some ideas I can think of which may or may not be applicable to DF with regards to pathing.

1.  Unit clustering:  If you have a guy with 10 dogs following him, you do not need to do a full path check for all the dogs.   You can treat all the units as one super unit and just do a single path check for the dwarf and just assume the dogs are always near him.  Put the dogs in his spot each move until he stops moving and then place the dogs in a random open spot near him.

2.  Allow player's to create virtual roads:  This would be very similar to the traffic regulator designators you have now, only this would be a big AI pathing hint.  I could draw a path between two stockpiles, say an indoor wood one and an outdoor wood one.   Then when the AI wants to go from stockpile A to B, it just uses a flagged path and knows that going one way moves towards A and away from B.  It just knows that if it keeps moving toward A that it will eventually get to A.   This way the pathing routines do not need to spend much time trying to figure out how to get 20 dwarfs to Pile A.   Once a player makes enough paths between points of interest, the generic pathing routine only has to handle a few cases and will speed things up considerably.

3.  Automatic path mapping:   Internally, the game finds points of interest, such as workshops, rooms, stockpiles, doors, levers, etc...   It then has a table with paths between these points.   Initially this table will be empty, but as dwarfs go between points of interest the table will fill up.   So when a dwarf is at carpenter shop 10, and wants to go to wood pile 12, it looks in its table for carpenter shop 10, and then looks in a sub-table for wood pile 12.  if there is no path, then it computes one.  If there is a path, it just uses the pre-computed steps.

Internally, the system finds paths to the nearest point of interest that leads to the ultimate objective and then daisy-chains these paths to find the final path.  This is needed because it makes for smaller path segments and deals with changing conditions, such as doors that become locked, draw bridges that are up, etc...   There is a lot more detail to go into, so I will not bore you with it.

Anyway, I would find such a problem very interesting to crack, and would work on it in my spare time if I knew that it would be useful, aka Toady One might look at it and incorporate it if it helped a lot.   The water one is more tricky, which Id like to take a stab at after the pathing one, but only if a good solution would be incorporated into DF.

Logged

valcon

  • Bay Watcher
  • Experience rivers.
    • View Profile
    • My YouTube Channel
Re: I know DF is not open source, but ...
« Reply #1 on: January 02, 2008, 03:56:00 pm »

[A vile force of darkness has arrived]

Your post is under siege by the Champion Defenders of the Source Code, they who shall let none pass through it's comma diliniated gates.

Logged
Still doing Let's Plays, still got a gold toof. 

Adventure Mode:  The Movie!

TheSilverHammer

  • Bay Watcher
    • View Profile
Re: I know DF is not open source, but ...
« Reply #2 on: January 02, 2008, 07:24:00 pm »

I guess that is a no?
Logged

Karzack

  • Bay Watcher
    • View Profile
Re: I know DF is not open source, but ...
« Reply #3 on: January 02, 2008, 07:47:00 pm »

Dwarf Fortress is a painting and Toady is the artist.  In the time I have been around Toady has turned down all help.
Logged
Life is short, live it.

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: I know DF is not open source, but ...
« Reply #4 on: January 02, 2008, 08:36:00 pm »

N.O.   :mad:

Read the FAQ.
(Edit: removed stupid exaggerated insults)

[/fanatic flaming]

[ January 02, 2008: Message edited by: Armok ]

Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

HOTMACHINA

  • Bay Watcher
    • View Profile
Re: I know DF is not open source, but ...
« Reply #5 on: January 02, 2008, 09:31:00 pm »

I find the above post disturbing.
Logged

Red Jackard

  • Bay Watcher
    • View Profile
    • Wiki Page
Re: I know DF is not open source, but ...
« Reply #6 on: January 02, 2008, 09:32:00 pm »

Yeah, that's a little...
Logged
My dwarves are not your dwarves.

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: I know DF is not open source, but ...
« Reply #7 on: January 02, 2008, 09:51:00 pm »

The post above? Yes, the first post on this topic is a bit disgusting. [/SARCASM]

Sorry, I DID ad a [/fanatic flaming] tag.
it's just that Toady has stated this so many times and it is in the FAQ and all but STILL people come nagging about it.
But yes my post above is a bit exaggerated. Sorry.

Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Keilden

  • Bay Watcher
  • High Priest of The Endcat
    • View Profile
Re: I know DF is not open source, but ...
« Reply #8 on: January 03, 2008, 03:03:00 am »

I wonder if anyone of those people asking are sent out by EA games to spy upon toady so the can steal the code and make Simdwarfs.
Logged
The Endcat will end you and everything you love.

Elmokki

  • Escaped Lunatic
    • View Profile
Re: I know DF is not open source, but ...
« Reply #9 on: January 03, 2008, 06:05:00 am »

Open sourcing the whole game or allowing third parties to program parts of it would probably quicken the development and give birth to some very well made systems. There really seem to be quite skilled programmers in the community.

However, I do completely understand that Toady doesn't want third parties to help, and it's completely his own business what he wants to do with the source code  :)

Logged

TheSilverHammer

  • Bay Watcher
    • View Profile
Re: I know DF is not open source, but ...
« Reply #10 on: January 03, 2008, 09:34:00 am »

No, no, you mis-understand.   I am not asking that Toady give out his code.   I am just asking if third party code was provided, would he use it?

IE: I would develop my own 'pathing maze' and develop a solution to path 1000 actors in real time, and then I would publish my solution and Toady could incorperate the code into his own code base using his own style.

This would be far more work then 'open source' because my code would not easily plug into his code, but the benifit would be that his code would still be 100% secure.

The question I am really asking is if Toady has any interest at all in this kind of help.   I know with all the stuff he has to do that he probably can't spend a full month or more just trying to figure out how to improve pathing  because everything else would come to a halt, and even after a month we might find that there is no better way and the time was wasted.

With regards to EA ripping him off:

1.  EA and other publishers have no imagination.   Unless it is proven formula, they will not take any risks.

2.  If a big company did decide to rip off DF, they wouldn't need the code.   They would just get some game developers to play the game for a while and then tell them to make a commercial version of it.  Unless Toady has copyrighted (I am not sure that is the right term) the game-play elements, which I am not even sure you can do, he would be screwed.

[ January 03, 2008: Message edited by: TheSilverHammer ]

Logged

Karzack

  • Bay Watcher
    • View Profile
Re: I know DF is not open source, but ...
« Reply #11 on: January 03, 2008, 10:04:00 am »

quote:
Originally posted by Keilden:
<STRONG>I wonder if anyone of those people asking are sent out by EA games to spy upon toady so the can steal the code and make Simdwarfs.</STRONG>

They are probably spies.  They need to know how to make a real game.

Logged
Life is short, live it.

Fedor

  • Bay Watcher
    • View Profile
Re: I know DF is not open source, but ...
« Reply #12 on: January 03, 2008, 11:37:00 am »

quote:
Originally posted by TheSilverHammer:
<STRONG>No, no, you mis-understand.   I am not asking that Toady give out his code.   I am just asking if third party code was provided, would he use it?</STRONG>
This is a perfectly reasonable question.  It is certainly worth Toady's serious consideration.  

It's difficult to be good at EVERYTHING about programming a non-trivial application.  It isn't a good use of Toady's time to play Jack of all trades.  

As long as no adopted code or idea jeopardizes Toady's total legal and physical control of the game source and the game itself, he should consider "opening up the problem" to the community in particularly difficult and troublesome cases.

Starting with liquid flow.

Logged
Fedor Andreev is a citizen of the Federated Endeavor. He is a member of the Wandering Minds.

Capntastic

  • Bay Watcher
  • Greetings, mortals!
    • View Profile
    • A review and literature weblog I never update
Re: I know DF is not open source, but ...
« Reply #13 on: January 03, 2008, 06:00:00 pm »

Toady's actually had coding help from a few different people occasionally.
Logged

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: I know DF is not open source, but ...
« Reply #14 on: January 03, 2008, 06:30:00 pm »

Yeah, it's happened on occasion, though that was either with people I've known a long time or with porting.  I guess it's a quality of life issue more than anything.  Having to organize such projects, getting headaches trying to decipher code, getting into coding discussions that turn sour...  I'd rather go back to math.
Logged
The Toad, a Natural Resource:  Preserve yours today!
Pages: [1] 2 3