
Making Halo Space Invaders Game In Python! Part 4 - Shooting and Collision Detection
In Honor of HALO Infinite Releasing this week and celebrating 20 years of playing Halo this series of Python and Pygame Tutorials covers how to create your very own Halo themed space invaders style game!
We start the video by demoing the end result full functionality of the game and then dive into this video's specific content!
Episode 4 shows how to handle the shooting action for the player, as well as setting up collision detection between the enemies and the player's bullets and then we create randomly generated enemy firing to attack the player, followed by collision detection set up to check if the player was hit, at which point we decrement his health by 10%, and if an enemy unit goes off screen left we lose a life!
Episode 3 shows how to spawn waves of randomly generated enemies off the screen to the right and have them come across the screen during attacks. This includes using the random module with the rand range operation as well as the random choice from our list of possible enemy units! We load in the images of two different 8-bit Elites and a pixelated Grunt for our enemies and assign them to different colored projectiles as well.
Episode 2 covers how to pull in a player graphic, which in this case will be master chief, and then setting up four directional controls for the player! Additionally we set up bounds so the player cannot move their character off the screen in any direction! This is essentially creating edge collision detection and we do a deep dive into some of the themes of pygame as well as how to create and call classes and subclasses!
Episode 1 covers how to pull in outside images for your game to set up a full screen background, how to initialize pygame and how to draw lives and level text labels onto the screens using f strings to format strings with variables!
This game will be rolling out in a six-part tutorial series so be sure to check back over the next five days for the entire series! Leave a like sub or comment if you like what you see here and be sure to check out the channel for tons of other great content!
https://www.youtube.com/channel/UCV5Ab39YnXvTZ6Grar9URxQ
Thanks for watching, good luck with your code, and give the covenant back their bomb!
