bottleware / ideas

potential things to build out
0 stars 0 forks source link

Anki games #4

Closed 100phlecs closed 2 years ago

100phlecs commented 2 years ago

@goodecf do you still use Anki? I want to gamify it by creating positive feedback loops between actual games and Anki. Right now I've ankibox in the works. Alpha-testing it currently. There are still some things in the game that needs integration with anki.

Let me know if first you still use Anki and, if so, let me know your thoughts on this (both ankibox above and integrating other games).

edit: Some thinking out loud - Anki is difficult to gamify.

In game design, it is important to use/apply the actual knowledge one wants within gameplay. Using the statistics it provides (like in Ankibox) doesn't let the person use the actual knowledge in the deck which is rather preferable. I think it is still possible to gamify just based off of statistics alone, but it's much harder. Because you have to accept this grind/reward system, which is hard to link together 🤔 but there's still hope

goodecf commented 2 years ago

I don't use Anki as much as I'd like so I like the idea of creating something that gets me to use it more 🙂.

I'm not sure how ankibox works but it doesn't seem to be working.

The idea of trying to integrate Anki into games that already exist seems interesting. Its seems like most people approach this problem by creating their own "games" like Memrise, Drops. It is a hard problem though, this may require a brainstorming session or two.

100phlecs commented 2 years ago

I forgot to mention that in order to use ankibox, you need AnkiConnect installed. All it should require is that add-on, for the website should prompt you for permission to access its api (and the only thing that it queries is the cards reviewed).

I agree that it'll require some additional thinking. Did some research last night for FOSS games one could fork, and came up short. Feel free to suggest a game you find, I'll keep looking.

The other path is making one's own game with integration in mind. In my previous attempts to make games I was usually stopped short by assets, but since we're in the dawn of procedural art generation, I think this may no longer be an issue. You can have unique art and have it look good if you know what programs to run.

Since Anki on its own seems to be the opposite of a game, it will be hard. It's important to understand what makes games interesting, even grindy JRPGs.

Some concepts on what, I think, makes a game successful:

  1. There is always a task you can immediately complete, or feels close. This is what I think made Runescape, for example, infamous.
  2. There is an overarching goal in the game's shadows, the original premise. In World of Warcraft, you first aimed for level 60, then you aimed to max out your gear to enjoy 'end game' activities. Every quest and mission you complete feels as though you're getting closer to this big end game. It brings clarity and gives purpose to your adventures. Why play Skyrim if you weren't going to slay the dragon?
  3. Achievements baked in by segmenting the progress. It gives an illusion of rapid progress. I.e. in your experience bar, you don't see 2% to level 100, you see 90% until the next level, level 2.
  4. Basically every single event, item, environment in the game contributes toward the end goal, but it also makes the game "expansive" for you & rewards you by going through hoops, i.e. completing this quest gives you a super useful trinket for later stuff. Or you learn a new ability. While in reality, people often sabotage themselves, "I ran for a week so let me binge". You would never get negative experience points for any task you would set out to do in a game.
  5. Simplified reality. You are given your big goal (point 2), you have x, y, and z ways to get toward that goal, and you linearly chug along, going from one town to the next gathering quests. This significantly reduces the things you need to think about. That's why videogames are often dubbed as escapism, because it is a lot easier to enjoy the constrained complexity of WoW than to instead venture out into the real world, which has no good positive feedback loops, no nudges of achievement w/ visual progress, and ambiguous over-arching goals. No item drops either :^)
  6. Variation. You don't complete 500 quests in the same town. Nor are all the quests the same. And as the world 'unlocks' you can do more stuff with your character, your abilities, with challenges, etc. Although the reality is simplified, good games force you to put your full effort into completing whatever task is at hand and slowly introduces an arsenal of options for you to choose from.

Just with these 5 points (there is a lot I bet, for example, flow state) you can see how Anki is detrimental toward game design:

So, if somehow one could take Anki, give it a leveling up system which somehow makes it easier to review cards, along with more achievements/rewards, skill trees, positive feedback loops, ways to get into flow state - if something like this could be created, then maybe it'll make reviews exciting.

100phlecs commented 2 years ago

