I’m trying to create a Hangman game on Bubble.io but I’m not sure how to proceed. Here’s what I’m thinking so far:
Generate a Random Word:
Is there a plugin or method to generate a random word for the game?
Display the Word in a Repeating Group:
The word should be part of a repeating group where each letter is invisible in its own cell initially ?
User Input and Guessing:
The user should input a letter in a text input. If the letter is in the word, it should be revealed in the appropriate cells. If not, the Hangman drawing should progress ?
Tracking Attempts:
Is it possible to set a specific number of attempts for the user? How can I track and update this?
If anyone can provide guidance or has any resources that could help me achieve this, I would be very grateful.
Want to post a public bubble URL and we can all pitch in?
I’d:
Create the word.
It’s just one word for the whole website so I’m going to hard code it.
Get list of words, maybe 10k, upload to bubble via CSV called “word_list”.
Make a database field “current_word”
If do a search for current_word:count is 0 then we’ll maybe we show a button for the user to click “start” and the start button makes the random word.
Displaying the word should be easy.
It’s going to be easy to reference the current word, but we’ll have to do it on the backend. So here we’ll make a system for showing how many letters current_word is and make that data public while keeping current_word hidden.
User Input and guessing - difficult but possible for sure!
You can track easily. Either wrap the whole thing into a “game state” where “users” can join that game, or make users sign up and give them a “cooldown” on how often they can guess.