# Creating a multiplayer online game room

**URL:** https://community.thunkable.com/t/creating-a-multiplayer-online-game-room/470328
**Category:** Questions about Thunkable X
**Created:** [February 18, 2020, 2:28am UTC](https://community.thunkable.com/t/creating-a-multiplayer-online-game-room/470328 "2020-02-18T02:28:51Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![rojroj101s](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@rojroj101s](https://community.thunkable.com/u/rojroj101s)
#### Post date: [February 18, 2020, 2:28am UTC](https://community.thunkable.com/t/creating-a-multiplayer-online-game-room/470328/1 "2020-02-18T02:28:51Z")

</div>

Hello Thunkers,

Not much information out there about this topic…especially on thunkable x : /

I’m hoping for someone to at least help me get the ball rolling. My goal is to simply create an online room or connection between 2 phones. From there I just want to be able to have both players hit a button and it be viewed on both screens. From what I read thus far, I will be using Firebase as the database. Can anyone help me connect two phones and share 1 screen?

Any help, suggestions, info, guidance would be much appreciated, Thanks.

---

<div class="post-metadata">

### Author: ![eoinparkinson](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eoinparkinson/32/143769_2.png) [@eoinparkinson](https://community.thunkable.com/u/eoinparkinson)
#### Post date: [February 18, 2020, 2:30am UTC](https://community.thunkable.com/t/creating-a-multiplayer-online-game-room/470328/2 "2020-02-18T02:30:16Z")

</div>

What exactly are the users on each end going to be viewing. **Please give more detailed information.**

---

<div class="post-metadata">

### Author: ![rojroj101s](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@rojroj101s](https://community.thunkable.com/u/rojroj101s)
#### Post date: [February 18, 2020, 2:34am UTC](https://community.thunkable.com/t/creating-a-multiplayer-online-game-room/470328/3 "2020-02-18T02:34:49Z")

</div>

For simplicity, I would like user 1 and user 2 to each have a counter button. If user 1 pushed the button the counter goes up and it can be displayed on both users phones. And, vice versa.

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [February 18, 2020, 3:40am UTC](https://community.thunkable.com/t/creating-a-multiplayer-online-game-room/470328/4 "2020-02-18T03:40:26Z")

</div>

yes. i am working on something like this in using firebase. it’s totally doable!

it may be easier to use a cloud variable if you are making this for your own purposes. to publish you will want to use firebase.

---

<div class="post-metadata">

### Author: ![eoinparkinson](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eoinparkinson/32/143769_2.png) [@eoinparkinson](https://community.thunkable.com/u/eoinparkinson)
#### Post date: [February 18, 2020, 2:11pm UTC](https://community.thunkable.com/t/creating-a-multiplayer-online-game-room/470328/5 "2020-02-18T14:11:01Z")

</div>

For scaleability, you should create a tag which is named as a random 8 digit number.

In this tag you have a child called counter.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/7/772a447252d02de4173ac8c3b25fb9727d5bb2ef.png)

Here is where you have the number (variable) that will change according to how many times the button is pressed.

For both users to be linked into the game, they both must know the code.

Kind of like Kahoot, you could have the create a game option and join a game option.

---

<div class="post-metadata">

### Author: ![rojroj101s](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@rojroj101s](https://community.thunkable.com/u/rojroj101s)
#### Post date: [March 14, 2020, 5:23am UTC](https://community.thunkable.com/t/creating-a-multiplayer-online-game-room/470328/6 "2020-03-14T05:23:40Z")

</div>

Thanks!!

---

<div class="post-metadata">

### Author: ![Leito](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@Leito](https://community.thunkable.com/u/Leito)
#### Post date: [March 26, 2020, 8:01pm UTC](https://community.thunkable.com/t/creating-a-multiplayer-online-game-room/470328/7 "2020-03-26T20:01:06Z")

</div>

I m working in something similar too! But I m having difficulties, can you take a look?

> [@Saving and Geting information with Firebase](http://community.thunkable.com/t/saving-and-geting-information-with-firebase/535728):
>
> Hi I, made this with the purpose of connecting the users between each other, creating and joining to “games” but it’s very important to block the user from the possibility of creating two games with the same key or joining two games with the same key too. Can you give me a tip? Do you know how can I prevent this from happening? I tried to be as clear as possible, I hope you understand! Looking foward to your responses! Thank you very much!

---

<div class="post-metadata">

### Author: ![Leito](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@Leito](https://community.thunkable.com/u/Leito)
#### Post date: [March 26, 2020, 8:02pm UTC](https://community.thunkable.com/t/creating-a-multiplayer-online-game-room/470328/8 "2020-03-26T20:02:18Z")

</div>

In my case I try to create a "random player button where the users could play with anyone who created a game without knowing each other… But I m doing something wrong, Can you take a look?

> [@Saving and Geting information with Firebase](http://community.thunkable.com/t/saving-and-geting-information-with-firebase/535728):
>
> Hi I, made this with the purpose of connecting the users between each other, creating and joining to “games” but it’s very important to block the user from the possibility of creating two games with the same key or joining two games with the same key too. Can you give me a tip? Do you know how can I prevent this from happening? I tried to be as clear as possible, I hope you understand! Looking foward to your responses! Thank you very much!

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [March 26, 2020, 8:21pm UTC](https://community.thunkable.com/t/creating-a-multiplayer-online-game-room/470328/9 "2020-03-26T20:21:59Z")

</div>

Hi. please see this

> **[thunkablecompanion](https://thunk.app/web-build/index.html?webAppId=0UgxnW2K6)**
>
> Powered by Thunkable

there is a side navigator. pull it out and go to the screen “cloud counting”

 ![Screen Shot 2020-03-26 at 4.06.59 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/0/50bcb9d94669c31ac5f48fbf9ae53d97e9e03b70.png)

I find cloud variables much easier to work with than firebase, but either would work for this use case

---

<div class="post-metadata">

### Author: ![Leito](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@Leito](https://community.thunkable.com/u/Leito)
#### Post date: [March 26, 2020, 9:09pm UTC](https://community.thunkable.com/t/creating-a-multiplayer-online-game-room/470328/10 "2020-03-26T21:09:45Z")

</div>

Jared, sory about my ignorance but… where and how can I see the “cloud” variables? where it saved?

In Media DB Cloudinary?

---

<div class="post-metadata">

### Author: ![rojroj101s](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@rojroj101s](https://community.thunkable.com/u/rojroj101s)
#### Post date: [April 19, 2020, 1:33am UTC](https://community.thunkable.com/t/creating-a-multiplayer-online-game-room/470328/11 "2020-04-19T01:33:03Z")

</div>

little more help please. I created the random 8 digit number. I gave it 2 children. Now I’m having trouble getting the information. How do i get the information of the random 8 digit number? I know how to get the information given the key and then its the value… However the random number is by itself which is the key. not value… Should I be getting the key…

---

<div class="post-metadata">

### Author: ![rojroj101s](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@rojroj101s](https://community.thunkable.com/u/rojroj101s)
#### Post date: [April 19, 2020, 1:43am UTC](https://community.thunkable.com/t/creating-a-multiplayer-online-game-room/470328/12 "2020-04-19T01:43:14Z")

</div>

Here’s More info

 ![snip1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/c/4c792a547ae0b782f2199ce63b81bcee1e5abaa2.png)

I created a Match Passcode, Then had a child with a key " Match Passcode ": and the value " random # " I can get random number from this situation (the bottom tree). However when I add more data to the tree. I lose the value (random number) and my key stays. So i have no idea how to get the random number from firebase… which will allow me access to data of the the children…

Please help thanks.

---

<div class="post-metadata">

### Author: ![tchind](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@tchind](https://community.thunkable.com/u/tchind)
#### Post date: [September 30, 2020, 9:40am UTC](https://community.thunkable.com/t/creating-a-multiplayer-online-game-room/470328/13 "2020-09-30T09:40:10Z")

</div>

Good Question…you can do that…

Check out this project it might help you-[https://x.thunkable.com/projectPage/5ed20383def0899832ae5909](https://x.thunkable.com/projectPage/5ed20383def0899832ae5909)

---

<div class="post-metadata">

### Author: ![sennaklompxzr](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@sennaklompxzr](https://community.thunkable.com/u/sennaklompxzr)
#### Post date: [November 9, 2022, 3:59pm UTC](https://community.thunkable.com/t/creating-a-multiplayer-online-game-room/470328/14 "2022-11-09T15:59:56Z")

</div>

Epic

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 11:38am UTC](https://community.thunkable.com/t/creating-a-multiplayer-online-game-room/470328/15 "2024-11-08T11:38:52Z")

</div>


