PyGame Basics: Grouping Game Objects

In this guide, we will be taking a look at grouping game objects with PyGame. This is useful because most likely you will want to add or remove objects of the same type. Simply using variables to reference objects with won’t cut it. You might use a variable for assigning an instance of the player, but what if you want to add 20 enemies? Unless you name each one with a number after, it won’t work so well....

October 15, 2019 · 3 min · Jared