So I decided to formalize parts of the FPS game after having finished a module on software engineering in school, which makes a lot of sense given that I wish to provide a structure of some form to the process of making games.

In this case, I decided to draw out a UML Use Case diagram to represent the entire game system. Of course, while making the use case diagram, I realized there is a big part of the game I have failed to account for in my codes, as well as a lot of redundant parts. A use case diagram is really good in such cases, to identify key system functionalities as well as to eliminate redundancies.

This is in no way a finalized diagram and would definitely be subjected to modification throughout the game creation process, as per the needs of the game and my own whims. I strongly recommend anyone who wish to provide some structure in their game creation process to learn and master using UML diagrams, so strongly do I feel about its benefits that I might decide to write a post teaching about the use of UML diagrams.

From the diagram, I have modelled the physical game objects within the games as use case diagram actors, and the functions they hold in their scripts as use cases with an association between them.

Back to the topic of the FPS game, I have also thought about substituting the usage of delegates which I have been using for the Shooting functionality, and instead make use of the Strategy pattern, while delegates allow for different shooting functionalities as well, if it were to be substituted for the strategy pattern instead, the specific weapon characteristics can be modeled as well.

For instance, we can model how many bullets that are currently loaded within the gun, whether it is able to fire again, or what its fire rate is. The difference would be that an abstract class would be used instead of an interface, which is typically used in the strategy pattern.

What is noticeable in the diagram is also the Factory pattern, which is used to churn out many instances of the concrete weapons. Given that my schools exams are coming to an end soon, I plan to continue work on the game, and will likely start work revamping the level manager and monster spawners first. Do check often as I might post a practical tutorial on using UML diagrams.