The current way Anki is, along with this API, feels rather constrictive. The more I think about it the less hopeful I am that the end goal of making Anki fun is possible, which deters me 😄 Despite knowing what could make a good game, it seems we're reduced to do superficial integrations like ankibox.

Unless, of course, you want to make a new Anki ;)

To not completely abandon the idea, maybe it'll be useful - all we have at our disposal is those two metrics.

image

The number of cards reviewed, and the amount of time spent. These variables can easily integrate into arcade games, as tokens or something

edit: the positive feedback from these threads motivates me though. Maybe these two metrics are enough!

goodecf commented 2 years ago

Your points about what games a game successful seem accurate. Furthermore, I think those points are valid for most things we find fun: tangible progress, goals we perceive as achievable, variation. If we were working on a new game, or really anything, those points should be taken into consideration.

So, if somehow one could take Anki, give it a leveling up system which somehow makes it easier to review cards, along with more achievements/rewards, skill trees, positive feedback loops, ways to get into flow state - if something like this could be created, then maybe it'll make reviews exciting.

This reminds me of some of the habit apps out there that take habits you want to work on and make it so they have levels like an RPG. I could imagine a flash card app where you setup specific skills for certain decks and each time you do reps, the associated skill gains EXP, and something fun is done with that.

I would be open to making a new Anki if Anki isn't sufficient. If we plan out small PoCs then really any idea can be tried.

I think the target audience should be considered as well, if it's hardcore people with thousands of cards (language learners), school goers, all, etc.

100phlecs commented 2 years ago

This reminds me of some of the habit apps out there that take habits you want to work on and make it so they have levels like an RPG. I could imagine a flash card app where you setup specific skills for certain decks and each time you do reps, the associated skill gains EXP, and something fun is done with that.

Yeah, a deeper integration would require a rewrite of some sort. Well, there are several vectors of approach. I'm going to be giving some thought to it over the next couple of days. We're on the same page with the end goal I think:

tangible progress, goals we perceive as achievable, variation

The target audience is just you & I predominantly. Anyone else that hops on we can consider their input of course :~)

edit: If gamification isn't possible, then I think making a platform like Strava could be fun & interesting. It would be a cross between Strava and Github for Anki. So you could show off reps as well as contribute to shared decks. I just kinda want a tertiary effect of investment by working on some code.

For full disclosure, I did look at the Anki codebase within the last couple of weeks and could not be bothered to learn how it works, which is why it'd be interesting to just make a whole platform with a new client. It's ambitious, but may as well try :^)

goodecf commented 2 years ago

The target audience is just you & I predominantly. Anyone else that hops on we can consider their input of course :~)

In that case I think the main use case is language learning & large decks. The main reason I brought that up was because one idea I was thinking about was having something like a 10k, or N-k, card deck be the game's "end goal", and smaller hundreds/thousands be the checkpoints. Not sure how much I really like this idea though.

Editable shared decks sounds interesting.

Making a new Anki could be fun (but hard). Not sure about the feasibility, but I'm wondering about ideas of how the flashcard app can be made with more help from the program and require less work for the users. Anki has a good algorithm for determining when a card should be reviewed but it doesn't help with card creation at all (i.e. what to put on the cards). Not sure where to go with this, just something I thought about that could be worth exploring for a new flashcard app.

There's a lot of directions this could go... the Strava thing could be interesting where it'd be like open source decks where others could contribute. This idea really could complement any of the other ones.

100phlecs commented 2 years ago

There's definitely something amiss with the repetition system. It works, but it is also intimidating and it is easy to get off the trek, which I've done many times. A lot of work could be done. Instead of tackling that huge problem, adding supplemental software to make, as you said, creation easier, learning easier, etc - is an option. But you have a point; the main reason I use large premade decks myself is because card creation is painful and ambiguous.

As with the Strava, yes, that is what I would imagine too. It may be a bit large in scope, but what I imagine is a combo of GitHub and Strava: the GitHub portion is git creation and maintenance of decks, while the Strava portion displays your reps, allows you to friend people, share on social media, etc. Ideally the interface makes it so you require 0 knowledge of git.

While on the topic of learning, I do enjoy the concept of evergreen notes. It would be interesting to replicate this website.

