gitcoinco / web

Grow Open Source
https://gitcoin.co
Other
1.78k stars 771 forks source link

New Gitcoin Quest Game Mechanic #5339

Closed owocki closed 3 years ago

owocki commented 5 years ago

Other Quests Threads

This Topic

The objective of this ticket is to create a Gitcoin Quest Game Mechanic

Got a retro game dynamic or game experience that you love? Want to build it into web-based educational experience? Want to earn some rewards (Quest Points, ETH) while doing so?

Whats the ROI?

Well..

About 45.7 Quests are played per day for a play count of 1188 total; There are Gitcoin Quests, which are played by a community of 136 active users of 27208 total; residing in 87 countries. The average quest has 169.71 plays. (stats updated on 10/18; updated stats available on gitcoin.co/quests)

How

State Machine

The state machine of a Quest Attempt is

  1. Started
  2. Done; success=False or success=True
  3. If success=False; then user may be in a cooldown period

Data Model

Gitcoin Quests Uses the following information as the basis of a quest

  1. Title
  2. Description
  3. Reading Material Title/URL
  4. Enemy Kudos & Reward KUdos
  5. Reward Points Value (usually 1)
  6. Multiple Choice Q&A list

Each quest has its own instansiation of these attributes. They are stored in the quest.models.Quest object

here is a backup of the production database for one example quest; so u can see what the data structures for this looks like.

This model; along with

  1. the QuestAttempt model (what it sounds like - an attempt at beating a quest)
  2. and QuestPointAward; a point award for beating it...
  3. and the dashboard.models.Profile object (the users login information)

basically make up the data model for these games.

the following functions from quest.helpers offer easy access to these models in a way that encapsulates common this a Gitcoin Quest needs to do:

game architecture

Gitcoin Quests Uses a modular architecture to allow different game dynamics to exist within the constraints of a quest.

An example of the addition of the barebones 'example Quest' type is contained in the following commit: https://github.com/gitcoinco/web/commit/ef9dfea4d92356bcfd9275d4765b5543d1acf03e#diff-ca1e4f8cc0f93c989bee11a8a3b08498

You will see that this commit modifies

These files exist for every game dynamic type in the codebase (just example and quiz_style right now)

Quests are toggled between different game dynamics in the DB; by the quiz_style field:

Screen Shot 2019-10-18 at 8 14 08 PM

There are only two styles available right now:

As you can see; the example style is an extremly barebones skeleton that can/should be copied/filled out by YOU as you perform this bounty!

success criteria

your objective will be to build a compelling game dynamic for the presentation / processing of the quests information (the reference material; then a Q&A engagement)

compelling =

  1. engaging / fun to play
  2. fair - if u get the right answers; then u win
  3. clear - UX should be intuitive
  4. device compatible (ipad; iphone) or if mobile devices has a degraded performance; it's managed correctly.

some insprational game mechaanics you might copy:

i would also be interesting in seeing a a game that abandons the educational component of the existing Gitcoin Quests... but is still crypto skinned in some fun/playful way... i'm less confident in this; but i think any of the following COULD work if the game mechanics are sufficiently engaging that it makes up for the lack of educational component.

  1. Flappy Bird
  2. Racer Game
  3. Sidescroller
  4. any puzzle game
  5. bar games (oregon trail; big buck hunter; pac man; fighter games) 6 Pokémon - use kudos, they all have special powers

from @octavioamu : would be nice to add code validation and let people complete it to validate their knowledge in some language.

assets

Please leverage any of the assets in the gitcoin creative assets repo! https://github.com/gitcoinco/creative esp the wallpapers https://github.com/gitcoinco/creative/tree/master/Brand/Wallpaper and the robot artwork https://github.com/gitcoinco/creative/tree/master/Marketing/Art/Robots/robot_kudos or this wallpaper artwork from my devcon preso https://drive.google.com/drive/folders/141PYBwos3e0pZx6nHb2eeB8I8pgg8IF5

rewards

I have 20 ETH to drop on 3 quests. Please follow the following path to work on this.

  1. Start work on Gitcoin - Pitch your quest idea to me there!
  2. Clone the repo using the README instructions + get a local instance u8p.
  3. Actually start coding -- Do not code more than 2-3 hours without having a WIP PR and a demo video or demo URL that you can show off!
  4. If ur trending negatively Ill give u some ETH for your time and send u on your way. If ur trending positively, Ill greenlight more work
  5. Iterate until you have a great game mechanic

PLEASE OVERCOMMUNICATE! Lets avoid a situation where you've poured a TON of work into something that won't be usable at the end of the day.

Ill pay the following for your work:

  1. 9 ETH
  2. 6 ETH
  3. 4 ETH

Below that; I'll pay out honorable mention prizes at my discretion.

gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 20.0 ETH (3456.56 USD @ $172.83/ETH) attached to it.

gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Cancelled


Work has been started.

These users each claimed they can complete the work by 2 years, 3 months ago. Please review their action plans below:

1) blockchainunchained has been approved to start work.

A space invaders style game might be fun, rather than just scrolling up through endless space I think you should start at Ethereum block 0 and fly your Ethereum space ship towards the current day (block 8774672 as of now). As you fly through the days and weeks you should encounter various hard forks, attacks (Shanghai!) and community events. If there is time and the game proves popular we could pull some sound effects from various presentations with the speakers consent. 2) ryan-foo has been approved to start work.

Hi! I’m interested to help to implement the Mario Kart answering correctly moves you ahead, answering wrongly crashes your car mechanic. It’ll be at the bottom of the screen, simple animation with the intention to help clearly signal their progress. It might be running robot, etc depending on the assets available. Will try my best! 3) merwane has been approved to start work.

I expressed the general idea on GitHub: https://github.com/gitcoinco/web/issues/5339#issuecomment-544422228 4) jezsmith720 has been approved to start work.

I would love to work on this. I am well versed in game-theory mechanics and have good experience making games and web apps in general. I am greatly enjoying Gitcoin and would love to contribute to any progression on the platform :) - my freelance website/portfolio @ https://bitwiseuk.com My POA would be to first read any relevant documentation, then play a few existing quests for reference/inspiration, then I will propose my idea/prototype to you before continuing development. Cheers, Jez 5) cervoneluca has been approved to start work.

Hi. I would like to know if this bounty is still open.

Thank you. 6) perpat84316 has been approved to start work.

Everything I need to complete the task. 7) bitsavage0202 has been approved to start work.

would love to see this develop 8) ivanmolto has been approved to start work.

I have experience developing gameplays and I would love to give it a try. Thank you!

Learn more on the Gitcoin Issue Details page.

owocki commented 5 years ago

@blockchainunchained sounds interesting! pls try to find a way to make it educational in some way :) looking forward to seeing what u come up with :)

@ryan-foo sounds cool! looking forward to seeing what u come up with!

hit me up with any questions

merwane commented 5 years ago

Does it have to be written on the Gitcoin/web codebase with a PR or can I just make it separate?

I thought of a game where users can stack Satoshis/Gwei as they stack squares on "Stack by Ketchapp", but by answering questions. They can later exchange them with Kudos. This can educate people about the way we can stack small units of cryptocurrency to eventually exchange them.

Another idea would be to create a word guessing game (like the Hangman game) for words around crypto/Blockchain. I'm already working on this one.

What do you think and which idea do you prefer?

owocki commented 5 years ago

i think each of the ideas is cool; go with whatever ur passionate about and think would create a great UX

yes its gotta be on gitcoin; otherwise theres no way to get the distribution from our platform or to tap kudos...

merwane commented 5 years ago

I am running Gitcoin locally using Docker, and when I try to access http://localhost:8000/quests/ the following error pops up:

AttributeError: 'NoneType' object has no attribute 'data'

Any idea on how to solve this?

blockchainunchained commented 5 years ago

Import the database dump from above or create a super user and make the models from the Django Admin page (usually localhost:8000/admin but they might have changed it).

owocki commented 5 years ago

@merwane can you post a stack trace?

admin is at http://localhost:8000/_administration @blockchainunchained

owocki commented 5 years ago

@merwane try commenting out the get_leaderboard() call or handling the exception there..

merwane commented 5 years ago

I did, but I don't want to break the normal workflow. Is it ok to keep it for testing later?

owocki commented 5 years ago

yes no problem; i just made a commit that'll fix the problem for you.. and when thats merged into master we'll be all good without commenting it out

merwane commented 5 years ago

Thanks for the help!

