1
Feature requests / sfml equivalent of GetMessage()
« on: November 04, 2008, 07:18:13 pm »Quote from: "Laurent"
Regarding the asynchronous architecture, I still believe you're not doing such things in real life (do you, actually ?). I've been making games (including commercial ones) and watching game engines' sources for years, and I've never seen such design. Why ? Because it involves too many issues. Your example can work fine, but you can't apply this strategy to a whole game which is processing hundreds of events, millions of entities and that must keep a consistent state across it's game loop including update, physics, AI and drawing. Or just prove me it's possible.
We use a similar mechanism in our current commercial project. In part we chose it because of Amdahl's law. The smaller we make the serial sections of our application the better we'll scale to many core systems. Window and system events come in asynchronously and if the application is in a state where it cannot handle them we block or queue as appropriate for performance. Even if we queue we don't require polling the queue explicitly. Instead when we transition out of our blocking state we can check the queue and if it is not empty we transition into a state that processes the queue.
However the main reason we chose this architecture is the first pillar of concurrency.
http://www.ddj.com/hpc-high-performance-computing/200001985?pgno=2