I'm currently building an interactive game which has a very special use case : The game is displayed on a giant screen on stage in a theatre, and the audience can play it with their smartphones (http://www.augmented-magic.com/)
My tools are :
- A desktop app made with Unity, displayed on stage
 - A web server (RoR) who provides the javascript app to audience members
 
The game is :
- You can move a fireflie on you mobile screen, and see all the fireflies of the audience on the stage screen.
 - That is all. I want to keep it simple for now
 
For my proof of concept, I had the following architecture :
- The web apps sends their own positions to the web server every 0.5ms (it's 500ms, sorry)
 - The web server stores and updates all these positions (in memory, no database)
 - The unity app asks the web server for all the positions every 0.5ms (500ms, again) and updates the game displayed on the stage screen accordingly
 
It worked well at first sight, but my tiny web server was on the knees when too many people played at the same time (which is really unfortunate for my kind of game).
So, I want to redesign this into :
- The web apps send their own positions directly to the Unity app, not the the web server
 - The unity app is the real game server, storing and updating positions
 - Yes, I like lists.
 
Now, here is my question : Would you communicate with TCP or UDP protocol between the JS in the web app and the unity game server ?
I'd like to know your thoughts :)
[EDIT] : I ended up creating a websocket server in my unity game with github.com/sta/websocket-sharp . Works very well