Coding Challenge #63 - Space Invaders
John Crickett
Helping you become a better software engineer by building real-world applications.
This challenge is to build your own version of space invaders.
Space Invaders dates back to 1978. It was the first game that fixed the shooter - the player’s character - in one part of the screen and had waves of enemies (aliens) attack the player.
It looks something like this:
The Challenge - Building Space Invaders
Space invaders is a relatively simple game, the gameplay has the player moving their ‘ship’ horizontally across the bottom of the screen and firing at aliens above. There are some bases for the player to take cover underneath.
In the original version the aliens begin in five rows of eleven that move left and right as a group, shifting down the screen each time they reach a screen edge. The player wins by shooting all of the aliens.
As the aliens move across the screen they occasionally drop bombs which fall towards the player and either damage the bases the player has or kill the player, taking one of their lives. The player’s shots also damage the bases.
The player has three lives and the game ends when either they run out of lives or the invaders reach the bottom of the screen.
Step Zero
In this step, pick the programming language and development environment you’re going to use. Consider trying something different - this would be a great project to try a frontend stack if you’re a backend developer and vice versa.
If you’re from a data engineering or site-reliability engineering background you could leverage your knowledge of Python with PyGame or Go with Ebitenegine. Rustaceans can check out?are we game yet?for useful crates.
Space invaders is relatively simple and as such, it’s a great platform for learning a new technology, or programming language.
You could create your own graphics for the game or there are some on opengameart.org that you can use.
Step 1
In this step your goal is to create the initial game screen, ready for the game to start.
For this step draw the top info bar that contains the score and number of lives remaining at the top of the screen and the player, their bases and the ‘ground’ at the bottom of the screen. It should look something like this:
Continued...
You can find the remaining steps for this challenge on the Coding Challenges website as build your own Space Invaders.
Software Engineer
8 个月https://github.com/Kingcitaldo125/PyInvaders
Attending The ICT UNIVERSITY
9 个月Thanks for sharing
Attending The ICT UNIVERSITY
9 个月I'll keep this in mind
Attending The ICT UNIVERSITY
9 个月Thanks for sharing
$$$
9 个月You mean this? https://gontrill.itch.io/galaxy-hell Implementing the shader pipeline and bitblt with C++ wasn't as difficult as most people who piss on their pants when they think about coding (instead of downloading the code already written as a Python package) think it is.