Multiplayer rock paper scissors not working

Hey guys so to keep it brief my friend and I are trying to make a rock paper scissors app that works on 2 phones, we were following this one posted on the forum :

paper.aia (23.0 KB)

but our app doesnt really work with multiplayer. We chose the gamemode( solo vs bot or player vs player) in this case player vs player( red button) and this is where the confusion starts. we type in each others names(i type in p1 in the first textbox and his name in the second and he does the same thing) then we click start and he chooses something and it doesnt show up to me and when i chose something it doesnt show up to him. I think it could be the DB type

this is the project:

Rps.aia (60.6 KB)

very thankful for your help

also i put in comments to help walk you through

I see you are using TinyWebDB instead of TinyDB.

You use TinyWebDb in 3 places, according to the wonderful KevinKun Find browser extension:



I see you get and store global empty dictionary userdb in TinyWebDB, but I never see you update it.

Dont i need tinywebdb to play online multiplayer on 2 phones instead of the regular tinydb

Quite right.

So I am guessing you are stuck on how to coordinate among the multiple phones through TinyWebDB?

I have thought a little on it, and I can propose a dictionary structure for your TinyWebDB game, if you want, that will help you on this.

Exactly, we cant seem to coordinate between the phones through webdb. I will take any help weve been stuck on this for the whole day(i deleted bcs i wasnt sure if i replied correctly)

Okay, here are some thoughts on how to play across TinyWebDB:

  • I am assuming TinyWebDB is really dumb, and can't store complex data structures like dictionaries. That simplification avoids all sorts of overwriting and locking problems.
  • Instead, I propose a fine grained update where every piece of data gets its own tag.
    Those tags would be built up using the text JOIN block, separating parts with '/'. (This works even better in FireBase and CloudDB)
  • For the front of the tag, pick something no one else uses, like 'NikolaAndABGRPSV1/'
  • For the second part of the tag, take one of two possible values:
    • The literal word 'ROUND/" JOINed with the current minute, assuming one round per minute: '202203311613/' military time yyyyMMddhhMM format. I assume all players are in the same time zone for this, though there are ways to get UTC for this.
    • The literal word 'PLAYERS', in which case the value would be the list of player names in this round
  • For the third part of the tag, use a player name from the PLAYER list, with a value the player's move for this round.

Sample tags:values ...
NikolaAndABGRPSV1/PLAYERS : ["ABG", "Nikola"]
NikolaAndABGRPSV1/ROUND/202203311613/ABG : rock
NikolaAndABGRPSV1/ROUND/202203311613/Nikola : paper
NikolaAndABGRPSV1/ROUND/202203311614/ABG : rock
NikolaAndABGRPSV1/ROUND/202203311615/Nikola : paper

In these samples, the first round had 2 players, and it can be inferred which one won.
That was followed by two fragmentary rounds, where the two players missed each other.

This should be supplemented by some extra housekeeping, to allow cleanup after the fact, though I doubt the MIT test server lacks any self cleaning facilities.

Given constant polling of the current PLAYERS list to tell you who else is playing this round, your app would know which tags to read to tell you who played what for this current round.

After the round is over (that minute has passed), you should be able to summarize the round.

1 Like

Im confused what do i do with blocks how should it look, im trying to understand what youre trying to say but i have no idea how to start or what to change

im very new to the app inventor stuff and this solution confuses me on a whole another level

Try searching the Gallery for Rock Paper Scissors.

I looked into the gallery and there are only games vs AI

Maybe the SMS texting component would be easier to use?

I havn'e used it yet, but I hope it would allow you to receive a text from your opponent's app without showing it to you until you have entered your move?

On further thought, maybe the TinyWebDB component is not well suited for this particular application, compared to CloudDB or FireBaseDB.

TinyWebDB lacks the all-important Get TagLists block, which is needed to support tag names that you have not pre-built into the app.
You don't want to build an app that works only for two specific people, do you?

P.S. I rummaged around in my projects collection, and found this example of overkill from 5 years ago. It never got onto my official project list.

I also found two versions of RPS on CloudDB, but I have no record of whether or not they ever worked:

The simpler version:
RPS_CloudDB.aia (12.1 KB)


The more complicated version:
RPS_CloudDB_using_lists.aia (12.2 KB)

I vaguely remember having problems with receiving When Data Changed events in FireBase or CliudDB until after I have sent them some data during the current app session.

Also, the stock MIT emulator is too old to be able to run FireBase or CloudDB. For more recent emulators, see

or use live devices.