Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xeno Candidate Queue #3636

Merged
merged 10 commits into from
Jun 23, 2023
Merged

Conversation

Drulikar
Copy link
Contributor

@Drulikar Drulikar commented Jun 15, 2023

About the pull request

This PR changes it so get_alien_candidates is normally a sorted list based generally on timeofdeath in ascending order and larva spawns now pull candidates out of that list in order. That means that an observer that has yet to play, or was the first to die, and still meets all other criteria to become a larva (not AFK, has preferences set to become larva, has been dead long enough, etc.) will be chosen before others.

Playing as a facehugger (dying or hugging successfully) or dying in an admin z-levels (such as thunderdome) also do not affect the value used for how you are sorted in the queue. So you should be able to freely play in either of those situations without losing your relative spot in the queue. Of course its not going to nab you out of whatever mob you are playing, but when you are a ghost again the same values will be used to sort you in the queue.

Since people may enter and leave the queue each time the queue is checked, your place in the queue may go up or down. It is just a snapshot of that moment where you are. If you missed your queue message, or haven't gotten one yet, the join xeno action will now display the last message for you.

Explain why it's good for the game

Picking candidates randomly is okay, but it would be more fair to give privilege to those that have been waiting longer - especially those who have yet to play.

Testing Photographs and Procedure

Screenshots & Videos

Example of queen death code (since that was the most altered):
larva

Changelog

🆑 Drathek
add: The selection to become a xeno larva is now based on timeofdeath rather than random and also sends a message to all candidates when the queue moves. Playing as a facehugger or on admin z-levels (thunderdome) will not affect your relative place in queue. The join xeno action will also display the last queue message for you when you allow xeno candidacy.
fix: Fixed gibbed humans not properly setting their timeofdeath when on an admin z-level.
fix: Fixed a bad del on shuttle doors when a shuttle deletes (such as intoTheSunset).
/:cl:

@github-actions github-actions bot added the Feature Feature coder badge label Jun 15, 2023
@ihatethisengine
Copy link
Contributor

Please speedmerge

code/__HELPERS/game.dm Outdated Show resolved Hide resolved
code/modules/mob/living/carbon/xenomorph/death.dm Outdated Show resolved Hide resolved
@morrowwolf
Copy link
Member

Let's give this a try!

@ihatethisengine
Copy link
Contributor

Might be a dumb question and I honestly tried to figure it out on my own, but are you sure it sorts from oldest to newest and not the other way around?

@Drulikar
Copy link
Contributor Author

Drulikar commented Jun 17, 2023

Might be a dumb question and I honestly tried to figure it out on my own, but are you sure it sorts from oldest to newest and not the other way around?

Yes I tested this with dummy clients in code originally (manually assigning their tod), and it is in the order that existing ascending compares are.

Tried again with two clients, and it worked as expected (just waited for the automatic spawn w/o using the button):
image
image

@morrowwolf
Copy link
Member

If this feels out of scope feel free to not do it but some people have requested a way to view their spot in queue. 🙏

@Drulikar
Copy link
Contributor Author

If this feels out of scope feel free to not do it but some people have requested a way to view their spot in queue. 🙏

image

Messages are now sent to all other candidates when either a burst occurs or the core spends a stored larva.

@morrowwolf
Copy link
Member

Beautiful!

@Drulikar
Copy link
Contributor Author

Drulikar commented Jun 18, 2023

Let me know if you'd rather a different metric to be used to be the sort order (likely a queue time that is at least your ToD). It is more fair the current way I think, but people might get confused when their queue number goes up from players who haven't played yet just observe and elect to be a xeno candidate. Their ToD should be 0 so the front of the queue, but they should still be after all other 0 ToD observers unless the sorting algorithm sometimes re-arranges entries with the same value. Last I looked it does not, but the sort method does change when the list is large (uses binarySort when small (32), otherwise a timSort).

@ihatethisengine
Copy link
Contributor

ihatethisengine commented Jun 18, 2023

Personally, I think it's fine, you can add a tip that states that player's place in queue can change because of this and that.