For some background, recently I've gotten involved with Emacs, and more specifically, org-roam, which I'm sure you're familiar with, since it's Zettelkasten stuff. The main issue I have is that I rarely... branch out from topics or even create topics, because there's no easy overview, like what that guy has. There may be something in the manual, but not as smooth I would bet.

There's a heavy correlation between note-taking and flashcards - I don't know, I feel as though this domain hasn't been explored much.

Let me know what would most interest you. Whichever is made, I would hope to create it with Common Lisp & htmx, CSS, hyperscript. (the reason I made that blogpost a draft is because I want to confirm my suspicions by using lisp to create something). (The beauty of this stack, too, is that you can easily package it in https://tauri.studio/en/ if a desktop application (and potentially mobile) was desired).There's no expectation for you to code up anything since I am being rather imposing on the language choice/stack, but you are welcome to! If you want to learn more about Lisp, I think this is a great introduction. Reading through the first couple of chapters here (esp chap 3) may be useful, too. Here is an editor too. Hearing what you find interesting or what would make Anki a less painful experience is of tremendous help to me and the predominant reason why I reached out.

After jumping between many languages (C, Java, JS, C++, Rust, Elixir, Ruby, Flutter/Dart), I want to see if lisp may be the answer.

goodecf commented 2 years ago

Evergreen notes look interesting. Looks like someone's already working on it here but it doesn't seem to be open source.

To me the most interesting ideas so far have been about the gamification of an SRS. I like the idea of a game where a core aspect is dependent upon answering cards right. Checkout epistory - it's a game where you type to kill enemies. Either using existing games like the aforementioned examples or making a new one just for flashcards.

I don't mind learning a new stack if the project is interesting.

100phlecs commented 2 years ago

The epistory game looks really cool - it's the first time in awhile where I wouldn't mind playing a game. Yeah, the evergreen note stuff will just be a side project of mine, it'll be in the same stack if you're interested in it. The goal would be to have that interface for org-roam stuff. I mentioned it because I felt there was some connection to SRS with notetaking, but it's not that strong of a connection in retrospect. So, back onto the main point of this discussion, gamification.

If the main interest is gamification... I racked my brain for awhile on how to make something like epistory, but game ideas around Anki are difficult.

If I had to think of a game idea that revolved around SRS, it would be akin to the usual trope of a dead town centre that lost all of its original glory (think Mario Galaxy OG, or Bastion) and you have to go to different worlds to retrieve the power that was lost. For the power, I would choose the vague concept of Elements (i.e. reigniting the blacksmith's house with the element of Fire, restoring the lamps around the town with Electricity, restore fountain in the center of town with Water, etc)

To explore, let's say, the Fire realm, you would scout out the map with Anki cards, execute actions with Anki cards, I guess it would be a bit like Fire Emblem where you have troops and you have to clear the area, or something like Little Kings Story. The elements would of course be integrated by giving you new powers as you explore this area. Items would revolve around the yield of actions you get from a card, or powers to clear out enemies.

As for existing games, I can only think of resource acquisition games, but my testing with Candybox shows, for me, that it's not too terribly great a motivator (I've not been using it at all, still doing cards though.) I think one issue is that it's not immersive. I have to go to Anki to do the cards, then load in the cards done, then play the game. It would be nice if the SRS portion was more integrated, instead of being two separate activities. It feels too disjoint. By the time I do all of my cards, I just shut off my computer usually.

I do find the concept of an immersive game more interesting than doing something like Strava. Still, the nice thing about the Strava approach - or what I would call 'general' gamification where there isn't a center 'story' you could say, or an actual game - is that the scope is rather contained. It's really just a CRUD app, allowing achievements, social elements. Here's another example I found where it's more of a progress/meter/achievement portal with tangible rewards. Has strong parallels to what we're trying to achieve (encourage people to do things "good" for them) which plays on top of the Strava idea. Still, yes, making an actual game like epistory would be way cooler. edit: There's also an addon with the same vibe So, do you have any existing games that would be more interesting to tackle? Or what are your thoughts on making a new game? The current problem I see is that feeling of disjointedness. An important element in games is a feeling of continuity w.r.t. the next level, an achievement, beating the current dungeon you're in, etc. This feeling is lost with the discrete stepping mechanism that is "loading in" the cards you done, and then doing something with those cards.

Edit; An important thing I want to point out is to make sure the game isn't too discouraging, i.e. in the case of getting cards right or wrong. Repeatedly getting cards wrong that then negatively affects the game may make people want to quit all together. Making the game challenging is an important piece of games, I suppose we're just in a delicate situation since the game is centred around something people don't usually want to do. I think the challenge of the game should be on the mechanisms of the game itself, with the SRS driving progress, or something. At the same time, being able to actually use the knowledge you're trying to acquire in the form of a game seems to be the most rewarding way to acquire knowledge. I.e. using your knowledge of French words to complete a quest. It really depends on whether or not we control the data of the cards, because then it'd be easy to make challenges out of them, which, if you get correct, would reward you, but if you get wrong, wouldn't subtract from your progress

goodecf commented 2 years ago

Going off the Fire Emblem stuff, I think a turn-based game would work well for this since there's a natural built in break for a user to solve cards as opposed to any fast-paced game.

One concern I have is that the replayability needs to be high. Else, you beat the game in say X cards, and then you don't review any cards after that because well you beat the game. I'm thinking something like the Civilization games would cover these two points:

It's "unbeatable" (or, there isn't a definitive "end" to a story) It's turn-based Or a turn-based dungeon crawler. Really any game built around this idea of playing many separate games as opposed to one continuous run.

