- If you already have Visual Studio Code installed, skip to the next section.
- Visit https://code.visualstudio.com/Download and select your operating system.
- After the download completes, run the installer (Windows) or install the package (Linux/MacOS).
- After the install is completed, run Visual Studio code.
Next, visit the Installing Microclimate page to install and start Microclimate. Return to this page when done.
- In Visual Studio Code, select
View(menu bar item) >Extensions. UnderSearch Extensions in Marketplace, enterMicroclimate. - Select
Microclimate Developer Tools, and click theInstallbutton on the right-hand screen. - Reload Visual Studio Code.
- In the Microclimate browser UI, accept the Microclimate license and select an option on the telemetry page. You should now see the Microclimate introductory splash screen.
- Select the
Import Projectbutton. On the following page, selectGit, then copy and paste the following repository location:
https://github.com/microclimate-dev2ops/rogue-cloud-client
- Click
Next, then click theImportbutton. - Once the code is imported, click the
Edit Codebutton. You are now redirected to the code editor. - Before the code starts building, the container needs to initialize and download the Java and Maven dependencies for the underlying build system. This can take up to 7 to 10 minutes depending on CPU and network connection (this initialization is only required the first time you using Microclimate). You can use
docker logs -f microclimate-file-watcherto watch its progress. - Once the build has initialized and downloaded the required dependencies, the build icon displays a green circle notification, like so:

Once the build completes, you can return to the Visual Studio Code window.
You should now have both Visual Studio Code and Microclimate installed. Next we need to configure the Visual Studio Code Tools to connect to the Microclimate service.
Ensure that Microclimate is up and running before proceeding with these steps.
- In Visual Studio Code, select
View(menu bar item) >Explorer. - On the left-hand panel, expand the
MICROCLIMATEview. - In this view, click on
No Microclimate connections. - This will bring up a text bar at the top of the screen asking you to
Enter the Port for the local Microclimate instance you want to connect to: - Ensure that
9090is the default value in this field, and press Enter. - You should see a notification indicating that the connection to Microclimate has been successfully created. You should also see the
roguecloudclientapplication running in this view. This is the project we imported from Git in a previous step. - Right-click on
roguecloudclientand selectOpen folder as workspace.
See the Microclimate documentation for more information on connecting to Microclimate instance from Eclipse.
- In the code editor, press
CTRL-P(Command-Pon Mac) and typeStartAgentServlet.java, and selectStartAgentServlet.java.
CTRL-P/Command-Pis a great way to quickly find Java classes in the Visual Studio Code editor.
- Edit the following fields in
StartAgentServlet.javato create a new user and password.
public static final String USERNAME = "(specify a username here!)";
public static final String PASSWORD = "(specify a password here!)";
- These values are to ensure that only you can access and control your character.
- The username and password you specify are automatically registered when your code first begins controlling a character on the game map, and they do not have to correspond to an existing email address or account.
-
Press
CTRL-S(Command-Son Mac) in order to save your changes. -
Press
CTRL-P(Command-Pon Mac) and typeSimpleAI.javaand selectSimpleAI.java. -
This class is the main AI class. Changes made to this class are reflected in your AI running on the Liberty Server.
To watch your agent as it interacts with the game world, right-click on the roguecloudclient project in the MICROCLIMATE view and select Open in Browser.
This will open a browser to the root of your application.
Add gameclient/StartAgent to the end of the URL, such that it looks like:
http://localhost:(port)/gameclient/StartAgent, where (port) is the randomly generated local port for the server.
Congratulations, your character is now exploring and interacting with the game world, and earning you points on the leaderboard!
Next, visit the next steps page to learn more about coding an agent for Rogue Cloud.