JavaFX Game: Space Invaders (for Beginners)
We build a simple foundation for a clone of Space Invaders using JavaFX.
Difficulty: Beginner-Intermediate
Improvements:
1. Smoother movement. In setOnKeyPressed() have moveLeft = true; In update() have if (moveLeft) moveLeft(). Same for other input actions.
2. Enhance Sprite capabilities by introducing Image and ImageView, so you can use images instead of Rectangle.
3. More levels. Create a data structure Level where you can store each level's enemy layout.
4. Add movement feature to enemies, so that they move left / right and drop down like in Space Invaders.
5. Make the game more fun and enjoy!
Source code: https://github.com/AlmasB/FXTutorials
Twitter: https://twitter.com/AlmasBaim
GitHub: https://github.com/AlmasB/
LinkedIn: https://www.linkedin.com/in/almasb/
This channel can be sponsored at: https://github.com/sponsors/AlmasB/
Other Videos By Almas Baim (AlmasB)
2018-12-15 | Java: Software Development Workflow |
2018-12-02 | FXGL 11 Intro Demo |
2018-11-25 | JavaFX UI: Animations and Interpolators |
2018-11-11 | Introduction to Functional Programming (Stream API) in Java 8+ |
2018-10-27 | Design Patterns: Visitor |
2018-10-16 | JavaFX 11+ Cross-platform Deployment |
2018-10-10 | JavaFX 11+ Maven Tutorial |
2018-09-22 | Java: Common Intermediate-level Mistakes |
2018-08-26 | JavaFX Software: Weather App (MVC, Multithreading) |
2018-07-28 | FXGL Full Game Tutorial: Dodger |
2018-07-21 | JavaFX Game: Space Invaders (for Beginners) |
2018-07-12 | Zephyria RPG: Combat Mechanics |
2018-07-04 | FXGL 0.5.3 Changelog |
2018-07-02 | FXGL Demo: Particle Effects in Menu |
2018-06-14 | FXGL: Space Invaders - Some Story, New Levels and Bosses |
2018-06-10 | Java: Encryption for Beginners |
2018-06-01 | FXGL: Space Runner Demo |
2018-05-05 | FXGL: Basic iOS Demo |
2018-04-12 | FXGL: Web Browser Demo |
2018-04-02 | FXGL: Improved Physics and Animations |
2018-03-07 | FXGL: Space Invaders Android Demo |