Skip to content

Standard source for entropy #534

@MaxGraey

Description

@MaxGraey

Given that wasm4 is a rather very discrete system, it may not need access to a proper timer as suggested here:
#365

Instead of a timer, the vast majority of time user can simply use a game loop counter. In addition, on some systems (e.g. on some Arduino) the timer is simply not available.

But what is really needed is a seed to randomize the initial random state from run to run. Of course, you can use entropy harvesting tricks from user's input, but that's a waste of resources (time & wasm size) IMHO. While this could be delegated to the host via adding according API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions