💾 Archived View for bbs.geminispace.org › s › smolgaming › 20816 captured on 2024-12-17 at 15:02:11. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

I'm working on a proof of concept for that game I mentioned earlier. I won't give away too much just yet, but it's a word guessing game. The basics of gameplay are working; making it look good in Gemini will come later. The biggest headache right now is generating grammatically correct clues. Right now, the word list includes a lot of derived forms, like "walks" and "walked". I've used NLTK and WordNet to auto-generate clues, but the problem is, it lemmatizes words and gives definitions for the base form. That means "walked" will have a clue like "move forward by foot" instead of "*moved* forward..." which is wrong. Not sure how to address this, but I'll keep at it.

Posted in: s/smolgaming

☯️ dragfyre

Oct 13 · 2 months ago

13 Comments ↓

🚀 mbays · Oct 13 at 14:12:

Sounds intriguing!

🚀 stack · Oct 13 at 16:01:

I've misspent much time writing stemmers, parsers and lemmatizers... It's too easy to go up the proverbial *ss with natural language. Then I figured I'd do something easy and spent a year dissecting and recombining dictionaries with various homemade tools until it became usable for Spellbinding. In the end I went over it word for word a few times, looking up words I didn't know. I guess I am a little more edumacated now.

☯️ dragfyre [OP] · Oct 15 at 00:16:

I've been able to refine the gameplay somewhat and add most of the needed formatting and design. It's actually pretty fun and challenging to play at this point, but sometimes it feels too hard - too easy to get stuck. I'd like to add a hint system based on points that slowly accrue day by day, to a certain limit. You would then have the option to use those points to activate different hints or spoilers, with more helpful hints being worth more points.

Regarding clues, so far I'm just plugging away at them little by little and fixing the grammar manually. It'll take longer, but at least I won't waste time trying to cobble together an NLP kludge.

☯️ dragfyre [OP] · Oct 17 at 13:34:

I installed gmcapsule on my local machine and started to work on converting the game from an interactive terminal script to a CGI script. Feels like I'm a bit out of practice, but it's coming back as I review the fundamentals. I've managed to get the basic pages sketched out; apart from continuing to edit the word lists for grammar, the next big thing will be to get the script to track each player's state. Wondering how I should do this 🤔 Would a database be overkill?

☯️ dragfyre [OP] · Oct 18 at 04:56:

WOW, this is coming along real well. The game basically works in Gemini capsule form now. Gamestates are saved as text files that are associated with each user's TLS hash. This'll probably be just fine unless I somehow get 3200 daily users—not likely since even Spellbinding doesn't get near that kind of traffic.

Now I just need to iron out the bugs, work out the devops (including switching away from agate on prod), and keep plugging away at the word lists.

🚀 stack · Oct 18 at 21:12:

yeah, the file-per-userhash should work fine in terms of load. I've been working on a session manager that keeps a simple key-value store in memory, with the top 16 in a cache which is reordered by access order. But it's an overkill.

Consider protecting yourself from a cheap and simple DOS attack of making a few thousand requests with random hashes...

☯️ dragfyre [OP] · Oct 19 at 03:29:

@stack yeah, I was thinking of throttling requests somehow / returning a "slow down" request to catch spam clicks. How would you suggest handling the multi-hash DoS scenario?

🚀 stack · Oct 19 at 04:15:

In your case, the simplest way I can think of is pick a limit of new registrations and track with your CGI. You have to store it somewhere, so it's another file to open and read, which may be combined with your other global data file... Maybe as simple as writing the time along with number of registrations in the last minute (if now is a different minute, restart count).

🕹️ skyjake [...] · Oct 19 at 05:06:

I agree with @stack, you want rate limiting for new registrations. I also recommend making the registration flow include a step that is not easily scriptable, for instance having to click on a link that contains a random (or deterministic but non-obvious) sequence of characters. The attacker would have to parse the response for the right URL to request, which can be a deterrent.

☯️ dragfyre [OP] · Oct 22 at 01:21:

Thanks @skyjake and @stack for the suggestions and guidance! I found the Gemini CGI guide and will be following it to implement the security checks. Things may be a bit slower going until it's ready to release, but that should be fine as it'll give me time to test things out, to refine gameplay and to keep proofreading the word list.

☯️ dragfyre [OP] · Oct 27 at 02:41:

Rate limits are in and seem pretty solid and not too irritating. I've also added some basic caching to reduce the CPU load. I have an idea of how to handle possible registration spam; it'll require a bit of refactoring. All told, we should be ready for alpha within the coming week.

☯️ dragfyre [OP] · Oct 30 at 13:27:

Soon.

Crostic Nines ⑨ • 2024-10-30

✅✅✅✅✅✅✅✅✅⭐

🙋 21 💁 2 ⏱️ 3h7m 🏆 255pts

☯️ dragfyre [OP] · Nov 02 at 08:13:

Refactoring is done, and everything that needs to be there is there. Time to do some last-minute debugging and then we're ready to launch!