Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

SlimeVolley initial ball velocity is incorrect #76

@lowrollr

Description

@lowrollr

Small issue with game state initialization:

def get_random_ball_v(key: jnp.ndarray):
result = random.uniform(key, shape=(2,)) * 2 - 1
ball_vx = result[1]*20
ball_vy = result[2]*7.5+17.5
return ball_vx, ball_vy

result[2] is out of bounds, which means it accesses the same value as result[1] -- and therefore ball_vx and ball_vy depend on the same value. This means the ball has higher y-vel when x-vel is positive, so the ball will be thrown higher to one player compared to the other.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions