Skip to content

WIP: Puyolib refactor#43

Draft
LossRain wants to merge 12 commits intopuyonexus:masterfrom
LossRain:puyolib_refactor
Draft

WIP: Puyolib refactor#43
LossRain wants to merge 12 commits intopuyonexus:masterfrom
LossRain:puyolib_refactor

Conversation

@LossRain
Copy link
Copy Markdown
Contributor

@LossRain LossRain commented Jun 24, 2023

This PR is a roadmap for the overhaul of Puyolib, the internal game-handling library. In the finale it will be a complete library for game-related problems that relies as little as possible on our configuration (such as network protocol or game client) with possible exceptions. This is an alive post.

The plan

  • Extract all non-core code (notably all rendering and network logic) in Puyolib into separate classes to make the codebase readable and hopefully modular
    • Game
    • Player
    • ...
  • Review the code and eliminate all redundant, ugly, slow and unsafe operations
    • Splice up the GameData object
    • Move all data (de)serialization outside to an intermediate interface
    • Remove hard-coded filenames in favor of enumerators and similar
    • Remove our dependency on hard-coded and potentially problematic constants (such as character names, their total count, etc.)
    • ...
  • Create reasonable interfaces for managing internal parameters ( no more haphazardly changing values in seemingly random parts of objects)

Small additions, fixes and changes shall be included without further comment.

PS: I understand that making such bold plans without much code to back it up is foolish and that my approach will lead me to refactor the same code several times but yet I believe it will force me to be accountable to myself and will not overwhelm me as much.

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.

1 participant