CCP SDK

CCP SDK allows developers and modders to send data from their application / game to CCP Application running on mobile device.

Layouts on CCP can then display and the data.

 

SDK functionalities will be added with time, and at the moment you can send the following type of data :

– String   (simple text string, can be displayed by a label, note or button in CCP

– Numeric value with Min and Max values to display data on a “Radial Indicator” in CCP layouts.

 

Data input in CCP depends on a “Channeling” system, so you define a channel for the data you are sending from your application, and set up a item in CCP layout to “read” data from that channel.

 

A basic example of data reading in CCP are Kerbal Space Program layouts.

Each of the labels and indicators displaying text and values in this layout is connected to a specific channel. We made a “plugin” for KSP game to send game data to the various channels layout would expect and as a result you have a very cool gaming experience in KSP 😉

 

Resources :

Basic .net example

Kerbal Space Program CCP Plugin source

Unity3D Plugin :

Import the Unity package into your project, reach the Folder >  Assets>Plugins>FrozenPepper>Example  and load the Basic_ExampleScene.
the scene is very basic, but the on the game object “CCPConnector_Test_GUI” you’ll find a script called CCPExample  which should show you how to connect and use CCP communication in unity.
the basics are that somewhere in your code you’ll have to call :
CCPConnector.Connect(string masterChannelIdentifier, int port)  specifying the “MasterChannelIdentifier” for your layout (whichever you like but has to be same as on the Layout loaded in CCP app on iOS.
You can check if connection was successful using :
CCPConnector.IsConnected()     which returns a boolean.
Then to display or update data on the IOS layout, use:
CCPConnector.Communicate(string value, int channelId)      where string value is the text you want to display, and channelId is the channel. To read the data on CCP on the iOS device, set up  a label (or a button) and set the “channel” field to the same value you will be communicating too from Unity.
CCPConnector.Communicate01Range(float value,string text, int channelId)   use this to update a “Radial Indicator” (or gauges) in CCP, send a float value between 0 and 1 and the radial indicator listening on the channelId will update accordingly.