A) Clone the Rogue Cloud Client repository into your codewind-workspace directory
Codewind creates a folder called codewind-workspace
within your home directory to contain your projects. In this step we will locate that folder, and then git clone
the rogue-cloud-client-codewind repository in that folder. You can also download the ZIP file.
- Determine the location of the codewind-workspace directory:
- Mac/Linux:
docker inspect codewind-pfe | grep "HOST_WORKSPACE_DIRECTORY="
- Example:
"HOST_WORKSPACE_DIRECTORY=/home/user/codewind/codewind-workspace"
means your workspace can be found in/home/user/codewind/codewind-workspace
- Example:
- Windows (Command Prompt):
docker inspect codewind-pfe | find "HOST_WORKSPACE_DIRECTORY="
- Example:
"HOST_WORKSPACE_DIRECTORY=C:\\codewind-workspace"
means your workspace can be found inC:\codewind-workspace
- Example:
- Mac/Linux:
- From within the
codewind-workspace
directory, clone the Rogue Cloud Client repository:
cd <path-to-your-codewind-workspace>
git clone https://github.com/sujeilyfonseca/rogue-cloud-client-codewind.git
- Back in VS Code, under the Codewind view, right-click on Projects (Local) and select Add Existing Project
- Specify the path of the
rogue-cloud-client-codewind
folder that you cloned from the previous step, then click Add to Codewind - You will see a brief
Processing...
status message, followed by aPlease confirm the project type
message- The Type field should be:
liberty
- The Language field should be:
Java
- If one or both of these are inaccurate, jump back to step 3 and ensure the correct path is selected
- The Type field should be:
- Presuming your project is correctly identified, click Yes
- 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 between 5 to 10 minutes depending on CPU and network connection (this initialization is only required the first time you use the Codewind tools).
- In the code editor, press
CTRL-P
(Windows) orCommand-P
(Mac), typeStartAgentServlet.java
, and selectStartAgentServlet.java
CTRL-P/Command-P
is a great way to quickly find Java classes in VS Code
- 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 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
(Windows) orCommand-S
(Mac) to save your changes
To watch your agent as it interacts with the game world, right-click on the rogue-cloud-client-codewind
project in the Codewind view and select Open App.
Congratulations, your character is now exploring, interacting with the game world, and earning you points on the leaderboard!
If you obtain a credential (i.e., username/password) error, verify that you have provided a username and password in the StartAgentServlet class. Correct the problem, and then Stop
and Start
the server again.