Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Very good article, I use mostly similar design ideas around multi-threaded code in my framework and projects.

The main take is to avoid concurrency and instead use parallelism as much as possible.

Also, a carefully engineered gameState or appState structure can help, my design is based around buffering the full state, so the work done during one step (typically a frame) is given as reference to the previous, frozen and immutable state as input, and can only write on the next state, with split/join of containers (my own generalized flavor of arena) when parallel work is done.

I think that full concurrency is possible and has been proven to work, but IMO is a very costly and risky tradeoff, and unlikely to achieve much higher performance.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: