- Visit the Eclipse download page. Codewind requires Eclipse 2019-03 or later.
- Locate the Eclipse IDE for Enterprise Java Developers section, select your operating system, and click Download.
- Wait for the file to download. Then, extract it to the directory of your choice.
- Start Eclipse and specify a workspace directory. You can use the default. Wait for Eclipse to load.
- On Mac: Install Docker Desktop for Mac and Git. On this platform, Docker Compose is bundled with Docker Desktop.
- On Windows: Install Docker Desktop for Windows and Git. On this platform, Docker Compose is bundled with Docker Desktop.
- On Linux: Install Docker, Docker Compose, and Git. On this platform, you need to download Docker Compose separately.
- From within Eclipse, select Help from the menu and then Eclipse Marketplace.
- Type
Codewind
in the search bar. Then, click Go. Codewind appears in the search listings. - Click Install.
- Read and accept the licenses. Then, click Finish.
- After the installation completes, you are prompted to restart Eclipse. Click Restart.
For more information about installing Codewind into Eclipse, see Getting started with Codewind for Eclipse.
- Open the Codewind view. Navigate to Window in the menu followed by Show View>Other... and Codewind>Codewind Explorer.
- Codewind requires the installation of more Docker images to run. Double-click the Codewind item in the Codewind Explorer view to complete the installation. The installation might take a few minutes to complete.
You are now ready to use the tools. You can use the Codewind Explorer view to create new projects or add existing ones. Right-click an element in the Codewind Explorer to look at the features available.
- Choose a folder in which you want to clone the Rogue Cloud client repository. Do not create projects in the
~/codewind-data/
orC:\codewind-data
directories.
cd <folder where you want to clone the Rogue Cloud client>
git clone https://github.com/codewind-resources/rogue-cloud-client-codewind
- Import the project into Eclipse. Select File from the menu and Import.... Then, in the dialog, select General and Existing Projects into Workspace. Click Next >.
- Select Select root directory and click Browse.... Select (codewind workspace path from above)/rogue-cloud-client-codewind. Then, click Select Folder and Finish. Wait for the project to build.
- Right-click Codewind in the Codewind Explorer view. Then, click Local Projects>Add Existing Project.... The gameclient appears in the checkbox list.
- Select gameclient if it is not already selected. Then, click Next >.
- Select MicroProfile / Java EE if it is not already selected. Then, click Finish.
- Before the code starts to build, the container needs to initialize and download the Java and Maven dependencies for the underlying build system. This process can take between five to ten minutes depending on the CPU and network connection. This initialization is required only before the first time you use MicroProfile with the Codewind tools.
- In the code editor, press
CTRL-SHIFT-R
on Windows andCommand-Shift-R
on Mac. Then, typeStartAgentServlet.java
and selectStartAgentServlet.java
.- Note: Use
CTRL-SHIFT-R
orCommand-Shift-R
to quickly find Java classes in Eclipse.
- Note: Use
- Edit the following fields in
StartAgentServlet.java
to 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 ensure that only you can access and control your character.
- The user name 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
on Windows orCommand-S
on Mac to save your changes. - Press
CTRL-SHIFT-R
on Windows orCommand-Shift-R
on Mac. TypeSimpleAI.java
and selectSimpleAI.java
. - This class is the main AI class. Changes made to this class are reflected in your AI running in the MicroProfile Liberty container.
To watch your agent as it interacts with the game world, right-click the gameclient
project in the Codewind Explorer view and select Open Application to open a browser to the root of your application.
Note: If you are on Windows, copy and paste the URL into an external browser, such as Chrome, Firefox, or Edge, because the internal browser in Eclipse uses IE11, which is an unsupported browser.
Congratulations! Your character is now exploring and interacting with the game world and earning you points on the leaderboard.