-
Notifications
You must be signed in to change notification settings - Fork 11
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
Conversation
Someone is attempting to deploy a commit to a Personal Account owned by @asadm on Vercel. @asadm first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
pages/bots.mdx
Outdated
# 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. | ||
|
There was a problem hiding this comment.
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
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. |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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()) { |
There was a problem hiding this comment.
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
No description provided.