News for hackers. Stuff that matters.

Hnefi

Re:Dwarf Fortress in 2013 on Saturday August 03, 2013 @12:59PM (#6152592)
The lack of perfect cellular automata isn't an obstacle either. One of the simplest and most robust way of doing parallellization of a system like DF avoids all such issues in a very simple way with no almost no synchronization needed.

Basically, when starting the game, spawn X threads and partition the world between them so that only one thread can write to any particular world block. Then, when calculating a new frame, make a read-only copy of the previous world frame. Any reads are done from that copy; any writes obviously occur only in the blocks assigned to a particular thread. Wait for all threads to complete, then render thread. No messaging, locking, event handling or whatever needed. Just care and forethought.

But you are right that Toady likely not possessing that kind of knowledge. That's the very reason why people would like to see others involved for things like optimization and UI design and the main point these people are trying to make; Toady seems either not able or willing to do it himself, and it could improve the state of the game tremendously.

Re:Dwarf Fortress in 2013 on Saturday August 03, 2013 @06:38AM (#6151729)
> DF's simulation model is deterministic. Most aspects of it depend on prior aspects.

I don't see what that has to do with using parallel programming to improve the performance of DF's simulation. If you are implying that threading implies nondeterministic behaviour in a simulation, you are mistaken. In fact, a system with such a discrete space model as DF would be quite easy to parallelize in a safe and deterministic way, with the proper expertise and forethought.

Re:CPU core estimation with JavaScript on Friday May 24, 2013 @08:26AM (#5762288)
Might it be because Opera doesn't use multiple threads for web workers?
Re:Unreal Engine in JavaScript/HTML5 – Citadel demo on Friday May 03, 2013 @03:11AM (#5649236)
That link is misleading in the context you present it. Those are microbenchmarks, which a JIT can optimize relatively well. But if you look at the very next slide at http://kripken.github.io/mloc_emscripten_talk/#/28 you will see that for a larger application, non-optimized asm.js performs abysmally, as does JS in general. A performance penalty of ~1000% of native is what you should expect for a nontrivial JS application, and asm.js does not do much (if anything) to alleviate that unless you run odinmonkey.