Networked communication with multiple oF sketches

I’m wanting to make a project similar to an online video game, where I have openFrameworks sketch acting as a central server (which can display statistics) which is connected to several other openFrameworks sketches on different computers, with these acting as controllers. So lots of different computers connecting to one central computer over ethernet or wifi.

I’ve tried using OSC as a way of communicating between these sketches but OSC seems more setup to deal with continuous streams going one way.

I was wondering if anyone knew what kind of system or addons I could use to have these separate computers running openFrameworks sketches communicate and transfer information to and from eachother over ethernet or wifi.

Many thanks!

1 Like

Heyho, you could have a look at the mqtt pubsub protocol. There is an ofxMqtt addon. Additionally, you need a broker in your network. For testing you can use any public one. It’s tcp based, so no messages get lost, but it is bit slower than osc. I guess in most cases it does not matter. If the broker is configured to support websockets, then can easily communicate with websites.
Hope that helps, let me know if you have any questions.

Apologies for late reply!

This looks like an amazing addon, thanks for throwing it my way :slight_smile: