Play Rogue Cloud using Microclimate Eclipse Tools
A) Install Eclipse
- If you already have Eclipse installed, skip to the next section. Microclimate Developer Tools for Eclipse requires either Eclipse Photon, Eclipse 2018-09, or newer.
- Visit the Eclipse download page.
- Locate the
Eclipse IDE for Enterprise Java Developerssection, select your operating system, then click
- Wait for the file to download, then extract it to the directory of your choice.
- Start Eclipse, specify a workspace directory (the default is fine), and wait for Eclipse to load.
B) Installing Microclimate Developer Tools into Eclipse
- Requires: Eclipse Photon.0, Eclipse 2018-09, 2018-12, 2019-03, or newer.
- From within Eclipse, select
Help(menu item) >
Microclimatein the search bar, then click
- You should now see
Microclimate Developer Toolsin the search listings. Click the
Installbutton next to these tools.
- Read and accept the licenses, then click
- After the install completes, you will be prompted to restart Eclipse, click Restart.
See the Microclimate documentation for more information on Installing Microclimate Developer Tools.
C) Install and start Microclimate (if not completed)
Visit the Installing Microclimate page to install and start Microclimate. Return to this page when done.
D) Clone the Rogue Cloud Client Git Repo from the Microclimate browser UI
- 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, select
Git, then copy and paste the following repository location:
Next, then click the
- 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 Eclipse window.
E) Create a dev connection to Microclimate from Eclipse
You should now have both Eclipse and Microclimate installed. Next we need to configure the Eclipse Microclimate Developer Tools to connect to the Microclimate service.
Ensure that Microclimate is up and running before proceeding with these steps.
- In Eclipse, select
File(menu item) >
Other. This will bring up the
- Under the
New Microclimate Connection, then click
Test connectionto confirm that Eclipse can connect to your local Microclimate instance, then
Microclimate Explorerview should appear at the bottom of the screen, and should show the
roguecloudclientapplication running inside Microclimate.
- Right-click on
- The Git repository on which the project is based will be imported into Eclipse.
roguecloudclientsource will be imported into Eclipse as a Maven project.
See the Microclimate documentation for more information on connecting to Microclimate instance from Eclipse.
F) Register a user and then make changes to the SimpleAI class
- In the code editor, press
Command-Shift-Ron Mac) and type
StartAgentServlet.java, and select
CTRL-SHIFT-R/Command-Shift-Ris a great way to quickly find Java classes in Eclipse.
- 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.
Command-Son Mac) in order to save your changes.
Command-Shift-Ron Mac) and type
This class is the main AI class. Changes made to this class are reflected in your AI running on the Liberty Server.
G) Next steps: watch your agent go, and start coding
To watch your agent as it interacts with the game world, right-click on the
roguecloudclient project in the
Microclimate Explorer view and select
This will open a browser to the root of your application.
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!