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

Puzzle/Scavenger Hunt Answer Checker #303

Open
Torgen opened this issue Mar 26, 2024 · 11 comments · May be fixed by #344
Open

Puzzle/Scavenger Hunt Answer Checker #303

Torgen opened this issue Mar 26, 2024 · 11 comments · May be fixed by #344
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@Torgen
Copy link
Contributor

Torgen commented Mar 26, 2024

Almost every year there's some kind of puzzle hunt on the boat, and those of us running it spend a bunch of our cruise doing office hours to check people's answers and give them stickers. It would be great for the answer-checking functionality to be built into Twitarr so people don't have to find us and we don't have to make ourselves available.

I don't mind implementing this, but I'm opening it as an issue to get thoughts from the community on what features it would need to have to be applicable to more than just one shadow event. For example, someone suggested virtual Passporto. You could certainly have a text code at every Passporto station that would give you a virtual Passporto stamp, though I think having the physical Passporto at the end is part of the appeal. Also, how would a shadow event register that it had a set of answers to be included in the checker? Does that need to be done before the cruise, or once on board? And should we implement this into Twitarr at all, or is it an option to run something like https://github.com/PuzzleTechHub/myus (or a mild fork of it) on the Twitarr server?

@cohoe
Copy link
Member

cohoe commented Mar 26, 2024

Throwing some thoughts out there in no particular order:

Simple (or even fuzzy) question/answer checking should be relatively easy. We could borrow a pattern we use in other areas wherein there is a "Manager" role who has RW privs to puzzles. Users could submit their answers and have their results logged somewhere where they, the manager, or everyone could view them (leaderboard?). I did a quick test of the myus puzzle thing and it's pretty barebones, so I think we could adopt some of that pretty easily. Advantage to building within Twitarr is that users can use one account rather than needing to establish separate credentials.

I agree that "virtual Passporto stamps" is somewhat dubious. The fun is in the physical hunting and stamping. Though I think having a well-published list of stamps (maybe "official" plus "shadow" stamps for people who brought their own?) could be beneficial. If someone brought a stamp they could add it and the location to the list of stamps. I haven't done Passporto so idk if this is within the spirit of the quest.

We can seed the database at bootstrap time (usually early morning embarkation or in early February when the server ships) with a set of questions. Having a JSON blob would be best. If we establish a manager role as described above, questions could be CRUD'd at any time during the sailing. Or even on embarkation day once they board.

@cohoe cohoe added enhancement New feature or request help wanted Extra attention is needed question Further information is requested labels Mar 26, 2024
@Torgen
Copy link
Contributor Author

Torgen commented Oct 20, 2024

Is your idea that a single manager would have permission to edit all hunts, or anybody could create a hunt and they would be manager of that hunt?

@cohoe
Copy link
Member

cohoe commented Oct 21, 2024

Initially I was envisioning a single manager (or a group of managers) for all hunts. Thinking about it more I suppose there is little reason to limit that to specific users. That way any user could create a hunt. If we got fancy they could even delegate administrative rights to hunts they create.

@cohoe
Copy link
Member

cohoe commented Oct 21, 2024

One other random implementation thought - Hunts must be Reportable.

@Torgen
Copy link
Contributor Author

Torgen commented Oct 23, 2024

Is there currently any other Reportable that can be edited by someone other than the creator or a moderator? Would you expect I'd have to modify guardCanModifyContent to support that?

@cohoe
Copy link
Member

cohoe commented Oct 23, 2024

I do not believe we have any instances of that case today. guardCanModifyContent in User+Extensions.swift and UserCache.swift could be extended to include an optional array of extra authors that get checked. Or maybe the functions could be overloaded? Regardless I believe the answer is yes it would need modified.

@Torgen
Copy link
Contributor Author

Torgen commented Oct 25, 2024

Feels like that might be a thing I should pull out to a smaller PR to have the answer checker PR end up more focused. Had another thought about it: say I create a hunt, then give people permission to edit it, and one of them does, then the hunt gets reported. If the model doesn't contain the history, the moderator won't know who should get suspended.

@cohoe
Copy link
Member

cohoe commented Oct 28, 2024

That's a great point. We keep edit history for most Reportables (such as

@Children(for: \.$fez) var edits: [FriendlyFezEdit]
and https://github.com/jocosocial/swiftarr/blob/master/Sources/swiftarr/Models/FriendlyFezEdit.swift#L12) for that reason. That would be the preferred way to do it. Or, for simplicity, only the creator of the hunt can edit the hunt.

@Torgen
Copy link
Contributor Author

Torgen commented Dec 4, 2024

Would it be more useful to you if I did this incrementally as a draft PR? I started out heading for a monolithic commit and have been bogged down, so if I tease it apart into incremental changes I can probably get to an MVP sooner. That also means I'd get feedback a little faster.

My initial plan was to have an edit experience, but to test the solver experience without the edit experience I'd probably want to support seeding anyways. That would give me the option of seeded only if I don't finish the edit experience in time.

Our last round of playtesting is scheduled for early February so we might miss the shipping deadline if we did it that way depending on if there are any last-minute changes, but if it could be emailed to someone and loaded on the boat then that deadline wouldn't be a problem.

1 similar comment
@Torgen
Copy link
Contributor Author

Torgen commented Dec 4, 2024

Would it be more useful to you if I did this incrementally as a draft PR? I started out heading for a monolithic commit and have been bogged down, so if I tease it apart into incremental changes I can probably get to an MVP sooner. That also means I'd get feedback a little faster.

My initial plan was to have an edit experience, but to test the solver experience without the edit experience I'd probably want to support seeding anyways. That would give me the option of seeded only if I don't finish the edit experience in time.

Our last round of playtesting is scheduled for early February so we might miss the shipping deadline if we did it that way depending on if there are any last-minute changes, but if it could be emailed to someone and loaded on the boat then that deadline wouldn't be a problem.

@cohoe
Copy link
Member

cohoe commented Dec 5, 2024

Fully acknowledging that I have done mega PRs here in the past, I do suggest smaller more incremental stuff. Way easier to review and give feedback along the way.

Seeding would certainly remove the amount of edit logic endpoints you'd need to write. We already have well paved paths for "shove JSON in path or in browser and click button" (schedule, time zones, board games are a couple examples). We usually have a pile of seed files to load during setup the morning of embarkation day. Adding one more would be trivial.

Since this is net-new functionality and I doubt I (Tricordarr) or Chall (Kraken) will have app support in time anyway, you probably dont have to worry about the code frost too much. That timeline may be moved up anyway due to the impending user pre-registration (spoiler alert?) capability. Biggest thing that I see impacting you is any third-party dependencies. Those have to get locked before ship so that we can do builds on boat.

@Torgen Torgen linked a pull request Dec 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants