Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions docs/orleans/tutorials-and-samples/adventure.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Adventure game sample project
description: Explore the Adventure sample project written with .NET Orleans.
ms.date: 02/04/2022
ms.date: 12/05/2022
---

# Adventure game sample project
Expand All @@ -10,20 +10,23 @@ This sample is a simple multiplayer text adventure game inspired by old-fashione

## Instructions

1. Open [_OrleansAdventure.sln_](https://github.com/dotnet/samples/tree/main/orleans/Adventure) in Visual Studio.
2. Start the 'AdventureSetup' project.
3. Once AdventureSetup is running, start the 'AdventureClient' project.
4. You will then be prompted to enter your name on the command line. Enter it and begin the game.
1. Navigate to the [Orleans Text Adventure Game](/samples/dotnet/samples/orleans-text-adventure-game) in the samples browser experience.
1. Select **Browse code** to view the source code.
1. Clone the source code and build the solution.
1. Start the _AdventureServer_ first, then the _AdventureClient_.
1. You will then be prompted to enter your name on the command line. Enter it and begin the game.

For more information, see [Building the sample](/samples/dotnet/samples/orleans-text-adventure-game#building-the-sample).

## Overview

The AdventureSetup program reads a game description ("map") from AdventureConfig.txt.
The _AdventureServer_ program starts by reading an _AdventureMap.json_ file.

It sets up a series of "rooms" such as a forest, beach, caves, a clearing, and so on. These locations are connected to other rooms to model the places and layout of the game. The sample configuration describes only a handful of locations.

Rooms can contain "things" such as keys, swords, and so on.

The AdventureClient program sets up your player and provides a simple text-based user interface to allow you to play the game.
The _AdventureClient_ program sets up your player and provides a simple text-based user interface to allow you to play the game.

You can move around rooms and interact with things using a simple command language, saying things such as "go north" or "take brass key".

Expand All @@ -33,7 +36,7 @@ Orleans allows the game to be described via very simple C# code while allowing i

## How is it modeled?

Player and Rooms are modeled as grains. These grains allow us to distribute the game with each grain modeling state and functionality.
Player and Rooms are modeled as grains. These grains allow you to distribute the game with each grain modeling state and functionality.

Things such as keys are modeled as plain old objects—they are just simple immutable data structures that move around rooms and among players; they don't need to be grains.

Expand Down