- Visit Download Visual Studio Code and select your operating system.
- After the download completes, run the installer on Windows or install the package on Linux or MacOS.
- After the installation completes, run VS Code. Note: For VS Code, use the Java Extension Pack for tighter integration with the Java platform.
- 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, unlike on Mac and Windows, Docker Compose must be downloaded separately.
- In VS Code, select View from the menu. Then, select Extensions. From Search Extensions in Marketplace, enter
Codewind
. - Select Codewind and click the Install button.
- Restart VS Code if you are prompted.
- A window appears and asks,
"Codewind requires the installation of Docker containers to run, which might take a few minutes to download. Do you want to complete the installation now?"
. Click Install. - A status message appears that says,
Pulling Codewind Docker images
. Wait for this process to complete. After the images are downloaded, aStarting Codewind
message appears followed byCodewind installation is complete
. Click OK. - Select View from the menu. Then, select Explorer. From Explorer, a Codewind view is available. Expand this panel if it is not already expanded.
For more information, see Getting started with Codewind for VS Code.
- 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
- Back in VS Code, from the Codewind view, right-click Projects (Local) and select Add Existing Project. Specify the path of the
rogue-cloud-client-codewind
folder that you cloned and click Add to Codewind. - A
Processing...
status message appears, followed by aPlease confirm the project type
message. Check to see that the following information is correct:- The Type field is
liberty
. - The Language field is
Java
.
- The Type field is
- If one or both of these fields are inaccurate, ensure that the correct path is selected.
- If your project is correctly identified, click Yes.
- Before the code starts building, wait for the container 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 Codewind VS Code Tools.
- In the code editor, press
CTRL-P
on Windows andCommand-P
on Mac. Then, typeStartAgentServlet.java
and selectStartAgentServlet.java
.- Note: Use
CTRL-P
orCommand-P
to quickly find Java classes in VS Code.
- 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-P
on Windows orCommand-P
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 on the Liberty server.
To watch your agent as it interacts with the game world, right-click the gameclient
project in the Codewind view and select Open in Browser to open a browser to the root of your application.
Congratulations! Your character is now exploring and interacting with the game world and earning you points on the leaderboard.