Skip to Main Content
We present a new design pattern, Sayl, for parallel programming of games and real-time simulation applications to make effective use of the multiple cores of CPUs which are becoming commonplace in today's host machines. Sayl is a specialization of the more generic Task Parallelism pattern. The specialization addresses three important requirements of programs in this domain - heterogeneity of tasks, data flow type dependency amongst tasks, and dynamically changing set of active tasks in different frames of the game. Our main claim is that use of Sayl involves less programmer work. Further, by enabling the creation of dynamic task graphs, Sayl can enable parallel execution of tasks both within and across frames; the latter is one significant advantage of Sayl which seems not possible in most other parallelization approaches targeted to this domain. Sayl was used in a case study to convert the serial code of a small game into a parallel version and compared with an-other game parallelization framework. The Sayl version was simpler to code and had better run-time performance.