+After getting the base game working smoothly, I implemented the three extensions from the final topic: platforms, enemies, and sound effects. **Platforms** were created using the factory pattern, which allowed each platform object to draw itself and check if the player is standing on it. **Enemies** were implemented using a constructor function, which creates patrol enemies that move back and forth and detect collisions with the player. I also added **sound** using the p5.sound library, including effects for jumping, collecting coins, taking damage, and winning the level. These sounds helped make the game feel more responsive and engaging.
0 commit comments