Skip to content

Add sounds when match events (robots moving, robot shooting the ball, ball coliding) occur #157

@Bollos00

Description

@Bollos00

Is your feature request related to a problem? Please describe.
Not exactly.

Describe the solution you'd like
The simulation would be more alive if we could implement the sound of the collisions on the game (between the robots, the ball and the walls); the sound of the robot wheels moving, the sound of the kicker of the robot when it kicks the ball, the roller and so on.

Describe alternatives you've considered
The sounds would stored on the resources/sounds directory and we would have a .qrc file to organize them. We could use QMediaPlayer to play the sounds.

For example, to play the sound of the ball being kicked by the robot, it would be something like:

    QMediaPlayer* player = new QMediaPlayer(this);
    player->setMedia(QUrl("qrc:resources/sounds/ball_kicked.mp3"));
    player->setVolume(vol); // Depends of the distance from the expector
    player->play();

Additional context
Nothing to add here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions