Phone as Controller

Hi,

I was searching for a while now and did not find any related topics.

I’m thinking about using smartphones as controller for a PC-Game.
I want to use the PC for computing and rendering the game, and use smartphones (Android, IOS) as input devices (Buttons and joysticks on the phone).

Is there already some easy way to implement this, or do i have to implement it myself?

-regards
Jakob

This is an interesting idea that has been implemented in the past by a few developers, and I even wrote a prototype of this once in Unity. The overall idea goes something like this:

The game and mobile phone app are two separate applications that communicate via a socket connection. The Unreal game acts as the socket server that the smartphone can connect to, and pressing “buttons” on the smartphone app raises events in Unreal that control the player. Currently, there is not blueprint node for creating a socket connection, but there have been some articles posted on this topic using c++.

It’s a pretty simple concept, and socket connections are nothing new. There is a wealth of information online to help you make sense of them. The only real hurdle is using something like Bonjour to handle service discovery to find the IP address of the PC running the Unreal game, but it’s absolutely possible.

Hope this helps.

Would this approach work like XBox Smartglass? It’s an very interesting idea for sure.

You mean use a socket to connect smartphone to PC over the internet (or local network)?

Because I think this introduces significant input lag.

A good idea could be create one interface that allow the smartphone to communicate using Bluetooth or USB cable.

But I agree with CheapDevotion this is possible, isn’t so difficult

The argument for input lag doesn’t hold for local networks. Conceptually, I see two ways to do this.

  1. You can make a web server alongside your game and give to the players an IP+port to type in their browsers. Benefit: No extra app needed. Drawback: web skills needed & TCP is used. Shouldn’t be a problem on local networks… I think (local networks don’t have a lot of bottlenecks that could cause TCP to go into congestion avoidance).
  2. Create an app (or see if something like that already exists?) that uses UDP to talk with an open UDP socket from your game’s side. Benefit: UDP – speed boost (which, again, might not be that much better than TCP on local networks). Drawback: Much more things to take care of / develop are needed. Since UDP is unreliable and there are actions you probably want your server to receive, you would also need to develop your own little protocol over UDP.

If you really need to go through the internet, forget 1. Real-time multiplayer games with TCP are hard to pull off. Round-based is fine.

Hi. I’m developing a mobile app which consist in a tour around a house I’ve projected.
Since mobile developing doesn’t return materials with a proper texture quality, I thought about using the phone as a controller and visor, while actually the game runs into the computer.
I program in BP and I haven’t time to study C++ or programming in general. do you know any tutorial I can follow to set everything up?

do you know a way to improve material apearance in mobile devices? any link about this?
Thank you very much.

Hi all,
By default you can use sessions between android, ios, pc and mac, if you are using online subsystem null, but this approach is a bit tricky, you will need set your functionality inside some class which only belongs to the root map, or inside your game instance from the server, and then you can spawn levels only in the server in this case your pc, and your cel phone is just a client, and it will not be aware about this new level, but it will be able to send events from his own, and you can catch everything in your server, AFAIK this is the only walk around in blueprints, the real solution in this case is use c++ and TCP or UDP sockets, you sent you received, and you can work even in different projects and maps,

The connectivity between devices is nothing new, the problem here are just the companies, Mr Microsoft and Mr Apple do not want cross apps, but in end TCP and UDP are just com protocols, you can connect everything with everything if you want

{double post, sorry my connection is bad ja}

You could use the OSC protocols for doing this (OSC is a control protocol used by many sound interfaces so they can be remote controlled). I used an Unreal Engine plugin (which I forget the name of) as the OSC “server” and then had an android app using a thing called OSC Widgets as input device for an experiment I was running. It runs over a network and has pretty simple usage. I’d recommend investigating it.

Any idea what the Unreal Plugin is called? Would love to test it. I appreciate it