Skip to content

Optimise the functional tick behaviour #66

@mdales

Description

@mdales

In #29 the Claudius API was extended by @Vanessa082 to add a purely functional run function, whereby each tick the application just returns a list of primitives to render rather than doing a more stateful framebuffer update.

Under the hood this is currently implemented using the Claudius framebuffer. There is an opportunity here though to be more efficient, and skip the framebuffer for this path, just rendering to SDL directly, by translating the primitives to SDL draw operations. I did a partial proof-of-concept of this https://github.com/mdales/claudiusII/blob/main/src/base.ml#L26-L50

The challenges:

  • Working out how to map all the Claudius primitives to SDL (I only did a few in my test)
  • How to add this second draw path without making base.ml impossible to navigate
  • How to do it so that Browser version via Wasm rather than SDL2 #9 can do the same trick

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions