Missile Command – Recap + Challenge!

Welcome to recap of Missile Command series which took part in my design patterns series!

Previous posts

Past 6 episodes we have been covering Factory, ECS, State, Mediator and Observer design patterns!
Throughout the explanations of each pattern, we also develop a small game based on iconic Atari game; Missile Command!

See all posts below if you haven’t checked it out yet!

Observer Pattern

Observer Pattern

Welcome to part 7 of the Design Patterns series. This episode will be about the Observer Pattern! Observer Pattern Observer is a behavioral design pattern that lets you define a subscription mechanism to notify multiple objects about any events that happen … Continued

Mediator pattern

Mediator pattern

Welcome to part 6 of the Design Patterns series. This episode will be about the Mediator Pattern! Mediator Pattern Mediator is a behavioral design pattern that lets you reduce chaotic dependencies between objects. The pattern restricts direct communications between the objects … Continued

State Pattern

State Pattern

Welcome to part 5 of the Design Patterns series.This episode will be about the State Pattern! State Pattern State is a behavioral design pattern that lets an object alter its behavior when its internal state changes. It appears as if the … Continued

ECS Pattern

ECS Pattern

Welcome to part 4 of the Design Patterns series.This episode will be about the ECS (Entity Component System) Pattern Entity Component System Entity-Component–System (ECS) is an architectural pattern. This pattern is widely used in game application development. ECS follows the … Continued

Factory Pattern

Factory Pattern

Welcome to part 3 of the Design Patterns series.This episode will be about the Factory Pattern! Factory Pattern Factory Pattern or Factory Method Pattern says that just define an interface or abstract class for creating an object but let the … Continued

Missile command – design patterns

Missile command – design patterns

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 … Continued

Demo

We managed to make this fun small game where we can destroy missiles by shooting explosive bullets. But what’s not visible to our players, is that we also managed to make a clean and scalable source code to easily iterate this game furter!

Breakdown:

  • Turrets and missiles are generated by factories
  • We cleaned up our missile behaviour and added turret barrels following our mouse position using ECS (Entity Component System) pattern
  • Made a menu and play scene using states. In order to navigate we added buttons which also has states.
  • Added bullets shooting from the turret barrel. We cleaned up the chaos we discovered in our play state by creating missile, turret and bullet mediators.
  • Added collision by creating observers for the mediators to handle!

Challenge!

To become a game developer you must keep challenging yourself. That’s why I think this is a perfect opportunity to challenge yourself using a little foundation.
As you can see after the last episode (Observer Pattern), the game is far from finished!
But that’s a great challenge for you!

I would like to challenge you to make the game more challenging. Try creating a helicopter entity which fires missiles just like in the real Atari and create a level system.
You can choose any programming language or tool you’d like! But if you like to use my project as your base foundation, feel free to download it from this GitHub link.

https://github.com/jscotty/DesignPatterns

Extra

To help you a little bit, I already added a scoring and game over logic to the project. 😊
Download the jar and let me know your high score!


I hope you enjoyed following this series!

Take the time to challenge yourself, and if you did, let me know!

If any questions, feel free to message me on Instagram @justinbieshaar or in comments below!

Happy coding everyone! 👨‍💻

Greetings,
Justin Scott

Follow Justin Scott:

I love to learn and share. - 01001010 01010011 01000010

Latest posts from

Leave a Reply

Your email address will not be published.