Chapter 13. Shooters and bullets

We want for critters to be able to spawn off additional objects. The most common use of this is for shooting games in which the critters shoot at the player and the player shoots back. Do keep in mind that a game with this pattern can in fact be given a non-violent framing story. The critters might be dropping jewels that you want to pick up. Or you might be throwing food at them. Perhaps you’re on a safari taking pictures, and you’re firing flashbulbs. This said, let’s go ahead and speak in terms of shooting bullets.

In order to prevent the player from drowning the screen in bullets and having the game be too easy, we will allow only some limited number of player bullets to be active at one time. Suppose you ...

Get Software Engineering and Computer Games 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.