Forum Academy Marketplace Showcase Pricing Features

Is it possible to build the following

I want to create a “game”
The game initially consists of a 10 x 10 square (think of a Super Bowl Square or excel sheet that shows 10 columns and 10 rows which is then 100 blank squares)
The game starts once 10 players enter (let’s assume as the sign up to play the game they get added to 1 of the columns first come first server left to right).
Once 10 players are confirmed across the 10 columns the rest of the 100 squares (all part of the 10 rows) are to be randomly populated with data (in this case names of NFL players). This data would have to be stored somewhere else like on Google Sheets I assume.
This is what I would like to try to create. Thoughts?

You could create a 10x10 repeating group in bubble and put whatever you like in there.

So yes, possible.

Yes, it’s possible.

As with most things, there are many ways to implement, but the way I’d possibly do it is as follows:

Add a few new data types:

  • Player (to store all the NFL players and their attributes if required).
  • Game (each record represents a game with 10 Teams).
  • Team (each record stores a reference to the User and a list of 10 Players).

The Game record could contain a field to indicate the game state. The initial state could be “open” (accepting new players). When a new user logs in, you could have a workflow to fetch the open game record and add a new Team. When the new Team is created, the list of Players in the Team can be populated by adding 10 random Player records (dynamic expressions can select random items). The list of players don’t need to be displayed to the users until the game is full of teams if you choose.

While the users are waiting on the game screen, a workflow could check the database every 5 seconds to determine if the game is full of teams. Perhaps the first user to join a Game can be flagged as the “host” (using a field on the Team data type, e.g. IsHost) who is responsible for changing the game state, to ensure that every user isn’t trying to change it at the same time. Once the game state is changed to “playing”, the data for all users can be displayed.

The design could simply use Repeating Groups to output the lists of Teams, or even many text elements if you wanted to, considering the number of elements always remains the same. You can place the elements into a Group which retrieves the entire Game from the database once so that each element does not need to go back to the database.

If you haven’t already, I would recommend completing all the tutorials before taking on this type of project.

I hope this helps!

1 Like