Use individual play schedules #4

Closed
opened 2023-03-17 10:47:06 +01:00 by EpicKnarvik97 · 0 comments

The best way to avoid the problems with stopping songs for individual when the next song plays, and the problems where stopping one song might affect others, would be to utilize individual play schedules.
By using a sorted queue, it should be possible to minimize overhead, as one would only need to check whether the first song in the queue is finished, every few ticks. All expired songs should have their next song played, so it's important to note that several songs may expire at the same time.

If the song has to be re-played when traveling between worlds, it would probably be safest to stop all songs for that player, and re-play the current song.

If songs have to be reset per-world, it could make sense to pause songs for a player if that player isn't in the world the song is playing in.

It's important to clear the scheduling of a player's playing songs when they leave the server, to prevent overhead. Their currently playing songs should be stopped.

The best way to avoid the problems with stopping songs for individual when the next song plays, and the problems where stopping one song might affect others, would be to utilize individual play schedules. By using a sorted queue, it should be possible to minimize overhead, as one would only need to check whether the first song in the queue is finished, every few ticks. All expired songs should have their next song played, so it's important to note that several songs may expire at the same time. If the song has to be re-played when traveling between worlds, it would probably be safest to stop all songs for that player, and re-play the current song. If songs have to be reset per-world, it could make sense to pause songs for a player if that player isn't in the world the song is playing in. It's important to clear the scheduling of a player's playing songs when they leave the server, to prevent overhead. Their currently playing songs should be stopped.
EpicKnarvik97 added the
enhancement
label 2023-03-17 10:47:06 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: KnarCraft/Minstrel#4
No description provided.