Chapter 7. Collision detection: Asteroids

topics:

more about movement, keyboard control and collision detection

concepts:

collections (again), for loop, for-each loop (again), casting

In this chapter, we shall not introduce many new concepts, but instead revisit and deepen our understanding of some topics we have touched on in the last couple of chapters. We shall revisit a scenario that we have encountered before, very early in this book: Asteroids (Figure 7.1).

The new Asteroids scenario (with proton wave)

Figure 7.1. The new Asteroids scenario (with proton wave)

The version of Asteroids that we use here is slightly different than the one we looked at earlier. It has some added features (such as ...

Get Introduction to Programming with Greenfoot: Object–Oriented Programming in Java™ with Games and Simulations, First Edition 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.