merwane commented 5 years ago

You asked for over-communication so here you go: I am working on integrating the Hangman game as a quest and for now, it is still very basic and not even linked to the database, the interface is still awful, etc.

https://github.com/merwane/web

Also, here are two screenshots: https://drive.google.com/file/d/1X62FNuyae0EZWq4AQ9cB9hkbKG_cAUd9/view?usp=sharing

https://drive.google.com/file/d/1SfnaOVyTzS2DeCa7oRc0miGpP7rYRS0Q/view?usp=sharing

I managed to solve the DB problem by handling the exception occurring with get_leaderboard().

You can reproduce it simply by creating a new quest via the admin interface with a style of "hangman".

What do you think in general?

owocki commented 5 years ago

i used to love hangman back in the day!

gfx are basic but we can have a designer take a pass later if thats not your skillset...

trying to brainstorm ways we can make it more educational for web3 users... instead of just a crapshoot to who can spell/remember words:

merwane commented 5 years ago

Yep, I'm already trying to implement hints when the user makes too many errors. Also, I've been thinking of a dynamic timer which can be increased when the user makes a good guess and decreased if not.

merwane commented 5 years ago

Also sorry for the delay, I'm quite busy these days and I'm doing my best to work on this bounty by night (CEST)

owocki commented 5 years ago

excited for the progress @merwane !

@ryan-foo @blockchainunchained how goes?

micksabox commented 5 years ago

Does it have to be written on the Gitcoin/web codebase with a PR or can I just make it separate?

Was thinking about a game to work on at ETHWaterloo but noticed this comment and answer.

yes its gotta be on gitcoin; otherwise theres no way to get the distribution from our platform or to tap kudos...

I didn't go through the whole spec, but I'm assuming the game could be built in a separate repo and hosted separately and then a "Gitcoin plugin" could be created used to link to it (iframe or other) from within a Gitcoin quest. It's probably going to have to be a react app. Please advise if I'm off base here.

merwane commented 5 years ago

I agree with @micksabox as React or other JS frameworks are best suited than JQuery for making dynamic interactive games. I would say the biggest downside is actually the ease of development. It would be cooler and much faster to develop it separately and find a way to "link" it with Gitcoin.

micksabox commented 5 years ago

My understanding is that in order to qualify for the ETH and tap the kudos then there needs to be a PR made in this repository. My question is more for the tech and deployment of the game, if it can be done elsewhere and then a Gitcoin Quest compatible-version could be made after the fact.

merwane commented 5 years ago

Creating a subdomain for quests can be an option too, with a whole different, more dynamic architecture. What do you think?

owocki commented 5 years ago

Was thinking about a game to work on at ETHWaterloo but noticed this comment and answer.

Nice; Ill be there most likely.. Lets jam there!

I agree with @micksabox as React or other JS frameworks are best suited than JQuery for making dynamic interactive games

Feel free to use React, even if it's added to this repository.

I didn't go through the whole spec, but I'm assuming the game could be built in a separate repo and hosted separately and then a "Gitcoin plugin" could be created used to link to it (iframe or other) from within a Gitcoin quest. It's probably going to have to be a react app. Please advise if I'm off base here.

You should read the spec. I wrote it as thoughtfully as possible so that we could have an informed discussion, and even created an example 'game' that shows players how to interact with the Gitcoin interfaces of the repo.

If people feel strongly about creating seperate apps that are linked I'll need to think about how to create an API bridge between Gitcoin and your apps... The primary things you'd need...

The list of Gitcoin codebase interfaces that you'd need to plug-in:

Creating a subdomain for quests can be an option too, with a whole different, more dynamic architecture. What do you think?

I'd be more than happy to host some quests on a subdomain... Provided they've been PR reviewed and look good. The only downside is that it introduces some security concerns WRT cookies, so we'd have to account for that in PR review.

merwane commented 5 years ago

Great! I'll start working on it using Nuxt.js. I can probably create a working concept tonight or tomorrow morning. I'll gradually start by creating the quest then we'll implement Kudos etc

owocki commented 5 years ago

kewl kewl

merwane commented 5 years ago

So I just finished creating a better-looking concept for the Hangman quest, adding hints, a better UI and a timer + lives system. Everything is very minimalistic and using vanilla JS but I thought it would be easier to implement it that way. The Nuxt.js idea was pretty dumb since there would have been a ton of work to do to re-implement everything.

Here's the repository: https://github.com/merwane/quest

owocki commented 5 years ago

sweet! is it hosted anywhere we can checkout without cloning/hosting ourselves?

merwane commented 5 years ago

Yeah sure, here you go: https://hangmanquest.netlify.com/

owocki commented 5 years ago

this is way cool :) good work!

a few notes:

octavioamu commented 5 years ago

Really nice! I notice even if I won the counter keeps going until I get "game over"

merwane commented 5 years ago

Thanks!

I'll work on updating the issues you mentioned such as the guessing possibility after the game over, the hint button disappearing after usage, the background, keyboard hotkeys, etc.

Concerning the security model, knowing that the words will be stored in a database, they shouldn't appear on page inspection after the quest is deployed for production with a proper DB.

owocki commented 5 years ago

I would say the biggest downside is actually the ease of development. It would be cooler and much faster to develop it separately and find a way to "link" it with Gitcoin.

Thanks everyone for your feedback!

if you could comment out a ' config' area of your app where the various things that will need to integrate into gitcoin go, that'd be super helpful.

working list of items:

if you contact me via email i can give you a few sample quests so you can see what the data model looks like and use actual production data in it

merwane commented 5 years ago

I just fixed the following things you asked for:

I'll set a keyboard listener as soon as possible to create a smoother and intuitive UX.

Also, I am currently simulating a database locally using Axios and an awful homemade backend just for the sake of testing, so I didn't really implement an interface to create quests atm. I'll certainly do it asap too.

You can give it a try on the same URL: https://hangmanquest.netlify.com/

merwane commented 5 years ago

I was just trying the keyboard listener implementation but I felt like the difficulty decreased a lot and the timer didn't make sense anymore because of the speed of typing on a keyboard. I don't think it should be implemented.

I think we should randomize the order of the letters to add more "peps" to the quest. What do you think?

Also, what do you think of the previous corrections?

owocki commented 5 years ago

i'd love some feedback on this PR from everyone https://github.com/gitcoinco/web/pull/5427 - which monetizes Gitcoin Quests with Codefund Ethical Ads (and proposes a rev share)

owocki commented 5 years ago

@merwane new feedback:

I was just trying the keyboard listener implementation but I felt like the difficulty decreased a lot and the timer didn't make sense anymore because of the speed of typing on a keyboard. I don't think it should be implemented.

i dont think it changes the difficulty much, as the avg questee wont konw the word (like you do when ur testing). thereby difficulty (and the fun!!) comes from choosing the letter u want; not finding that character on the keyboard..

Also, what do you think of the previous corrections?

getting better!!

merwane commented 5 years ago

Thanks for the feedback! I just updated the quest with the improvement proposals.

Also, I darkened the background image manually so that the text displays better.

Again, you can check on the same URL: https://hangmanquest.netlify.com/

merwane commented 5 years ago

Do you think I can submit? I want to start working on the NuCypher bounty which I find really cool but for a reason, Gitcoin prevents me from starting work. It says I can't have more than three active bounties, even if this is the only active bounty I'm in.

owocki commented 5 years ago

@merwane just increased your active issue count.. can you try on the nucpher bounty now??

so.. i still dont seem to be able to guess with my keyboard.. is that still forthcoming? we will also need for the gitcoin quests app and your quiz to be able to talk to each other.. is there a way that

sirlupinwatson commented 5 years ago

For the people who didn't see it on Gitcoin here is my idea : Imagine Zelda a link to the past on the SNES , i am sure 95% here will remember the map and when into a single squire zone like in the Small village, this could looks like to be the background of the idea i have . Copy Pasted from Gitcoin

Work Plan: Hi, i have a good idea for a nice quest style and new mechanics style. I am not skilled much to code but on the learning mode.

Here is the quest mechanics :

It's a 2D game Zelda a Link To The Past style in a single window with a map design and each question have a chest to open , this chest will contain a 10hp hit on the BOSS and the BOSS is on top of the screen waiting for the last question . There can have anywhere between 6 and 10 question, and the stats need to match the quest question number : Each quest answer you will move foward to the north of the screen and there will be a road , you can also choose to not answer a quest, and took the spare quest instead. This can lead either to consequences or a 10HP hit on the BOSS . The BOSS life need to be determined depending on the quest questions and answer.

