Skip to content

Commit

Permalink
Merge pull request #67 from Regression-Games/aaron/reg-1734
Browse files Browse the repository at this point in the history
MVP Docs
  • Loading branch information
vontell authored May 8, 2024
2 parents 762bf49 + 743691f commit 35289ea
Show file tree
Hide file tree
Showing 28 changed files with 255 additions and 129 deletions.
5 changes: 3 additions & 2 deletions docs/authenticating-with-api-keys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ when connecting external systems to Regression Games.

An API key can be generated from your [account](https://play.regression.gg/account) page. At
the bottom of the screen within the **API Keys** section, enter a unique name for your key, and then
click **Generate New Key**. This token should be copied and stored somewhere safe - you won't be
click **Generate Key**. This token should be copied and stored somewhere safe - you won't be
able to see it again after it is generated. Keys have a default expiration date of 1 year.

![Generate API Key](img/generate-api-key.png)
![List of API Keys](img/api-keys.png)
![A generated API key](img/copy-api-key.png)

:::danger

Expand Down
13 changes: 0 additions & 13 deletions docs/creating-bots/csharp/scenario-testing.mdx

This file was deleted.

Binary file added docs/img/api-keys.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/copy-api-key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/img/generate-api-key.png
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/partials/_add-overlay-partial.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ of the overlay can be hidden through the Regression Games settings pane under **
:::


![Screenshot of the search pane for the RGOverlayCanvas.](./img/overlay_4.png)
![Screenshot of the search pane for the RGOverlayCanvas.](./img/add-overlay-to-scene.gif)
Binary file added docs/partials/img/add-overlay-to-scene.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
170 changes: 109 additions & 61 deletions docs/tutorials/building-your-first-bot.mdx

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/validations/img/many-runs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/validations/img/run-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/validations/img/run-scenario.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/validations/img/scenario-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/validations/img/share.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions docs/validations/validations-getting-started.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
sidebar_label: 'Getting Started with Validations'
---

# Validations

![Screenshot of a scenario](./img/scenario-example.png)

**Validations** are used to assert states within you game. You can create the scenarios you want to verify using our Scenario Builder,
and can run collections of scenarios in Unity.

## Validation Suites

**Validation Suites** are a collection of scenarios that you want to run together. You can create a Suite starting with a name and description. At the core of a Suite is its Base Gameplay Recording. This recording is a gameplay session recording used to create the scenarios that will be run, and the inputs used during the recording will be used when running the scenarios.

### Sharing Suites

Validation Suites can be shared with other Regression Games users, in a read-only mode. If a Suite is shared with you, you can view the Suite and its scenarios, but you cannot edit the Suite or its scenarios.

![Screenshot of a scenario](./img/share.png)

## Scenario Builder

**Scenarios** are composed of steps that can be asserted throughout a gameplay recording. You can wait for specfic mouse or keyboard events, check for specific game objects, or even check for specific values in the game state. The available options when creating Scenarios are drawn from the Base Gameplay Recording associated with a Suite.

Along with Scenario steps, you can also view the state, and view a screenshot, at each tick during the recording. This can help you understand the state of the game at each point in time, and can also help create the scenarios you want to run.

Check out the [full Scenario Builder reference](./validations-scenario-builder-reference) for more details

## Running Validations

You can either run **all** of the Scenarios within a Suite, or an individual Scenario. To run a Suite, click the "Run Suite" button, and select a Gameplay Session to test against. When the Suite is finished running, you can view the results of each Scenario within the Suite on the Test Runs page.

To run an individual Scenario, click the "Run Scenario" button within the Scenario's menu. The Scenario's results will be shown in a dialog.

![Screenshot of a scenario](./img/run-scenario.png)

## Viewing Results

To access the results of your Suite or Scenario, navigate to the Test Runs page. Here you can see the results of each Scenario within a Suite. You can also view the results of a Scenario's steps, and the state of the game at each tick during the Scenario.

![Screenshot of a scenario](./img/run-details.png)
38 changes: 38 additions & 0 deletions docs/validations/validations-scenario-builder-reference.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
sidebar_label: 'Scenario Builder Reference'
---

# Scenario Builder Reference

Scenarios are composed of one or more steps that can be asserted throughout a gameplay recording. Steps are asserted in the order they appear in the Scenario, and if any step fails, the Scenario will fail.

Additionally, each scenario is also executed in the order that they are present within the Validation Suite. However,
if a particular scenario fails, the following scenarios will still be executed. Each scenario always starts at the
tick that the last scenario left off at.

## Step Types

### Wait for Scene

Wait for a specific scene to be loaded to be loaded or unloaded.

### Wait for Key

Wait for one or more keys to be pressed or released.

### Wait for Mouse

Wait for a mouse button to be pressed or released.

### Wait for Existence

Wait for a specified number of game objects, of a specific type, to exist or not exist.

### Wait for State

Wait for a specified number of game objects, of a specific type, to have state values that match a comparison. This comparison can either be a manually input value, or a stored value from a previous step.

### Store Value

Store a game object's state value to be used in later steps. Note that the value and entity must be present when this
step is executed, so be sure to place this step after a step that asserts the existence of the entity.
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const config = {
type: 'docSidebar',
sidebarId: 'automatedTesting',
position: 'left',
label: 'Automated UI Testing',
label: 'Experimental Packages',
},
{
type: 'doc',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"start": "docusaurus start --port 3001",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
Expand Down
91 changes: 51 additions & 40 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,60 +12,71 @@

/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {

unitySidebar: [
'overview',
'quickstart',
{
type: 'category',
label: 'Tutorials',
items: [
'tutorials/building-your-first-bot',
'tutorials/github-actions'
],
},
// DISABLED For MVP Launch.
// "overview",
// "quickstart",
"tutorials/building-your-first-bot",
// DISABLED For MVP Launch.
// {
// type: "category",
// label: "Tutorials",
// items: [
// "tutorials/building-your-first-bot",
// "tutorials/github-actions"
// ],
// },
// {
// // horizontal divider
// type: "html",
// value:
// '<span style="border-top: 1px solid var(--ifm-color-light-gray); display: block;" />',
// defaultStyle: true,
// className: "horizontal-divider",
// },
// DISABLED For MVP Launch.
// "pre-made-bots",
// {
// type: "category",
// label: "Session Insights",
// items: [
// "session-insights/client-dashboard",
// "session-insights/in-editor-replay"
// ]
// }
{
// horizontal divider
type: 'html',
value: '<span style="border-top: 1px solid var(--ifm-color-light-gray); display: block;" />',
defaultStyle: true,
className: 'horizontal-divider'
},
'authenticating-with-api-keys',
{
type: 'category',
label: 'Creating Bots',
type: "category",
label: "Gameplay Sessions",
items: [
'creating-bots/csharp/agent-builder',
'creating-bots/csharp/adaptive-bots',
'creating-bots/csharp/scenario-testing'
"gameplay-sessions/gameplay-sessions-getting-started",
"gameplay-sessions/gameplay-sessions-usage",
"gameplay-sessions/gameplay-sessions-reference"
]
},
'pre-made-bots',
{
type: 'category',
label: 'Session Insights',
type: "category",
label: "Validations",
items: [
'session-insights/client-dashboard',
'session-insights/in-editor-replay'
]
"validations/validations-getting-started",
"validations/validations-scenario-builder-reference",
],
},
"authenticating-with-api-keys",
{
type: 'category',
label: 'Gameplay Sessions',
type: "category",
label: "Custom Bots",
items: [
'gameplay-sessions/gameplay-sessions-getting-started',
'gameplay-sessions/gameplay-sessions-usage',
'gameplay-sessions/gameplay-sessions-reference'
// DISABLED For MVP Launch.
// "creating-bots/csharp/agent-builder",
"creating-bots/csharp/adaptive-bots",
]
}
],

automatedTesting: [
'automated-testing/overview',
'automated-testing/getting-started',
'automated-testing/gpt-assistant-bot',
'automated-testing/creating-custom-components',
"automated-testing/overview",
"automated-testing/getting-started",
"automated-testing/gpt-assistant-bot",
"automated-testing/creating-custom-components",
],
};

Expand Down
10 changes: 5 additions & 5 deletions src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const FeatureList: FeatureItem[] = [
image: require('@site/static/img/ai_1.png').default,
description: (
<>
Regression Games is building the best platform for AI agent development with replay features,
Regression Games is building the best platform for game test automation with replay features,
validation libraries, CI/CD integration, and more.
</>
),
Expand All @@ -24,8 +24,8 @@ const FeatureList: FeatureItem[] = [
image: require('@site/static/img/ai (3).png').default,
description: (
<>
Whether you are building an MMORPG or a simple 2D platformer, the Regression Games SDK
follows a simple integration pattern to get you up and running quickly.
Ease of integration is one of our top priorities, and it shows. As soon as you add the SDK, data and deep
state info is collected, without custom code needed.
</>
),
},
Expand All @@ -34,8 +34,8 @@ const FeatureList: FeatureItem[] = [
image: require('@site/static/img/ai (2).png').default,
description: (
<>
Bots on Regression Games can click through menus, control spawned characters, play test with humans,
validate behaviors, and more.
Regression Games interfaces are built for a variety of teams, even those who may not have code access. Our
intuitive functional testing builder allows anyone to make tests.
</>
),
},
Expand Down
9 changes: 4 additions & 5 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const HomepageHeader = () => (
<div className="container" style={{textAlign: "left"}}>
<div className="row">
<div className="col margin-vert--lg margin-right--md">
<h1 className="hero__title">Improve quality and reduce costs with AI agents</h1>
<p className="hero__subtitle">Regression Games helps game developers go from zero to one with AI agent development</p>
<h1 className="hero__title">Make better games through automated testing</h1>
<p className="hero__subtitle">Regression Games helps game developers go from zero to one with automated game testing</p>
<div className={styles.buttons} style={{justifyContent: "left"}}>
<Link
className="button button--primary button--outline button--lg"
Expand All @@ -28,15 +28,14 @@ const HomepageHeader = () => (
<div style={{marginTop: "16px"}}>
Get started immediately by adding the package to Unity:
<div style={{marginTop: "16px", fontSize: 12}}>
<pre style={{display: "inline"}}>https://github.com/Regression-Games/RGUnityBots.git?path=src/gg.regression.unity.bots#v0.0.18</pre>
<pre style={{display: "inline"}}>https://github.com/Regression-Games/RGUnityBots.git?path=src/gg.regression.unity.bots#v0.0.19</pre>
</div>
</div>
</div>
<div className="col">
<img src={require('@site/static/img/demo.gif').default} alt="Regression Games" style={{borderRadius: "12px"}}/>
<div style={{color: "gray", paddingRight: "24px", fontStyle: "italic"}}>
Demo of bots validating abilities in <a href="https://unity.com/demos/small-scale-coop-sample" target="_blank">Boss Room</a> (created by Unity),
the timeline feature, and the automated Agent Builder.</div>
Demo of our recording and validation features. Automatically extract game state and begin writing functional tests in minutes.</div>
</div>
</div>
</div>
Expand Down
Binary file modified static/img/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 35289ea

Please sign in to comment.