Sign inSign up

deewhy/space-invaders

By deewhy

•Updated about 1 year ago

Classic Space-Invaders | desktop

Image
0

314

deewhy/space-invaders repository overview

⁠👾 Space Invaders: Classic Arcade Game

This project is a containerized version of the classic Space Invaders arcade game, featuring a persistent scoreboard powered by Google Firebase Firestore.

The application is built using a modern JavaScript/Node.js stack, designed for easy deployment via Docker.

⁠Project Details

  • Game Logic: HTML5 Canvas / JavaScript
  • Backend/Server: Node.js (server.js)
  • Database: Firebase Firestore (for Scoreboard persistence)
  • Deployment: Docker

⁠Features

  • Classic Gameplay: Smooth, responsive Space Invaders action.
  • Real-Time Scoreboard: High scores are tracked and displayed using a real-time listener from Firebase Firestore.
  • Containerized: Easy to run and scale using Docker.

⁠Setup & Running Locally

⁠1. Prerequisites

You must have the following installed:

⁠2. Configure Firebase (Scoreboard)
  1. Create a Firebase Project: Set up a new project in the Google Firebase Console.

  2. Enable Firestore: Initialize the Firestore Database for your project.

  3. Get Configuration: Retrieve your Firebase configuration object (API Key, Project ID, etc.).

  4. Update .env: Create a .env file in the root of the project to hold your configuration:

    # Example .env file
    FIREBASE_API_KEY="AIzaSy..."
    FIREBASE_PROJECT_ID="your-project-id"
    # ... add other Firebase configuration fields
    PORT=3004
    

    (Note: This file is excluded by .gitignore for security)

⁠3. Build and Run with Docker
  1. Build the Docker Image:

    docker build -t space-invaders .
    
  2. Run the Container:

    docker run -d --name space-invaders -p 3004:3004 space-invaders
    

The game will be accessible in your web browser at http://localhost:3004.

⁠Deployment to Docker Hub

This image is available publicly on Docker Hub under the deewhy namespace:

docker pull deewhy/space-invaders:latest

Tag summary

Content type

Image

Digest

sha256:4c46de4aa…

Size

78 MB

Last updated

about 1 year ago

docker pull deewhy/space-invaders