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

Host Settings Menu #767

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Host Settings Menu #767

wants to merge 11 commits into from

Conversation

Jack-Papel
Copy link
Collaborator

@Jack-Papel Jack-Papel commented Feb 22, 2025

This also removes the playerOnTrial packet since that data is already sent in the phaseState packet

@Jack-Papel
Copy link
Collaborator Author

image
image
image
image
image
image

@Jack-Papel Jack-Papel requested a review from ItsSammyM February 23, 2025 20:22
@Apersoma Apersoma added the New Feature New feature or request label Feb 24, 2025
Copy link
Collaborator

@ItsSammyM ItsSammyM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address comments

Server has warnings

When you change someones name mid game, styled text explodes because the text itself doesnt change

You absolutely dont need to be able to change peoples names mid game
If you can do that, then you should be able to edit others messages mid game

Make it so you cant change peoples names mid game to fix this IMO

This review was nit picky idk why

@@ -215,6 +223,13 @@ export default function messageListener(packet: ToClientPacket){
);
}
break;
case "hostData":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crazy

@@ -78,7 +91,9 @@ type GameState = {
ticking: boolean,

clientState: PlayerGameState | {type: "spectator"},
host: boolean,
host: null | {
clients: ListMap<LobbyClientID, GameClient>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You cant call this game client and then have it only exist if you are the host. Right you just like??? I guess the clients dont need it

This code is not self-explanatory

@@ -16,6 +16,9 @@ export type LobbyPreviewData = {

export type ToClientPacket = {
type: "pong",
} | {
type: "hostData",
clients: ListMapData<LobbyClientID, GameClient>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wild

GAME_MANAGER.state.phaseState.type === "finalWords"
))
GAME_MANAGER.state.phaseState.playerOnTrial = packet.playerIndex;
break;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldnt be in this PR but whateva

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick

@@ -178,6 +178,8 @@ export type ToServerPacket = {
type: "ping",
} | {
type: "lobbyListRequest",
} | {
type: "hostDataRequest",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i like

for client in clients.iter_mut() {
if let GameClientLocation::Spectator(index) = &mut client.1.client_location {
if *index > idx {
*index -= 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saturating sub. Do we have to decrease it?

}
Self::set_player_name(id, name, clients);
};
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename packets :P


GamePlayers{players: Vec<String>},
GameInitializationComplete,
BackToLobby,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this really not exist before?
What?

Oh right this is that packet i said to rename i forgot again lol

// Game

GamePlayers{players: Vec<String>},
GameInitializationComplete,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was looking around and im not entirely sure why we need this

The start game packet is supposed to be the signal to swap to the gamescreen

im sure there is a good reason

HostDataRequest,
EndGame,
SkipPhase,
SetPlayerName { id: LobbyClientID, name: String },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better names PLEASE!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants