matt-dray / tamRgo

:egg::space_invader: R package: a persistent cyberpet in your R console
https://matt-dray.github.io/tamRgo
Other
6 stars 0 forks source link

Battle #8

Open matt-dray opened 2 years ago

matt-dray commented 2 years ago

Idea via @adrianadepalma. Provide a pet (gist) ID, or choose one randomly (search gists for 'tamRgo.yaml' or whatever?). They (auto?)battle. Results are recorded in the pet blueprint. Wins increase happiness, increase XP/levelling up.

mattkerlogue commented 2 years ago

Oh perhaps my comment in #29 is better considered here.

matt-dray commented 2 years ago

@mattkerlogue Acknowledged, good shout.

Regardless, I think there's a strong case for local battling in the first instance. So you get assigned a randomised on-machine 'opponent' that is within your pet's level, but with an XP value that's maybe normally distributed around your pet's XP (I think XP may be tied strongly to attach strength, among other things).

Later could extend this allow players to input a gist ID to fight a given pet (though if yours is level 1 and there's is level 3, you are going to get smacked). Could scan for gists that have 'tamRgo' in the name, but will be prohibitively time-expensive to search, I'm sure.

There's also an argument that happiness/play() don't need to exist if there's a battle mechanic. Battling can reward XP for a win, for example, and maybe increase happiness.

mattkerlogue commented 2 years ago

Maybe you can curate a central gist with links to available pets. Would then be easy to write a function that calls that gist and allows the user to select a specific pet and/or get one assigned (either completely at random or a smart matching like you suggest).

matt-dray commented 2 years ago

But won't it be difficult to maintain a gist that's millions of lines long? 🙃

(But ooh yes, I hadn't thought if doing it like that.)