Phone as a controller

0 favourites
  • 7 posts
From the Asset Store
Small pixel icons for the 3 most popular controller types.
  • I think I'm getting in w over my head. Is it possible to use your phone as a gamepad for a PC using C2? I'm thinking about making a game for up to four players, and while most people won't have four gamepads, four phones would be much more common.

  • I think there's an app called BlueputDroid that allows you to control consoles and PC with your phone. Using it as a gamepad though, I don't know if games will support phone to PC to game but it could be doable with that app.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If you are thinking of making a PC game that allows 4 phones to connect in, then...

    It's possible, to have phone as gamepad, that connects to PC, etc. You could use bluetooth, TCP/UDP, or some networking protocol to send input information.

    For Bluetooth, since HTML5 is basically a web page - it does NOT have permission to access bluetooth devices.

    What about other things like TCP? In C2, We have WebSocket feature, and "WebSocket is a protocol providing full-duplex communications channels over a single TCP connection."

    Is it feasible? From the C2 Manual:

    ebSockets and multiplayer games

    It may be tempting to use WebSockets to design real-time multiplayer games. Unfortunately, despite the fact they communicate in real-time, WebSockets are not currently a suitable choice for this. The underlying transport uses reliable transmission, meaning a single dropped packet can hold up all transmission until the packet is retransmitted successfully. For games with demanding real-time requirements, this can cause unplayable levels of latency. It is usually impossible to design around this without changing the transmission mode, which WebSockets do not support.

    On the other hand, WebSockets should be suitable for games without such a demanding real-time requirement, like turn-based games. It should also be useful for application services, like chat rooms. Note this will still require you to create your own WebSocket server.

    And one more thing to consider is:

    Using the WebSocket plugin requires a WebSocket server. Construct 2 does not provide a server nor can the WebSocket plugin be used to make a server. If you don't already have a WebSocket server set up, you will need to create one yourself using a technology like node.js with WebSocket support. This can be a significant undertaking and require server-side programming knowledge.

    That could be a bit overwhelming, and I am not saying this is the only method possible. Perhaps someone more knowledgeable in HTML5 and networking transmission might be able to address other possibilities of what you want more properly.

    On a side note, you could also try some other engines, other than C2 running on mobile phone too, because C2 is strictly HTML5.

  • You know what, I forgot to ask you one thing, Mulkaccino , which one do you actually after?

    1. Any PC game, but you want phones to emulate joystick inputs to the PC

    2. A PC game you made yourself and you want phones to be able to connect to. (If it is this choice, is your PC game also C2?)

    EDITED: Sorry, I just saw your objective in your edited post, mulkaccino. My bad. OK, so you want number 2.

  • Perhaps... you could try to execute some javascript, with Browser plugin? Can we send TCP or some other messages to some IP with this javascript, and on the other end, is it possible to receive that message? This is all theory, and this is beyond me, but if it is possible, it would be quite a nasty hack.

    scirra.com/manual/110/browser

  • But of course, just like what plinkie said, we all have these off the shelves apps anyway:

    play.google.com/store/apps/details

    So you can just go use those instead. :P

  • Thanks to you both for your replies! I'll look into those apps and see if there might be a way to leverage them.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)