@morrowwolf
Copy link
Member

Let me know if you'd rather a different metric to be used to be the sort order (likely a queue time that is at least your ToD). It is more fair the current way I think, but people might get confused when their queue number goes up from players who haven't played yet just observe and elect to be a xeno candidate. Their ToD should be 0 so the front of the queue, but they should still be after all other 0 ToD observers unless the sorting algorithm sometimes re-arranges entries with the same value. Last I looked it does not, but the sort method does change when the list is large (uses binarySort when small (32), otherwise a timSort).

I'm gonna give this time to cook a bit on the server before merging just to see how the community settles in with it. I do think seeing your time in queue go up may be maddening if they don't realize what is happening. Something like just, how long you've been in queue determines when you get a larva may be better. But again, we'll see how things shake out over this week.

@ihatethisengine
Copy link
Contributor

ihatethisengine commented Jun 18, 2023

Something like just, how long you've been in queue determines when you get a larva may be better.

Then relogging or going AFK for a while will make you lose your place in the queue, which is not good. I think the current system is perfect, it just should explain to the player what's going on and why.

@Drulikar
Copy link
Contributor Author

An alternative way I could convey it would be to also mention if they are in a different queue:
Primary Queue: Players that haven't played yet.
Secondary Queue: Players that have a ToD.

The current functionality would be the same, it's just a modification to the message where it mentions primary if their ToD is 0 otherwise secondary.

Alternatively I count how many 0 ToD people are ahead of the current player and convey that count in the message.

There'll still be some queue jumps as people AFK/DC and then un-AFK/reconnect, but I think the bulk of queue hops will be from new observers.

@Tsurupeta

This comment was marked as off-topic.

@ihatethisengine
Copy link
Contributor

Another suggestion: add a message that states your place in queue after the message «You will now be considered for Xenomorph after unrevivable death events (where possible)» and when you join as observer with respective setting turned on. Waiting for next larva to burst to find out how long else you have to wait is not perfect.

@Drulikar
Copy link
Contributor Author

I don't A) want players toggling that setting rapidly just so they can constantly ping to see where they are now (It will just make queue numbers that much more inaccurate); and B) don't want to introduce spam reduction code to compensate for that.

@morrowwolf
Copy link
Member

I almost never get notified about my place in the larva queue. It may be easier just to broadcast the place in line when we get candidates.

@ihatethisengine
Copy link
Contributor

ihatethisengine commented Jun 19, 2023

Yeah I saw my place in line yesterday, but today I haven't yet. Maybe I just missed it because of ghost chat. Maybe you should add at least a verb that states your place in line.

@Drulikar
Copy link
Contributor Author

Yeah I saw my place in line yesterday, but today I haven't yet. Maybe I just missed it because of ghost chat. Maybe you should add at least a verb that states your place in line.

The queue was removed from test merge yesterday night, so no it would be impossible for you to be notified of it today.

…eue.

Added count of new players in queue message.
Added queue message for queen death event.
@Venuska1117
Copy link
Contributor

Venuska1117 commented Jun 21, 2023

After playing a little, i offer to tweak this queue, for example: you have 5 xenos vs 30 marines, xenos capture 10 marines but they loose 1 xeno, for example all dead marines want play xeno after death, now you need wait 11th in queue to get chance to go back, i suggest that people who died as xeno, but they go facehugger and successfuly hug, they will be moved up in queue, because for now its too much waiting to play again, on other hands i believe it should be done this way:
A - people who didnt play yet
B - xeno with died and wait very long

Queue look:
ABABABAB - if this still look bad it should move you more in queue if you wait very long after death as xeno, because die like 20minutes in, and need wait till hijack (with is actually just end of round) is kinda sad.

I successfully hugged marine with got brough back to hive, showed i am 1 in queue, then all of sudden i fell down like 5 in queue because marines who get hugged got in front of me because "they still have to play" or whatever it say when queue pop up.

P.S. make button or join xeno show how far in larva queue you are.

@IsDogHour
Copy link

This may need checking but currently, you can hug a marine as a facehugger and jump to the front of the larva queue. HHH checked this for me by dying, hugging a marine as a facehugger, and then instantly getting given a larva spot even with others waiting. I'm not sure if this is intended, but you can currently skip the wait by sitting by cappers and hugging what they capture.

@ihatethisengine
Copy link
Contributor

ihatethisengine commented Jun 21, 2023

Yeah, apparently when you hug as facehugger you don't have death time. I always thought it's a feature, because you can rejoin as hugger again (or roll xeno), it's a reward for successful hugging. I think it's kinda fair.

@IsDogHour
Copy link

Yeah, apparently when you hug as facehugger you don't have death time. I always thought it's a feature, because you can rejoin as hugger again (or roll xeno), it's a reward for successful hugging. I think it's kinda fair.

The goal of the PR is to allow those who have been waiting longer to have priority for fairness, being able to get priority by playing facehugger is not fair. Also hugging a marine isn't difficult at all when you can go sit by a warrior and hug whatever they catch (There are also a good chunk of xeno players who dislike facehuggers doing exactly this).

@ihatethisengine
Copy link
Contributor

The goal of the PR is to allow those who have been waiting longer to have priority for fairness, being able to get priority by playing facehugger is not fair. Also hugging a marine isn't difficult at all when you can go sit by a warrior and hug whatever they catch (There are also a good chunk of xeno players who dislike facehuggers doing exactly this).

I don't think they dislike huggers for this, I think they dislike huggers for having a really short stun compared to NPC huggers, that makes nesting more difficult. And it doesn't matter if it's difficult or not, still you kinda worked for this.

@Venuska1117
Copy link
Contributor

Venuska1117 commented Jun 21, 2023

Yeah, apparently when you hug as facehugger you don't have death time. I always thought it's a feature, because you can rejoin as hugger again (or roll xeno), it's a reward for successful hugging. I think it's kinda fair.

The goal of the PR is to allow those who have been waiting longer to have priority for fairness, being able to get priority by playing facehugger is not fair. Also hugging a marine isn't difficult at all when you can go sit by a warrior and hug whatever they catch (There are also a good chunk of xeno players who dislike facehuggers doing exactly this).

it make huggers more usefull, but i am mad that i hugged someone and it got taken away by someone else because of "queue" before queue was a thing, if you hugged person, you have high chance to spawn as larva, with i liked as reward for not dying (huggers are litellary paper, one bullet from any range and you are insta dead)

right now even if you succesfully hug someone, it will just get taken away by "queue priority"

@Venuska1117
Copy link
Contributor

Venuska1117 commented Jun 21, 2023

In Short - The Longer you are in observers, the longer you wait for queue, even hugging as facehugger don't save you, after you die you are just fucked, thats all you get, you die once, and you will probably dont respawn anymore.

You only respawn if there is no more "people who didn't play" in queue, but chances are very low for this.

@Drulikar Drulikar added the Fix Fix one bug, make ten more label Jun 22, 2023
Copy link
Member

@morrowwolf morrowwolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Little thing, otherwise looks good

code/__HELPERS/game.dm Outdated Show resolved Hide resolved
code/__HELPERS/game.dm Outdated Show resolved Hide resolved
@morrowwolf morrowwolf marked this pull request as draft June 22, 2023 20:03
@Drulikar Drulikar marked this pull request as ready for review June 22, 2023 22:54
@morrowwolf morrowwolf added this pull request to the merge queue Jun 23, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 23, 2023
@Drulikar
Copy link
Contributor Author

Looks like a github hiccup getting dependencies?

@morrowwolf morrowwolf added this pull request to the merge queue Jun 23, 2023
Merged via the queue into cmss13-devs:master with commit 907f235 Jun 23, 2023
github-actions bot added a commit that referenced this pull request Jun 23, 2023
cm13-github added a commit that referenced this pull request Jun 23, 2023
@Drulikar Drulikar deleted the Xeno_Candidate_Queue branch June 23, 2023 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Feature coder badge Fix Fix one bug, make ten more
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants