Skip to content

Game: Refactor Game Simulator #2836

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

Merged
merged 26 commits into from
Mar 16, 2024
Merged

Conversation

lhw-1
Copy link
Collaborator

@lhw-1 lhw-1 commented Mar 7, 2024

Description

Partially addresses #2806. Refactors the Game Simulator code to improve code quality & extensibility.

While changes are mostly on code quality, there are minor changes to UI:

  • Asset Uploader is now renamed to Asset Viewer.
    • A new tab is introduced to switch between asset viewer and the asset uploader.
  • Checkpoint Simulator is now renamed to Chapter Simulator.
  • Chapter Simulator (the name of which was potentially confusing) is now rightly renamed to Chapter Publisher.
    • The Chapter Simulation option is no longer available for Chapter Publisher - it is planned to be re-introduced once the next stage of the refactoring is complete.

There are two more major updates planned following this refactor:

  • Incorporate lazy loading of the game within the game simulator itself - the game is not essential for the entire game simulator, though it is necessary for chapter simulation, meaning that it should be lazily loaded.
  • Change panel to a popup - this will be part of the UI update for the Game Simulator.

Documentation update & adding tests will be done after the above two updates.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality) - The tabs have been newly introduced, though minor.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Code quality improvements

How to test

Checklist

  • I have tested this code

@coveralls
Copy link

coveralls commented Mar 7, 2024

@lhw-1 lhw-1 marked this pull request as ready for review March 11, 2024 05:30
Copy link
Member

@RichDom2185 RichDom2185 left a comment

Choose a reason for hiding this comment

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

Hi, thanks for this, looking forward to the refactor! I just have some comments below, let me know your thoughts!

Copy link
Member

@RichDom2185 RichDom2185 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks a lot!

@lhw-1 lhw-1 requested a review from gok99 March 13, 2024 13:19
@lhw-1 lhw-1 merged commit f204c54 into source-academy:master Mar 16, 2024
CYX22222003 pushed a commit that referenced this pull request Mar 22, 2024
* Move Game Simulator subcomponent files to respective directories

* Refactor AssetViewer

* Refactor ChapterPublisher

* Refactor ChapterSimulator

* Refactor GameSimulator and Remove GameSimulatorGame

* Consolidate Types to GameSimulatorTypes

* Consolidate Utils to GameSimulatorUtils

* Refactor features/gameSimulator

* Move GameSimulatorAssets into GameSimulatorConstants

* Apply React.FC Type
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.

4 participants