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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.