By "Anything please"

Overview

Strike Force

By "Anything please"

For TDT4240

Trello: https://trello.com/invite/b/KnJ83SPl/4f0ac661316da1feacb1cea2057fe597/tdt4240group15

Run the server with java 17: https://adoptium.net/.

Run the client with the java SDK bundled with android studio (no need to make changes)

To run server:

  1. Connect to the NTNU network either physically or with a vpn
  2. Load project and make sure the project is recognised as gradle project
  3. Navigate to root folder and use the command:
.\gradlew bootRun
  1. Gradle integration in ide: server->Tasks->application->bootRun
  2. Current endpoint is localhost:8080 or http://10.0.2.2:8080/ if running an android emulator

To run the client:

  1. Use android studio to start either an android emulator or a desktop launcher

To play:

  1. Login with a username
  2. To create a game write a random number (preferably large to avoid crashes with old games)
  3. To join a game write the code provided from creating a game (as above). It is not necessarily the same code as the one used to create the game.
  4. When everybody is ready, click start game. Everyone needs to click the button.
  5. Select your actions and click submit
  6. When everyone has submitted, the game is updated
  7. Repeat til someone wins.

Even if the server is not hosted anywhere, you can still play multiplayer if everyone runs the server locally. This is because the server just updates the MySQL database.

Comments
  • Scene/main view

    Scene/main view

    The scene now renders required UI elements, and has basic functionality. It still lacks connections to the server, but this was outside the scope of the Trello task. The main menu uses the ui elements from https://github.com/libgdx/libgdx/tree/master/tests/gdx-tests-android/assets/data. Two buttons and a text field have been made.

    Textfield: saves input from this element to a String that serves as a game ID, and should be used to make calls to the server

    Join Game button: should take the gameID and send it to the server. Currently skips this step, and simply sends the user directly to the game view.

    Settigns button: sends the user to the settings view.

    A framework for a 'waiting to join game' has also been made. The render() function has a swith statement, with three states: MAIN, QEUED, and START. The plan is for the Join Game button to change the state to QEUED which will deactivate the UI elements, making sure that the user can't accidentally join two games at once. The player should stay in this state until the server sends a signal that the game is ready to be joined. This check isn't implemented yet.

    opened by ThorAlFR 1
  • Changes to allow for playing.

    Changes to allow for playing.

    Added toString to important classes. Gameplay example in Game.java.

    The game currently uses priority and action points, while move order (based on submission) is not tested. Cleaning, commenting, gameController -> serverController return string and some functionallity is not yet done.

    There is also a series of minor changes all over to make gameplay executions smoother.

    opened by Nikolailb 1
  • Feature/movement

    Feature/movement

    Implemented movement and changed how actions are executed. All actions can now be executed with the action.execute(grid) method. It has not been tested and what is currently missing is how and what to return to the MainController / client.

    opened by Nikolailb 1
  • Fixed bug where music wouldn't stop playing when Popping SceneManager…

    Fixed bug where music wouldn't stop playing when Popping SceneManager…

    … twice.

    Added line to SceneManager to call a scene's disposeEarly function, so that the scene can actually dispose when it is popped, not only when another is pushed on top of it

    opened by ThorAlFR 0
  • Scene/win and loss view

    Scene/win and loss view

    Should be the final merge! Now sends the player to either the victory or loss screen using grid.isGameWon, grid.getWinningPlayer and grid.getPlayer(playerID).getHealthPoint to check for this on the grid that is sent from the server on update

    opened by ThorAlFR 0
  • Added winstate to grid object on client side

    Added winstate to grid object on client side

    You can now get the winstate on the client side. Use grid.isGameWon() the check if the game is won. Use grid.getWinningPlayer() to get the winning player. grid.getWinningPlayer() will throw if the game is not won so do a if (grid.isGameWon()) before running it

    opened by Nikolailb 0
  • Implemented has turn changed functionality

    Implemented has turn changed functionality

    You can now call Request getHasChanged(gameID, currentTurn boolean) to see if the gamestate has changed. If it has changed the getGameState method should be called to update the grid

    opened by Nikolailb 0
  • Feature/client input

    Feature/client input

    The client now handles inputs. Still needs to be able to recieve inputs from player, highlight selected moves visually and post planned moves to the server.

    opened by Fueredoriku 0
Releases(1.0)
Owner
Fredrik Eiding
Fredrik Eiding