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

Widespread Refactor Planning #90

Open
np-eazy opened this issue May 17, 2023 · 2 comments
Open

Widespread Refactor Planning #90

np-eazy opened this issue May 17, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@np-eazy
Copy link
Owner

np-eazy commented May 17, 2023

More and more undefined errors are leaking in here or there because there are more areas I ended up resorting to referencing right after assigning and exposing the async nature of React. After beta release this must be looked into before any infrastructure scaling past the wrapper website. This issue will be a thread of all less-than-ideal fixes I'll be making before planning a more widespread refactor after beta release.

@np-eazy np-eazy changed the title The async integrity of this codebase is deteriorating. Async Integrity May 17, 2023
@np-eazy np-eazy changed the title Async Integrity Widespread Refactor Planning May 17, 2023
@np-eazy
Copy link
Owner Author

np-eazy commented May 17, 2023

GameState -> CoreState -> SettingsController -> PieceProvider is a dependency chain that is simultaneously initialized, but PieceProvider will reference SettingsController upon initialization to fill up its queue of pieces.

Current solution: don't use Level 1 to initialize the PieceProvider, initialize one ghost block and four normal blocks. This is less than ideal because it has an indirect impact on the game design, deterministically initializing power-ups rather than randomly generating them. This could actually be a good thing though since it compensates for the random location of the first target.

@np-eazy
Copy link
Owner Author

np-eazy commented May 17, 2023

To properly implement gamemodes, a lot of new coreState arguments were passed into functions here and there. However, so many arguments come from coreState dependencies and would be redundant with coreState itself, this shouldn't hurt the actual integrity of the code much but would be a nice refactor

@np-eazy np-eazy pinned this issue May 17, 2023
@np-eazy np-eazy added the enhancement New feature or request label May 18, 2023
@np-eazy np-eazy unpinned this issue Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant