You can use the Connections panel to configure remote devices and web browsers as targets for the Stingray Editor. Once set up as a target, you can run your project on the device or in the browser, and for devices you can also mirror the Stingray Editor viewport to the device. (Mirroring the Stingray viewport to a browser is not currently supported.)
To... | |
---|---|
Add a target platform | Click in the toolbar, expand the new target and enter a name, platform type and IP address. |
Remove a target platform | Select the platform and click in the toolbar. |
Duplicate a target platform | Select the platform and click in the toolbar. |
Launch a data compilation for a target platform | Right-click the target and select Compile Data or Compile and Bundle Data. |
Each connection you configure requires the following settings:
Note: In order to connect to a remote device for mirroring or running your project, you also need to do some additional setup tasks specific to each platform, like installing software requirements. See the page for your device under Getting Started.
Connecting to a remote PC is currently not supported.
To make your device mirror the Stingray Editor viewport:
Orbit in the viewport to trigger a refresh. As you make changes or adjust your view in the Stingray Editor, you'll see the changes instantly on the device. Stingray sends the view from the editor camera to the device, letting you see how everything looks when rendered by the platform-specific renderer.
To run your project on the device in standalone mode:
Select the check box for your target below the Run Project button in the Connections panel. This marks the selected device as a run target.
Click the Run Project button at the top of the Connections panel.
When you initiate a connection to a remote device to either mirror the viewport or run the project, you can see the current status of the data transfer between your computer and the remote devices in the Log Console.
You can set up the Connections panel to launch multiple instances of the engine when you run the project.
Press to add multiple new targets.
Set each target to use the Windows platform, with IP address 127.0.0.1. Make sure the Run Project box is checked for each target.
Each target needs different command-line parameters. Two targets with the same name and same command line will only result in the engine launching once.
You can read these parameters in your project's Lua script and change the gameplay behavior based on their values. See the stingray.Application.argv() function.
For example, if you're testing a network setup, you could use --server and --client to make your game logic initialize the networking system in different ways. If you just want to open multiple windows without the parameters having any particular meaning, just add any strings as long as they're different for each target, like --instance1 and --instance2.
You can also have a look at the Stingray engine command-line reference for a list of all the command-line parameters that the engine understands. Many of them won't be useful to include in the connection setup, but you could use parameters like --editor-ini to make the different engines load their settings from different .ini files.
While you have multiple instances of the project running, you may want to zero in on one particular instance when reading console output, sending Lua and console commands, debugging Lua, etc. The editor offers drop-down lists or filters that you can use to select the instance that you're interested in.