This episode will be about a new game we will develop to demonstrate a few design patterns!
Missile Command
I’ve recommended frequently on my Instagram to develop retro games to improve your game development skills! Missile command is definitely one of them, and suits this series greatly!
Missile command is an old retro game from Atari developed in 1980!
It’s a very fun game where you must defend the city from falling missiles. You’ll shoot exploding bullets in order to stop them. See video above 🙂.
For this series I’ll use the core idea of destroying falling missiles before they’ll hit the ground. But to highlight a few patterns, I’ll simplify it a bit.
Patterns
For this demo, I will cover 5 patterns;
- Factory Pattern – (Creating missiles and turrets)
- ECS (Entity Component System) Pattern – (Separate logic and make our game flexible to iterate)
- State Pattern – (Adding menu and clean entity by encapsulation)
- Mediator Pattern – (Managing missiles and turrets)
- Observer Pattern – (Observing missiles and turrets when fired for collision detection)
Throughout the series you’ll also see Singleton return which we have covered in previous episode!
Java
This demo will be completely developed in Java.
Why Java?
I choose to use Java for this series so we can build an ECS pattern fully from scratch to highlight it’s full potential and why it’s so commonly used in games.
End result
We’ll develop this missile command inspired demo game where you must destroy missiles before they hit the ground. When any bullet hits the ground, a live will be subtracted. Let’s see how much points you’ll get!
Stay tuned for upcoming episodes!
Because it will be quite a lot to cover, you’ll see the source code change to a cleaner and more sustainable code base. Which shows the beauty of using design patterns. 😀
Fun fact; Missile Command was my first test assignment in college where I had to use a design pattern. The Factory pattern!
If any questions, feel free to message me on Instagram @justinbieshaar or in comments below!
Happy coding everyone! 👨💻
Greetings,
Justin Scott
Leave a Reply