So almost like a baldur's gate zelda style with bowser on top of it :) This BOSS can be a new desing Kudo token done by member here , that is my idea, give me your opinion please ?

merwane commented 5 years ago

@owocki Thanks for increasing my active issue count! I will apply for the bounty later as I don't really have an idea now. Also, I didn't integrate any mechanism to create hangman quests as of now, it's just hardcoded and I use a basic local config to simulate that for now. Is there any Gitcoin API I can make calls to when the user wins/loses or should I just make a redirection to gitcoin.co?

@Sirlupinwatson1 Your idea sounds really good as the gameplay is much more diverse than any existing quest, but it looks pretty tricky to implement. Is there any progress?

sirlupinwatson commented 5 years ago

@owocki Thanks for increasing my active issue count! I will apply for the bounty later as I don't really have an idea now. Also, I didn't integrate any mechanism to create hangman quests as of now, it's just hardcoded and I use a basic local config to simulate that for now. Is there any Gitcoin API I can make calls to when the user wins/loses or should I just make a redirection to gitcoin.co?

@Sirlupinwatson1 Your idea sounds really good as the gameplay is much more diverse than any existing quest, but it looks pretty tricky to implement. Is there any progress?

@merwane No work done so far, but just an idea when i seen the bounties, i have so much idea that come like instantly for any kind of project. Yes it is tricky a bit, but don't you think it still worth it , like we in 2019, it could be a very nice game and at the same time promotion like for Gitcoin . I mean people will talk about it ; He did you see the zelda like game on Gitcoin hahahaha. Well i hope. And its just a starting point also. I don't have much time to get on the computer in these days, real bounties in real life i need to take care and well it is not easy . I spend my spare time learning to code and Anything around , dev and creating some stuff here and here. So i might not be the best for this but i would like to contribute to something , i know i can help i am sure

sirlupinwatson commented 5 years ago

And yes, @merwane , the quest bounties is for a new mechanics quest so, i did think about it, and i see the end product already, i can visualize it in my mind lolllll. Not everyone have imagination but me,

merwane commented 5 years ago

Cool, you can try implementing it in the most simple way then update it gradually! As I can see you're from Montréal, bonne chance pour la suite! :)

sirlupinwatson commented 5 years ago

Thanks my friend, merci beaucoup ! Yes. been at EA Games Studio this week, 3 days on Video game there testing. Pretty funny

owocki commented 5 years ago

cool idea @Sirlupinwatson1

Is there any Gitcoin API I can make calls to when the user wins/loses or should I just make a redirection to gitcoin.co?

I need to code it up! on my todo list

merwane commented 5 years ago

cool idea @Sirlupinwatson1

Is there any Gitcoin API I can make calls to when the user wins/loses or should I just make a redirection to gitcoin.co?

I need to code it up! on my todo list

I can give a hand on that, I'm pretty good when it comes to RESTful APIs and Python haha :)

sirlupinwatson commented 5 years ago

@owocki @merwane wow that is cool. I mean , really ? Its not my project but a project for the community here i suppose. My idea are free, as well the time i am here, I learn so and i am happy to be able to contribute, to me its the futur gitcoin and all of this. Like i said i dont have much time in these days because the other world is calling me and my twins, but i will try my best to contribute as much i can. I thanks you very much guys, but feel free to open it up and start it up.

owocki commented 5 years ago

@merwane what do you think of just building the APIs that i desribe on https://github.com/gitcoinco/web/issues/5339#issuecomment-548607115 on this repo? happy to tip ya ofc .. and itll be a good way to eat ur own dogfood!

@Sirlupinwatson1 definitely man :) i loved zelda back in the day.. wish i had enough time to code video games all the time and make something of that caliber. maybe as a decentralized community with the same value set and the right incentive model we can do it together 🤷‍♂ !

merwane commented 5 years ago

@owocki Haha yeah, sure! I'd love to give it a try! Drop me an email at contact@merwane.me to discuss the details of the API :)

sirlupinwatson commented 5 years ago

I will put time on this , that week-end, saturday or sunday . And if you have any recommandation i will follow them. Please tell me as much as you can so i can be better , i know its not a learning lab, but just to share information for personal interest