I like the idea of having an epic story but my concern is how do you keep the replayability there once the story is over?

Something I just thought about was what if a part of the game is that each deck is like a choosable character in the game that have different stats (XP, really) based on how many reps you've done in that deck? Like any rpg where you have different save files/characters.

100phlecs commented 2 years ago

This is all great discussion! It's an exciting space to tackle. I could see all of these games you mentioned being separate modules. Same concept with separate RPG characters per deck. The insight on repeatability is definitely a core attribute to keep in mind. It makes me want to study isolated game creation in general; a vector definitely worth exploring. I'm going to give it some more thought. There's a lot to meditate on and learn about, just on Common Lisp alone

goodecf commented 2 years ago

The hard part is deciding which idea to go with.

I think modularity is important here. If the frontend can be made to be replaceable then its implementation could be any game, regular flash cards, or anything else.

So, the core could be this SRS API and the frontend could be modular. I think this opens up more opportunities that may be thought of later, like having multiple games that could be swapped out.

100phlecs commented 2 years ago

Sure, if you want to give more thought to the architecture I'm amenable for changes. I'm rather excited to tackle this, just been learning design and other stuff.

The current architecture is:

The frontend is up for grabs really. The current plan was Djula - (git repo) because templating is such a powerful concept. Allows you to make "components"

I'm not as convinced now that htmx/hyperscript is a good idea. The other thing that caught my eye is Svelte, and I saw your recipe app built in that (are you still using it or nah? have something in mind?)

I do see the appeal of Svelte, but there's something about javascript build systems where you pull in a thousand packages and rely on bunders you don't understand... that makes me uncomfortable lol. It makes it hard to pull apart the parts we want to serve with Common Lisp. Usually these frameworks assume a full javascript stack. For example, the Svelte template creates a full bundle. And the output is .js files and stuff. It's just a ton of magic happening in the back, and I have no idea where in the world to insert stuff.

Still, we need some interactivity. An option is petite-vue. You just plug it into the header and it just works with Djula.

Also, out of curiosity, did you fully jump to vim or do you still use VS Code with vim bindings?

100phlecs commented 2 years ago

An ambitious project would be to implement the Svelte compiler/runtime within Common Lisp.

