Bay 12 Games Forum

Please login or register.

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

Author Topic: Dwarf Fortress making use of a multicores  (Read 14848 times)

Porpoisepower

  • Bay Watcher
  • For Surely he is the Cuisinart Hat Rack
    • View Profile
Re: Dwarf Fortress making use of a multicores
« Reply #15 on: June 07, 2010, 08:16:06 am »

1. VM's actually have very little overhead.  IF you do it right. remember a VM doesn't neccessarily virtualize a full OS environment.

2. Virtulization is no gimmick.  In my office we've cut the number of physical servers in half, which has dramatically reduced power consumption costs.  It also gives us incredible amounts of flexability when it comes to server management.  If one of our applications is under powered we can dedicate more processors/ram to it. Need  a server for testing? You can have virtual server online in minutes, without buying hardware.  Have a server go down? The others can pick up the slack with no interruption in service. Also Application Virtualization is pretty awesome too. You can make almost anyapplication available to any user you want. Throw it on a file server give the user's rights and a link done.  This is great when you version limitations, and need version X of an application for a specific use but want other versions for other tasks.
Logged
That's what DF needs, The gutbuster brigade.  Screw that elf and his cat. Thibbledorf Pwent is the real hero.

Hyndis

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress making use of a multicores
« Reply #16 on: June 07, 2010, 10:33:32 am »

Thread management isn't the point, concurrency is.  Honestly outside of a few specialized applications (servers), virtualization is just a marketing gimmick to convince managers to buy equipment they don't need to solve problems that don't exsist.

It's like Hyndis said, if you have a bunch of tasks being issued and the execution of one affects another (as opposed to simply the output), there is no known way to make them run on separate cores.  It might be possible to pull pathfinding out though, which would help a lot.

Its doable if you unlink things, such as the physics engine and the graphics engine, however this would mean that the graphics engine will only be an interpretation of the physics engine, essentially two programming running at the same time. The graphics engine just reads the physics engine and displays updates as the physics engine produces the updates.

The problem is that you need to make it very robust, such that the graphics engine doesn't freak out and crash if the physics engine is delayed for some reason.

Cores getting out of synch happens all the time. The programs need to be able to handle that. And its programs, plural. You basically need to make a game that consists of multiple independent programs running at the same time, working together cooperatively.

Its doable, but definitely not easy at all, and requires the game being programmed that way from the very start.
Logged

Richards

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress making use of a multicores
« Reply #17 on: June 07, 2010, 02:23:42 pm »

I think the biggest opportunity is separating the path-finding for DF into another thread.
Logged

AngleWyrm

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress making use of a multicores
« Reply #18 on: June 07, 2010, 06:51:52 pm »

The "biggest opportunity" is found by running a profiler on the debug version of the game. The profiler then states what percent of processor time is spent within each function. Then comes the optimization phase, where the functions with the highest time expense can be examined, and maybe rewritten.
Logged

CaveLobsterShell

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress making use of a multicores
« Reply #19 on: June 07, 2010, 07:14:40 pm »

A perennial topic (I'm sure Footkerchief, bless him, could dig up old threads). Concurrency (multiple execution) in programming is a HARD problem, acknowledged by many to be the hardest to reason about in the computer sciences. It's relatively simple to split out the graphics logic; there's a well-defined boundary between the graphics execution and the game's, that is: where the graphics engine queries the game for what it's representing. Separating out parts of the game, on the other hand, would be fiendishly complex in a game as sprawling and intricate as Dwarf Fortress. It would be a Pandora's Box of bugs, inconsistencies, crashes, issues, non-reproducible behavior (the absolute WORST kind to debug), and other assorted Badness. Toady realizes this and doesn't want to open that box.
Logged
The funniest part being a dwarf actually butchered the stupid thing.  Necrotic poison is the tastiest of spices.

se5a

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress making use of a multicores
« Reply #20 on: June 08, 2010, 04:50:49 am »

visualization is awesome if you have to reboot the virtual machine that's running X program, you can reboot it without affecting other parts of the network. however if your business has everything running on a single non visualized server the whole network goes down because you have to boot the DC which is also the DNS and the DHCP and a bunch of other acronyms.

or you can buy a separate bit of hardware for everything.
visualization can be cheaper and easier to maintain.

It's "Virtualization" not "Visualisation".

Haha, I can't belive I did that... stupid spellchecker and only being half awake...
Fixed
« Last Edit: June 08, 2010, 04:54:26 am by se5a »
Logged
Pages: 1 [2]