Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom bot documentation #15

Merged
merged 5 commits into from
Oct 3, 2023
Merged

Custom bot documentation #15

merged 5 commits into from
Oct 3, 2023

Conversation

junaidzaidi
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Sep 22, 2023

Someone is attempting to deploy a commit to a Personal Account owned by @asadm on Vercel.

@asadm first needs to authorize it.

@vercel
Copy link

vercel bot commented Sep 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
playroom-2dparkour ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 27, 2023 10:43pm
playroom-carsonroof ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 27, 2023 10:43pm
playroom-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 27, 2023 10:43pm
playroom-draw ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 27, 2023 10:43pm

pages/bots.mdx Outdated
Comment on lines 1 to 8
# Introduction to Bot Integration in Playroom

Playroom lets you transform the way players interact and experience your multiplayer games. This documentation provides an overview and guide for the Bot Integration feature we've integrated into Playroom. Our vision is to empower game developers with the tools they need to elevate gameplay, making games more dynamic, engaging, and challenging.

With this latest enhancement, you can now seamlessly incorporate bot capabilities into your games. These bots pave the way for richer player interactions and open the door to enhanced gameplay testing. If you're looking to craft a custom bot that aligns perfectly with your game's unique mechanics, we've got you covered.

Now that you're familiar with the potential of bot integration within Playroom, it's time to dive into the specifics.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too much fluff. Reduce all this to 2 sentences at most.

pages/bots.mdx Outdated Show resolved Hide resolved
pages/bots.mdx Outdated
Now that you're familiar with the potential of bot integration within Playroom, it's time to dive into the specifics.

## Custom Bot Overview
In Playroom's SDK, we've provided you with the flexibility to design and implement bots according to their own game mechanics and requirements. This not only allows for personalization but also ensures that the bot integrates seamlessly with the unique dynamics of each game.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reduce fluff, get to value in ~1 sentence here.

pages/bots.mdx Outdated
// Sample Custom Bot Code
constructor() {
super();
this.name = "Sample Bot";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will only set it locally. Instead set it to state: this.setState("health", 100) etc.


// A simple method for the bot to take action based on some game state
decideAction(gameState) {
if (gameState.enemyNearby) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of passing gamestate here, use playroom's "getState" here

pages/bots.mdx Outdated
}
```

### 2. Implement Your Custom Bot Logic
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step is redundant. It's same as 1

pages/bots.mdx Outdated
with the game environment as intended.

```js
if (player.isBot()) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrap all this in onPlayerJoin (the one provided by playroom).

- Addressed comments
- Added image of add bot button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants