A 2-player Co-Op based game for desktop with android smartphones as controllers!
Final Project made for the unit course of Laboratory of Object Oriented Programming @ FEUP 2018
- Angelo Teixeira - up201606516 - up201606516@fe.up.pt
- Henrique Lima - up201606525 - up201606525@fe.up.pt
The game will have three main screens, as presented below.
MVC - Model View Controller Used to separate the concerns of the state of the elements (Model), their evolution over time (Controller) and their representation to the user (View)
Singleton on the LpoortalGame (Main Game Class), GameModel, GameView, GameController and NetworkManager classes, because at every moment, there will only be one instance of them, and therefore, can be accessed more easily.
Observer On the controller, the GameController itself will be a listener (ContactListener) for collisions of the physical world (Embedded in the LibGDX library)
Flyweight Used in the View Package (Desktop) [ViewFactory class] to keep a cache of views being used, and allow for their reutilization
State Both desktop and mobile apps will have a state, that can be changed based on received events (i.e. when the server sends the message to the client so that it changes from PlayerCustomization State to Playing State (Drawing/Moving controller))
To test the game, we will focus on the Models, as well as the network packages.
We can test if the stickman moves to the desired position, if he doesn't walk out of the map, and if he collides with the lines/obstacles. We can also test if the level progresses after we crosses the portal
We can also test the drawings, by giving a start and end position, and testing the actual line that is produced.
To test the cursor, we can check that it moves according to the given parameters, and that it stays within bounds.
To test the network package, we can send malformed packets and assure that it deals correctly with them.