Git Product home page Git Product logo

vmsaif / alienshipnatorgame Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 1.21 MB

Alien Shipnator Game is a Java project where players shoot aliens and avoid being hit. Players move with the arrow keys and shoot with the space bar. The game ends if an alien touches the ship or the ship is hit by an alien's shot.

Java 100.00%
2d-arrays aliens arrow-keys avoid game java-swing-library shoot alien-shipnator-game arraylist-class graphical-output

alienshipnatorgame's Introduction

Alien Shipnator Game

Hits

A Java game, where you shoot aliens and avoid being hit by their shots.

How to Play

Use the left and right arrow keys to move the gunning ship and aim at the aliens. Press the space bar to shoot at the aliens. The aliens will come down from the top of the screen and try to touch the gunning ship. If an alien touches the ship or the ship is hit by an alien's shot, the game will be over.

Features

  • Multiple rows of aliens that move down the screen as time passes
  • Gunning ship that can be moved and fired using keyboard controls
  • Graphical output using the Java Swing library

What I Learned

In this project, I learned:

  • Working with Java and creating multiple classes that work together
  • Using 2D arrays and the Java Swing library for graphical output
  • Working with the ArrayList class in Java

Compiling and Running

Ensure that you have the latest version of Java installed on your computer.

To Compile

  javac -d bin src\*.java

Run

  java -cp bin\ Display

The game should now start and you can play using the keyboard controls.

Visual Demonstration

alienshipnatorgame's People

Contributors

vmsaif avatar

Stargazers

 avatar  avatar

Watchers

 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.