Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game Restart Implementation #91

Merged
merged 10 commits into from Jun 20, 2019

Conversation

@darshan3
Copy link
Member

commented Jun 16, 2019

Project Cards:

  1. Game Restart [1]

How to test:

  1. Host a Light and Shadow game
  2. Join the game using one more client instance
  3. Choose one team with each of the players
  4. The player to collect the flag 5 times first wins!
  5. Press the restart button, first from the remote clients and then from the server/client instance.

Expected outcome:
The game over screen should now show a list of all players. Pressing restart will get players back to their bases and reset the points and health. Remote clients shouldn't be able to restart the game. Only Server/Client instance should be able to restart the game.

@iaronaraujo
Copy link
Contributor

left a comment

Everything seems to be working and the code is clean!

@nihal111
Copy link
Member

left a comment

Looks good to me, overall. Haven't tested locally yet, merging this on priority.
Just the one complaint-- the Restart button is made available to all, but is only enabled for the Server/Client instance, i.e. the Restart button is effectively just a dummy button for the connected Client instances. This isn't appropriate for the common setup in multiplayer which would include a headless server instance running permanently to which multiple clients connect and play. In such a setup, one client/group should have special permission to change game settings, trigger game restarts, etc.

As discussed, take this up in a future PR.

Also, might be nice to refactor ScoreUpdateFromServerEvent to take both team scores in a single event instead of the two that are needed currently.

@nihal111 nihal111 merged commit 0837e1f into master Jun 20, 2019

GSOC 2019: Light & Shadows automation moved this from In progress to Done Jun 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.