Build game end conditions

Hi there! I’m building a game app as my first bubble project and would like to create the following workflow for the end of the game:

a pop up window shows up (already designed) telling the user that the game has ended if the game was started 4 hours ago OR if all cards were dealt.

As a first step, I’ve tried to log the time when the button "start game is clicked (see screenshot) - is this the right first step?

Next, I wanted to implement a workflow to check every 10 minutes during the gameplay if the 4 hours are over - see screenshot. BUT: I cannot find how to select the “current time” in the dropdown that I tried to log.

I think it might have something to do with how I tried to create the state - wondering if it’s actually a data type that I’ve created.

I’d appreciate any hints from your side! Thank you :slight_smile:

Hi Isabelle,

I would do this a different way myself. Here is the steps I’d take:

  1. Set the game start time (like you already have)
  2. Create a new Backend workflow that will set the end time as current date/time
  3. Schedule this backend workflow for Current date/time + 4 hours
  4. On your page you can then set a conditional event: Only when Game time’s end time is not empty and then show the popup needed.

Hope that helps, let me know if you have any other questions.

1 Like

Hi Jonathan, thanks a lot for your help! I only got back to my project now.
Does your solution involve an API workflow like I have tried to set one up (see screenshot)


Is this a feature that is only available on a paid plan?

I am stuck at the last step - where I’m not able to Set condition: “Current Game’s end_time is not empty” (see screenshot)

Do you maybe have a hint what could be wrong?
Thanks a lot! :slight_smile:

Hey Isabelle,

You can use this event instead of the every 10 seconds event:

Then set the condition as “Group Game’s End Time is not empty”. Assuming “Group Game” is set as the game that is taking place.

Just make sure you run this every time as the default is usually just once (just once might work in your scenario but I can’t tell for sure and setting it as every time will definitely work):

1 Like