Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
How to Setup Multiplayer in CopperCube?

insanityjones
Registered User
Quote
2019-07-07 05:15:33

I have seen various old forum posts with dead links that claim to have some multiplayer support for CopperCube. However, is there any currently working way to have multiplayer support on CopperCube? If so, how would I go about adding this feature to a game project?


j9907
Registered User
Quote
2019-07-08 06:12:10

By default, CopperCube has networking support, but scripting is required to make use of it. I'm not sure how to actually use it (otherwise I would as well), but the documentation has a tiny bit of info on the two available commands:

ccbDoHTTPRequest(url, callback)

ccbCancelHTTPRequest(connectionIdToCancel)


"ccbDoHTTPRequest() makes a GET network request via HTTP to any web server, and ccbCancelHTTPRequest can cancel this request while it is running. This allows to communicate with any web/database/multiplayer server with ease. For ccbDoHTTPRequest parameters are:

url: set it an URL to request, like 'http:://www.example.com' or similar.
callback: A callback function which will be called with the received data once the request is finished. This will also be called if the request ailed, with an empty string as parameter.


The function returns an unique Id, for identifying this request. You can use this id as parameter for ccbCancelHTTPRequest(), to cancel the running request, if it takes too long for example.

Note: On some targets, like WebGL and Flash, it is not possible to do cross domain requests because of security reasons. Usually you should only do requests to the same server your script is running on. "


https://www.ambiera.com/coppercube/doc/index.html


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Int?rnational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact