Getting Started
Quick Start Guide
This guide will help you get started with CASYS RPG, from installation to creating your first game.
Prerequisites
Requirements
- Python 3.10 or higher
- Node.js 18 or higher
- Git
Installation
Basic Configuration
Configuration File
First Steps
-
Create a New Game
-
Configure Your Game Edit
config.yml
with your game settings -
Start Development Server
Next Steps
- Learn about the Core Concepts
- Explore Advanced Features
- Check our Technical Documentation
Common Issues
Troubleshooting
- Check Python version compatibility
- Verify Node.js installation
- Ensure all dependencies are installed
Development Tips
- Use VSCode with our extension
- Enable debug logging
- Join our Discord community
Examples
from casys_rpg.agents import StoryGraphAgent, RulesAgent, NarratorAgent
from casys_rpg.managers import AgentManager, StateManager
# Initialize managers
state_mgr = StateManager()
agent_mgr = AgentManager(state_mgr)
# Initialize agents
story = StoryGraphAgent()
rules = RulesAgent()
narrator = NarratorAgent()
# Register agents
agent_mgr.register_agent(story)
agent_mgr.register_agent(rules)
agent_mgr.register_agent(narrator)
# Start game processing
agent_mgr.start()
from fastapi import FastAPI, WebSocket
from casys_rpg.api.routes.ws import GameWSConnectionManager
app = FastAPI()
ws_manager = GameWSConnectionManager()
@app.websocket("/ws/game")
async def game_websocket(websocket: WebSocket):
await ws_manager.connect(websocket)
try:
while True:
data = await websocket.receive_json()
# Process game actions
response = await process_game_action(data)
await websocket.send_json(response)
except Exception as e:
ws_manager.disconnect(websocket)