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

Make teams mandatory #35

Open
noother opened this issue Dec 5, 2010 · 6 comments
Open

Make teams mandatory #35

noother opened this issue Dec 5, 2010 · 6 comments

Comments

@noother
Copy link
Owner

noother commented Dec 5, 2010

Teams must be required to make records. People can still play without joining a team, but their records won't get saved. Otherwise it would still be possible to cheat by skipping parts

Records will be saved like that:

Output of /top5:

  1. hEssa, Saavik Time: 2 minute(s) 10.25 second(s)
  2. hEssa, noother Time: 2 minute(s) 15.21 second(s)
  3. noother, WTF Dreamor Time: 2 minute(s) 20.1 second(s)
  4. Ama, Tvgucker Time: 2 minute(s) 47.11 second(s)
  5. Saavik, Tsin Time: 17 minute(s) 59.99 second(s)
@JulianAssange
Copy link

Do the teams always have the same time?

@noother
Copy link
Owner Author

noother commented Dec 10, 2010

yes, that's already like that. race starts when first one crosses the start tiles - race ends when last one crosses the finish-tiles

@noother
Copy link
Owner Author

noother commented Dec 10, 2010

and if you type /rank, it should show the best record you made with anyone

@noother
Copy link
Owner Author

noother commented Dec 10, 2010

without joining mysql tables it's possible to break it by putting a ',' in your nick. but saving the names for the records in another table is too different from the normal saving.

names in mysql should be saved like that "noother, WTF Dreamor" (natural alphabetical [W > n])

if someone has a "," in his nick, just strip it before saving/reading the score or better escape it..

then, if you do /rank go through all records, split them by ', '& check if a name matches.

@noother
Copy link
Owner Author

noother commented Dec 10, 2010

or since it's mysql just do a LIKE %[NAME]% to get only a few for better performance, but still go through these results and check if the name really matches (or else "noother" and "nootherone" will conflict)

@noother
Copy link
Owner Author

noother commented Jan 19, 2011

copy'paste from the other issue:


I try to explain from the beginning.

First, we have an empty ranking, no one finished the map yet.

  1. Now, Tsin & Saavik finish the map in 5 minutes, 10 seconds.
    /top5: 1. Saavik, Tsin Time: 5 minute(s) 10.00 second(s)

  2. noother & Dreamor finish the map in 4 minutes, 5 seconds.
    /top5: 1. Dreamor, noother Time: 4 minute(s) 5.00 seconds

  1. Saavik, Tsin Time: 5 minute(s) 10.00 second(s)
  1. Tsin & noother finish the map in 10 minutes & 20 seconds
    /top5: 1. Dreamor, noother Time: 4 minute(s) 5.00 seconds
  1. Saavik, Tsin Time: 5 minute(s) 10.00 second(s)
  2. noother, Tsin Time 10 minute(s) 20.00 second(s)

Note that Tsin is now twice in the ranking, but with a different partner and a worse time. My record with Tsin didn't touch Saavik's record with Tsin at all.

  1. Tsin & noother finish the map in 3 minutes, 15.48 seconds
    /top5: 1. noother, Tsin Time 3 minute(s) 15.48 second(s)
  1. Dreamor, noother Time: 4 minute(s) 5.00 seconds
  2. Saavik, Tsin Time: 5 minute(s) 10.00 second(s)

Tsin & noother's record got updated, just like normal records get updated.

This means, 1 team setup counts like 1 unique person.

This can easily get achivied by manipulating the name that's used for inserting records. Just don't use a single name, but a concatenation of all Team members.

To have that concatenation always the same for the same team, order them alphabetically (natural, 'G' > 'a')

If you type /rank, your best time with whatever partner should be returned.
So, if Tsin now types /rank, "1. noother, Tsin Time 3 minute(s) 15.48 second(s)" should get returned. Not the record he made with Saavik.


I will do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants