Skip to content

Refactor client game state to be a Tagged Union #91

@EduardoLR10

Description

@EduardoLR10

With the amount of resources we are currently loading, there is a massive overhead loading assets that you may not enter in the client (you go into config or keep at the menu and never load a world).
Hence, we should upgrade our state from a simple enum to a complete tagged union, allowing resources to be loaded by demand.
The first draft idea to implement this is to make a set of transition functions, i.e., functions that take care of going from a particular state to another one. This idea may be a bad one, because it may be the case that one state can transition to multiple other states instead of just one, thus making the set of transition functions exponentially bigger. This scenario, however, is very unlikely right now, but we should start thinking about it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clientClient-related issuesenhancementNew feature or request

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions