skycoin / cx-game

Game Prototype
7 stars 15 forks source link

Project Refactor #570

Closed ted537 closed 2 years ago

ted537 commented 2 years ago

Disassemble the common/ folder. GLAssert should be placed somewhere with the rest of the GL functions.

Disassemble the config/ folder.

Move procgen/perlin2d.go and procgen/perlin3d.go into procgen/perlin. This simplifies imports.

Disassemble physics/timer/ and place physics/timer/timer.go somewhere more relevant.

Move world/mapgen into procgen.

Add comments documenting structure of components/ folder.

Move world/connections.go and other pipe utilitiies into pipesim folder.

Remove dependency on interface at world/worldcollider/worldcollider.go.

Add README to document the purpose of the tiling/ package.

Rename/document events/ package to reflect the fact that it appears to exclusively deal with animations.

ted537 commented 2 years ago

physics/timer/ holds information about time between ticks. Conceptually, this data should be controlled by the game/ package. However, we cannot place this data within the game/ package, as components/agent_draw needs to know how much time has passed to interpolate correctly. This dependency could be resolved by passing information about the current time as a parameter, but this adds complexity to the function signatures.

Due to the messy nature of this change, saving the physics/timer/ refactor for a future pull request.

ted537 commented 2 years ago

For a similar reason, omitting world collider interface dependency from this pull request.