Chapter 12. Multithreaded Game Programming

When games are running on a mobile device, many different pieces of code must be executed simultaneously. This includes actions such as checking the keyboard, moving the sprites, detecting sprite collision, planning the game's artificial intelligence, and of course, repainting. If a developer has to put all those tasks into a list and execute the list step-by-step, just waiting for a new key-pressed event could pause the game. A much better approach would be to put tasks into different lists, and permit each list to ...

Get Micro Java™ Game Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.