Build Space Invaders Game using Java

Offered By
Coursera Project Network
In this Guided Project, you will:

Learn how to use the Swing toolkit to create your own customized Graphical User Interface.

Learn how to control object's actions using the keyboard.

Learn how to apply your own set of game rules.

Clock1 hour
BeginnerBeginner
CloudNo download needed
VideoSplit-screen video
Comment DotsEnglish
LaptopDesktop only

In this 1-hour long project-based course, you will learn how to create a basic and functional version of the popular game, Space Invaders using Java and Swing toolkit. Java is one of the most in demand programming languages, and using the Swing toolkit with it will give you a chance to easily implement many game applications. You will be able to identify and use most of the components inside the Swing toolkit that will aid you in building your own games, customized to fit your needs. In this guided project, you will be able to create a graphical user interface, populate it with your game pieces and control their movement using the keyboard. Furthermore, you will be able to make the enemy shoot automatically as the user shoots using the keyboard. Finally, you will be able to detect any hits and calculate the score. Note: This course works best for learners who are based in the North America region. We’re currently working on providing the same experience in other regions.

Skills you will develop

Video Game DevelopmentJavaSwing toolkitcodingComputer Programming

Learn step-by-step

In a video that plays in a split-screen with your work area, your instructor will walk you through these steps:

  1. Setting up java environment.

  2. Populating window by creating space invaders and the user.

  3. Enable automated invaders' movement and manually move user using keyboard.

  4. Enable user shooting using the keyboard and automate invader's shooting.

  5. Check if any of the bullets hit the opponent and keep track of the score.

How Guided Projects work

Your workspace is a cloud desktop right in your browser, no download required

In a split-screen video, your instructor guides you step-by-step

Frequently asked questions

Frequently Asked Questions

More questions? Visit the Learner Help Center.