mecs

    A performance-first ECS experiment for MoonBit.

    ECS
    game
    Download zip
    Author
    Version
    0.2.1
    License
    Apache-2.0
    Last updated
    14 days ago
    Downloads
    37

    Dependencies

    #Milky2018/mecs

    Define your normal components which will be stored in Archetypes:

    ///|
    #valtype
    priv struct Pos {
    x : Double
    y : Double
    }

    ///|
    #valtype
    priv struct Vel {
    x : Double
    y : Double
    }

    ///|
    test {
    let position = Pos::{ x: 1.0, y: 2.0, }
    let velocity = Vel::{ x: 3.0, y: 4.0, }
    assert_eq(position.x + velocity.x, 4.0)
    assert_eq(position.y + velocity.y, 6.0)
    }

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io