5

GitHub - Barqawiz/space-invaders-js: Space Invaders classic arcade game using ja...

 1 year ago
source link: https://github.com/Barqawiz/space-invaders-js
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

space-invaders

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.

screenshot.png

Installation

Use http-server or any other server to run the javascript game.

  1. Use npm to install the server.
npm install -g http-server
  1. Run the server.
cd directory/
http-server
  1. Access the game through your web browser at: http://localhost:8080.

Controls

  • Use the arrow keys to move the spaceship left and right.
  • Press the spacebar to shoot.

Examples

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.

Contribution

The game icons from Flaticon free resources.

License

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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK