Space Invaders is a classic arcade game where the player controls a spaceship and shoots down enemy aliens. This simple game is developed using the p5.js library and is open source.
Use http-server or any other server to run the javascript game.
- Use npm to install the server.
npm install -g http-server
- Run the server.
cd directory/
http-server
- Access the game through your web browser at:
http://localhost:8080
.
- Use the arrow keys to move the spaceship left and right.
- Press the spacebar to shoot.
The following website used the open-source code to build a custom space invaders:
You can add your own game link to this section if you have used this code in your project.
The game icons from Flaticon free resources.
Copyright 2023 barqawiz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.