Loading...

Instantiate and Connect to XAYAWrapper

26 views

Loading...

Loading...

Transcript

The interactive transcript could not be loaded.

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Mar 4, 2019

See here: https://github.com/xaya/xaya_tutorial...

Instantiating and Connecting to XAYAWrapper **must** be done in a thread. The connection is a blocking operation.

However, once connected, XAYAWrapper will immediately begin sending log data to the console and game state data to the listener, i.e. through calling the `XAYAWrapper.xayaGameService.GetCurrentState` method. The log data isn't game state data though; that is examined below.

To instantiate the wrapper, call it's constructor:

wrapper = new XayaWrapper(dataPath, // The path to the game's executable file.
Properties.Settings.Default.Host, // The host, e.g. localhost or 127.0.0.1
"8900", // The game host port. Can be any free port.
ref result, // An error or success message.
CallbackFunctions.initialCallbackResult,
CallbackFunctions.forwardCallbackResult,
CallbackFunctions.backwardCallbackResult);

To connect, call the Connect method:

result = wrapper.Connect(dataPath, // The path to the game's executable file.
FLAGS_xaya_rpc_url, // The URL for RPC calls.
"8900", // The game host port. Can be any free port.
"0", // Which network to use: Mainnet, Testnet, or Regtestnet.
"memory", // The storage type: memory, sqlite, or lmdb.
"helloworld", // The name of the game in the 'g/' namespace.
dataPath + "\\..\\XayaStateProcessor\\database\\", // Path to the database folder, e.g. SQLite.
dataPath + "\\..\\XayaStateProcessor\\glogs\\"); // Path to glog output folder.

Loading...

When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...