diff --git a/overcooked_simulator/game_content/agents/random_agent.py b/overcooked_simulator/game_content/agents/random_agent.py index 9b666bb8c2e4e06d8b250bf8d743eb2965b65e26..2b3de5c7fab60a65902479da19b82c5c0402d16b 100644 --- a/overcooked_simulator/game_content/agents/random_agent.py +++ b/overcooked_simulator/game_content/agents/random_agent.py @@ -17,6 +17,8 @@ from overcooked_simulator.overcooked_environment import ( ) from overcooked_simulator.utils import custom_asdict_factory +TIME_TO_STOP_ACTION = 3.0 + async def agent(): parser = argparse.ArgumentParser("Random agent") diff --git a/overcooked_simulator/game_server.py b/overcooked_simulator/game_server.py index 21fb0db3c8d743271f968736bcf801d7ff6b08c2..8d58146e3fc37fe04a1e38ba8f100932e2230e54 100644 --- a/overcooked_simulator/game_server.py +++ b/overcooked_simulator/game_server.py @@ -567,7 +567,8 @@ class PlayerConnectionManager: connection_manager = PlayerConnectionManager() -environment_handler: EnvironmentHandler = EnvironmentHandler() +frequency = 200 +environment_handler: EnvironmentHandler = EnvironmentHandler(env_step_frequency=frequency) class PlayerRequestType(Enum): diff --git a/overcooked_simulator/gui_2d_vis/drawing.py b/overcooked_simulator/gui_2d_vis/drawing.py index f8f094a2a5351b0e9fd32c49fb853899beb7b859..c9eacf90cb78dcee2e8f0929851d5e0c435aceb5 100644 --- a/overcooked_simulator/gui_2d_vis/drawing.py +++ b/overcooked_simulator/gui_2d_vis/drawing.py @@ -339,7 +339,8 @@ class Visualizer: self.draw_image(screen, img_path, size, pos, angle) else: - size = 0.4 * grid_size + player_radius = 0.4 + size = player_radius * grid_size color1 = self.player_colors[p_idx] color2 = colors["white"] diff --git a/overcooked_simulator/gui_2d_vis/overcooked_gui.py b/overcooked_simulator/gui_2d_vis/overcooked_gui.py index f2e7ed9e945a2b62f472231ddf80127ed30ee5fa..7a08aeee22a2716a14bd123f9b96344592798b91 100644 --- a/overcooked_simulator/gui_2d_vis/overcooked_gui.py +++ b/overcooked_simulator/gui_2d_vis/overcooked_gui.py @@ -154,7 +154,10 @@ class PyGameGUI: self.window_height_fullscreen, ) = pygame.display.get_desktop_sizes()[0] - if self.window_width_fullscreen >= 3840 and self.window_height_fullscreen >= 2160: + if ( + self.window_width_fullscreen >= 3840 + and self.window_height_fullscreen >= 2160 + ): self.window_width_fullscreen /= 2 self.window_height_fullscreen /= 2 diff --git a/overcooked_simulator/gui_2d_vis/visualization.yaml b/overcooked_simulator/gui_2d_vis/visualization.yaml index 66e84efd3ab0ad49063a4aa8a82a135d046ff330..d388e83cdc9fc14e2d46e8bb08d22b8594999db1 100644 --- a/overcooked_simulator/gui_2d_vis/visualization.yaml +++ b/overcooked_simulator/gui_2d_vis/visualization.yaml @@ -6,7 +6,7 @@ GameWindow: min_height: 600 buttons_width: 180 buttons_height: 60 - FPS: 30 + FPS: 60 order_bar_height: 100 order_size: 50