Giter Club home page Giter Club logo

godot-remote's Introduction

Godot Remote

Use your phone as a wireless gamepad in Godot. Similar to jackbox.tv but more realtime.

Caution

The project is under very active development and is missing many important features. It's changing everyday so there isn't even the roughest of roadmaps.

Also note the following:

  • Horrible and even misleading documentation.
  • No real world testing... I will get to that later.
  • Lack of vital security measures. โŸต ( !!! )

Setup for Games

Note

The following may be out of date.

  • Install a mono version of Godot 4.2.X (tested on 4.2.1).

Additional Setup for Development

  • The repository already contains compiled code for the web interface. If you want to develop for it then follow these steps.
    • Open a terminal in addons/godot_remote/web.
    • Run pnpm i to install dependencies. Don't have PNPM?
    • Run pnpm run watch to watch and compile code.

Tip

Check out /docs for more info on development! (may be out of date)

Configuration

  • Open addons/godot_remote/scenes/autoloads/remote.tscn
  • Define desired driver and api scripts
    • At the moment only 3 drivers exist: WebSocket, WebRTC*, and SIP. You can find them in addons/godot_remote/scripts/drivers/.

Drivers

WebSocket

  • Script: websocket_driver.gd
  • Status: Perfect but slow

The most reliable but slowest of all the drivers. Everything should work perfectly when using this driver but ping is way to high for realtime games.

WebRTC

  • Script: webrtc_driver.gd (Uses the webrtc-native GDNative addon)
  • Status: Not implemented

Currently this driver has not be implemented yet. At the moment I am having trouble getting it to work and I'm waiting on this issue for more info.

WebRTC is an overkill communication standard however it is the only widely supported way to quickly send data over the internet (see Why WebRTC?). Under the hood the driver uses the WebSocket driver to establish it's connection, pretty cool right?

SIP Sorcery

  • Script: sip_driver.gd (uses C# and the SIPSorcery .NET package)
  • Status: It works but needs some work

See WebRTC

Footnotes

Why WebRTC?

There are two kinds of fundamental types of internet transport protocols: TCP and UDP. You can count on TCP packets (little messages) being sent to their destination but that reliability comes at a cost. On the opposite side of the coin there is UDP which is very fast but that comes at the cost of reliability. You won't even know if your messages have been delivered! The downsides of UDP are almost irrelevant for the project because the controller in always sending information about the controler plus we can choose which of the two protocols we want to use, playing into each others' strengths and weaknesses.

Unfortunately web browsers are really restrictive about what kinds of protocols they will let us use. The only two ways to send UDP (or UDP like) packets is either with WebRTC or WebTransport, the latter of which is lacking support in Safari, a big deal for phones.

Credits

godot-remote's People

Contributors

rylydou avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.