(svelte-compile #p"my-template.Svelte")

And it would result my-template.html with all the referenced components, js, css, inside of it.

Svelte is rather simple if you look at it. What makes it complicated is all of the JS stuff around it. Here is the output of Elder.js which is one of the more prominent static Svelte frameworks.

Screen Shot 2022-01-19 at 12 16 59 AM

The index.js contains the runtime code, shown in the Svelte repo above. The components then import that code.

Screen Shot 2022-01-19 at 12 18 50 AM

On index.html there's a <link> to the component, <script> at the bottom of the page which inits that component, and the component's html is directly injected in where it was referenced, i.e. <Component />

The From hardest to easiest, this is what I would predict

Another hard thing would be to make it modular so people can use other HTML schemes, css (like sass), or typescript. The css would be opinionated by following all preset CSS stuff, like css-nesting.

Seems like an interesting idea!

Edit: After looking at the mammoth size of Svelte, the complexity of compilers, and the power of CSS, I think petite-vue is perfect - because it gives you bonuses of avoiding vanillajs boilerplate while making sure you aren't too stuck in someone else's design, like htmx and svelte and so on. But, again, I'm amenable to check out other stuff. I just think simpler is better. petite vue under the hood probably isn't that simple

goodecf commented 2 years ago

Also, out of curiosity, did you fully jump to vim or do you still use VS Code with vim bindings?

I still use vscode with vim bindings.

In terms of frontend web frameworks, I've used and like most of the popular ones: Svelte, React, Vue.

I don't really know anything about implementing the Svelte compiler/petite-vue compiler within CL but I'd be willing to give it a try.

But, again, I'm amenable to check out other stuff. I just think simpler is better.

I think the simplest ways are to either use a web framework made for CL like Caveman or to go full JavaScript/TypeScript (on the frontend). The nice thing about using something popular is the support (community and tooling) around it.

100phlecs commented 2 years ago

Since you're on VS Code, I recommend you install the ALIVE extension after you get sbcl on your system for doing CL stuff. I tried it out, and it works pretty well! Of course you can also use Portacle, but I think VS Code will be just fine. When you get comfortable enough, you can check out paredit.

The community and tooling is certainly a help, I suppose what's different about CL is that the community is rather fragmented. Initiated a repo that uses only hunchentoot and djula templates. If you can think of a better name let me know lol, it's just an anagram of anki because I'm not trying to hide that it's different.

Building up this repo toward Caveman I think is the plan.

The issue I've had with Rails, Phoenix, or other frameworks is figuring out what package does what and why. By trying barebones, we can take what we need and go from there. And we get a deeper understanding of why each package is there.

I can already see the appeal of using Clack with my experience so far, for example, or the labelled routes, but pulling in the packages as we need helps in understanding why.

Here's a better picture of my thinking on my blog post here :) The last thing that needs to be done is to figure out a Design Systemâ„¢ later on, to make consistent styling. As for data store and such, I think sqlite3 is the plan. Djula works beautifully with sqlite within common lisp, shown by this Caveman snippet:

(render #P"users.html"
        (list :users (get-users-from-db)))

I've been trying to challenge the ideas behind functional css with tailwinds and such, and am inclined toward using sass and excessive selectors. Here's a blog post that is interesting and what I'm trying to think off of. Warning: the methodology feels a bit hazy, because the dependency graph between html/css is rather convoluted.

ok what does the MVP look like here?

What are the features we want in this new anki app? the goal here is that

Something I just thought about was what if a part of the game is that each deck is like a choosable character in the game that have different stats (XP, really) based on how many reps you've done in that deck? Like any rpg where you have different save files/characters. I like this idea because it is modular and gets to the core of gamification concepts, leveling up, visual progress, etc.

I could imagine a character on display next to the decks you're going through, equipped with gear and stuff, an Anki avatar, basically. Queue NFTs marketplace :^)

100phlecs commented 2 years ago

the reddit is a treasure trove of people wanting stuff https://old.reddit.com/r/Anki/comments/om2trr/next_level_anki_someone_develop_this_please/

Lagging in my reviews again... do you want to use the leaderboard addon and add each other? edit: That's defeatist, let's make the new app and let it motivate us!

goodecf commented 2 years ago

What do you think the MVP should aim for?

I think a dumbed down Anki would be a good start. A simple CRUD frontend/backend for cards. I believe a small MVP is a good idea since this project will be using a lot of new technology (at least to me) and a smaller MVP would be a good way to test them.

Getting it working with a game is important as well, that could a good next step. We could try to get reps in through an existing game, like in one of the reddit posts above with Command & Conquer.

100phlecs commented 2 years ago

After toying around in common lisp for awhile, which was a main motivator for this project, I'm wondering why I chose it again; and gamification is a hard topic to broach, as it involves game development: the scope here is huge! So it's just an idea for now, deleted the repo

I'm going to put this on the backlog for now. If you still want to work on it feel free If you have any other (small scope) project ideas you wanna collaborate on lemme know, but I'm probably going take a break for now!