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

Determine winner after specified laps #10

Open
meoblast001 opened this issue May 21, 2017 · 4 comments
Open

Determine winner after specified laps #10

meoblast001 opened this issue May 21, 2017 · 4 comments
Milestone

Comments

@meoblast001
Copy link
Owner

The server should take a parameter specifying the amount of laps. After the first player finishes that many laps, the server ends the game (moves into the waiting application state) and broadcasts to clients the winner as a reliable message. Each client prints the winner to the console and then ends the game (complete shutdown of engine).

@meoblast001 meoblast001 added this to the Milestone 1 milestone May 21, 2017
@maxschlosser
Copy link

I'd like to work on this.

Would you mind if I added an "EndState" or sth similar that could transition to the waiting state or end the game? I think that would make it easier to implement e.g. a score screen or a play again button later.

@meoblast001
Copy link
Owner Author

I think this is a good idea. This could later be extended with GUI to show a scoreboard.

@maxschlosser
Copy link

maxschlosser commented Jun 9, 2017

I've ran into a problem because the server seems to be not aware of the other player spatials. I'm not sure if I missed anything though the server creates it's own player object and is able to query it. Any other players are not available.

If that is the case, should I implement some kind of status message? I think #7 should be completed first though.

My code currently adds new fields to the player spatials that contain the completed laps and the playerIndex. The laps are queried by the server on PlayState update, this could probably also be done in collision.

@meoblast001
Copy link
Owner Author

Either #7 or #8 will need to be completed before this can be completely completed. I would say at first just make sure it can determine in general if someone has won. Once player input is accepted and the server has its own players, which is what I'm currently working on, then that can be specialised for the server.

@maxschlosser maxschlosser mentioned this issue Jun 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants