Architecture - Jacob1225/pufferfish-minecraft-mod GitHub Wiki
Architectural Representation
This page summarizes the architecture from multiple views. To represent our mod, we decided to follow the 4+1 View Model, which includes:
- Logical view: Shows the conceptual organization of the mod.
- Process view: Illustrates how the mod processes communicate.
- Deployment view: Describes the connections between the mod and the physical computer.
- Implementation view: Summarizes the organization of the code, library and resources.
- Use-Case view: Summarizes the most architecturally significant use cases.
Why it is important: An architectural view describes the mod from a particular perspective. It is a complete and useful learning aid for current and new team members.
Logical View
Sequence diagram: There are 4 main objects in the game: the player, the tank, aliens, and the game itself. The game will start by pressing on start which will create aliens and the tank. There are then alternatives presented to the player as to which direction they would like to move in. By pressing on the left or right arrows, the player can control the movement of the tank. There are also alternatives in terms of shooting. The player may choose to shoot bullets from the tank by pressing on the space key. If a bullet reaches an alien, the score of the game is increased. Meanwhile, aliens are also shooting bullets which if reach the tank, will decrease the score of the game.
Process View
Activity diagram: The game starts sequentially by creating the arcade within Minecraft, activating it, inserting a coin and starting the game. Once the game has started, the tank and aliens act simultaneously, shooting and moving until an alien or the player is shot which leads to a change in the score. Once the maximum score is reached (all aliens are dead) or the tank is dead, the game reaches an end.
Deployment View
The device node is the physical computer that is going to execute the Minecraft game and .jar file. The artifact is the ourmod.jar file on the device node, which is an executable of our Minecraft mod. The communication path is the Forge API that makes a network connection between the physical computer and the Minecraft front-end servers. The Minecraft servers contain the front-end servers which constantly communicate back and forth with the databases.
Implementation view
This package diagram illustrates the organization and dependencies between the different packages inside the source folder. The java/com/project/Pufferfish package initiates the building process for the packages associated with the Invaders Mod. This file layout acts as a guide for new team members who look for particular source files of the code. For more information on how the mod packages interact with each other, please see the Mod Class Diagram page.
Use-Case View
Our complete use cases are available here: https://docs.google.com/document/d/1qleT9wAu4jjKoADS8OooevKP6lCNfsGwfMY8pSBfAt0/edit?usp=sharing
The most architecturally significant use case is Using the Space Invaders Mod. This use case represents a complete description of the player interaction with the mod itself which guided how the team worked on the different features. It goes from collecting the game tokens, to collecting prize tickets after scoring a high score on the Space Invaders game.