Giter Site home page Giter Site logo

hoangsonww / space-invader-game Goto Github PK

View Code? Open in Web Editor NEW
8.0 10.0 8.0 113 KB

๐Ÿ‘พ Embark on an exhilarating journey with SpaceInvader, a thrilling experience as you navigate through cosmic challenges and face off against alien invaders. Crafted with JavaFX, SpaceInvader combines stunning visuals and engaging gameplay to create a truly immersive experience.

Home Page: https://hoangsonww.github.io/Space-Invader-Game/

License: Creative Commons Zero v1.0 Universal

Java 100.00%
game game-development gamedev java javafx javascript space-invaders space-shooter space-shooter-game

space-invader-game's Introduction

Space Shooter Game JavaFX

Overview

Space Shooter is an engaging JavaFX-based game where players navigate a spaceship, avoiding enemies and obstacles while trying to achieve the highest score possible. The game incorporates features such as enemy spawn logic, collision detection, power-ups, and a scoring system, showcasing the capabilities of JavaFX in creating interactive 2D games.

User Interface

Start Screen

The WeatherMate App Interface

Gameplay

The WeatherMate App Interface

Losing Screen

The WeatherMate App Interface

Features

  • Control a spaceship using keyboard inputs (A, W, S, D, or arrow keys) to move and SPACE to shoot.
  • Enemies and boss enemies spawn at intervals, increasing the game's difficulty.
  • Collect power-ups to boost your abilities.
  • Score tracking and display, with the game increasing in difficulty as your score rises.
  • Lives system where players lose a life if an enemy reaches the bottom of the screen or collides with the player's spaceship.
  • Reset mechanism to start over once all lives are lost.

Prerequisites

  • JDK 11 or higher.
  • JavaFX SDK (version compatible with your JDK).

Setup and Installation

  1. JavaFX SDK: Download the JavaFX SDK from OpenJFX and extract it to a known directory.
  2. Clone the Repository: Use git clone <repository-url> to clone this repository to your local machine.

Configuration

Ensure JavaFX is correctly set up in your development environment:

  • IntelliJ IDEA:

    1. Go to File > Project Structure > Libraries, add the JavaFX SDK as a library by navigating to its lib folder.
    2. Modify your run configuration to include VM options for the JavaFX modules you use, e.g., --module-path "path/to/javafx-sdk/lib" --add-modules javafx.controls,javafx.fxml,javafx.media.
  • Eclipse:

    1. Add the JavaFX SDK as an external JAR to your project's build path.
    2. Adjust the run configurations to include the necessary VM arguments, as shown above for IntelliJ.

Running the Application

Compile and run the SpaceShooter.java file. Ensure the VM options are set correctly to include the JavaFX library path and modules.

How to Play

  • Use the A, W, S, D keys or arrow keys to move the spaceship.
  • Press SPACE to shoot at enemies.
  • Avoid letting enemies reach the bottom of the screen or colliding with them.
  • Collect power-ups to enhance your capabilities and increase your score.
  • The game ends when all lives are lost, but you can start over by resetting the game.

Contributing

Contributions to the Space Shooter game are welcome! Please fork the repository, make your changes, and submit a pull request with your improvements.

License

This project is licensed under the Creative Commons License.


space-invader-game's People

Contributors

hoangsonww avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.