Compiled Game in Xcode to send data to max in real time?

Jamcob's icon

Please can someone help me find a way to send signals from a game source code (e.g. C + +) into Max/MSP in real time?

My intended outcome would be to make a generative music maker via the game.

dtr's icon

I don't program in Xcode but when I need to have for example Processing send data to MaxMSP (and vice versa) I use OSC (OpenSoundControl). One of the advantages of OSC is that it enables communication wihtin one machine as well as between different machines on a network/the internet. You could build that into your game. But for sure there's other ways to do this, especially if the game and Max are running on the same machine.

vade's icon
Anthony Palomba's icon

Another option is the Unity game engine. It supports
Mac and windows, has a script based editor, and can
output data to max via osc. Unity might be easier to
get up and going on game ideas as opposed to wrestling
with c++ source code.

Jamcob's icon

I've been looking at OSC and Unity, can't really find out how to set it up. Any help would be appreciated on that front.

Anthony Palomba's icon

You will need µ (mu) Max-Unity3D Interoperability Toolkit.
Which can be found at http://disis.music.vt.edu/main/portfolio.html