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

Menu screens #47

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

Menu screens #47

wants to merge 56 commits into from

Conversation

Henrygao19
Copy link
Contributor

@Henrygao19 Henrygao19 commented Nov 22, 2024

Overview

Implemented multiple menu screens and refactored the drawing system for better modularity. The menu system includes screens for the main menu, settings, end game, matchmaking, loading, logo display, and a pause menu. Refactored the simulator to be a class-based design. Enhanced the drawing process by introducing custom drawing classes and centralizing canvas ownership in the main.py file.

Changes Made

  • Created Menu Screens: Logo, Loading, Main Menu, Settings, Game, and End Screen.
  • Modified Main.py to handle menu screen transitions and controlling the game.
  • Modified Main.py to support research and players. The research side omits menu screen functionality.
  • Designed custom drawing classes: buttons, ninepatch, sliders, images, textbox, editable textbox.
  • Refactor rendering so that main.py now has ownership of the game canvas. Game canvas ownership originally belonged to renderer.py
  • Game is agnostic to resize

Test Coverage

Tested manually by navigating through all menu screens, interacting with UI elements, and ensuring seamless transitions. Verified that drawing components render correctly on the centralized canvas. Refactored simulator functionalities were tested by running sample simulations. Also tested all functionalities on different screen sizes.

Screenshots

Screenshot of different screen sizes (1440 x 1024) and (1440/4 x 1024/2) Screenshot 2024-11-22 at 10 53 10 AM Screenshot 2024-11-22 at 11 11 20 AM

@Henrygao19 Henrygao19 requested a review from chalo2000 November 22, 2024 16:13
Copy link
Contributor

@chalo2000 chalo2000 left a comment

Choose a reason for hiding this comment

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

nice job on your first PR! I've left some general code comments that I expect to be applied on all files (e.g. multiple violations of using snake case for variables and function names in Python but I only commented in a specific area). most of these are stylistic changes I trust you to make but I'm requesting changes because I'd like to see on my end that changing scale to smoothscale throughout the codebase will make the assets clearer. please focus on this change while addressing my other comments!

frontend/button.py Outdated Show resolved Hide resolved
frontend/button.py Show resolved Hide resolved
frontend/button.py Outdated Show resolved Hide resolved
frontend/constants.py Show resolved Hide resolved
frontend/editable_textbox.py Outdated Show resolved Hide resolved
frontend/logo.py Outdated Show resolved Hide resolved
frontend/matchmaking.py Outdated Show resolved Hide resolved
frontend/matchmaking.py Show resolved Hide resolved
frontend/pause.py Show resolved Hide resolved
frontend/pause.py Outdated Show resolved Hide resolved
Copy link
Contributor

@chalo2000 chalo2000 left a comment

Choose a reason for hiding this comment

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

thank you for the quick changes. left some comments. in addition, please remove the .DS_Store files from the PR and any other file changes that seem irrelevant to the PR (e.g. frontend/orders.py, frontend/orders_set.py, the fry_potato.json change)

frontend/editable_textbox.py Outdated Show resolved Hide resolved
frontend/endgame.py Outdated Show resolved Hide resolved
frontend/endgame.py Show resolved Hide resolved
renderer/renderer.py Show resolved Hide resolved
frontend/orders_set.py Outdated Show resolved Hide resolved
renderer/canvas.py Outdated Show resolved Hide resolved
robotouille/robotouille_simulator.py Outdated Show resolved Hide resolved
@CollinWoo CollinWoo mentioned this pull request Dec 20, 2024
7 tasks
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

Successfully merging this pull request may close these issues.

2 participants