Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
benpollarduk authored Jan 16, 2024
1 parent 9490b2b commit 7eb6ea9
Showing 1 changed file with 54 additions and 23 deletions.
77 changes: 54 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,63 @@ A C# library that provides a framework for building text adventures and interact
</div>

## Overview
BP.AdventureFramework is a .NET Standard 2.0 implementation of a framework for building text based adventures. This was originally developed in 2011 but has since had some quality of life updates.
BP.AdventureFramework is a .NET Standard 2.0 implementation of a framework for building text based adventures.

![BP AdventureFrameworkDemo_example](https://github.com/benpollarduk/adventure-framework/assets/129943363/20656e76-4e80-475e-aa73-93976d98c5c9)

BP.AdventureFramework provides simple classes for developing game elements:
* Interface and base class for examinable objects:
* Examination returns a description of the object.
* Descriptions can be conditional, with different results generated from the game state.
* All items can contain custom commands.
* Hierarchical environments:
* Overworld
* Acts as a container of regions.
* Region
* Acts as a container of rooms.
* Room
* The player traverses through the rooms.
* Provides a description of itself.
* Supports up to 6 exits. Each exit can be locked until a condition is met.
* Can contain multiple items.
* NPC's:
* Support provided for conversations with the player.
* Can interact with items.
* Can contain multiple items.
* Items
* Support interaction with the player, rooms, other items and NPC's.
* Items can morph in to other items. For example, using item A on item B may cause item B to morph into item C.
At its core BP.AdventureFramework provides simple classes for developing game elements:

### Environments
Environments are broken down in to three elements - Overworld, Region and Room. An Overworld contains one or more Regions. A Region contains one or more Rooms.
A Room can contain up to six exits (north, south, east, west, up and down).

```
Overworld
├── Region
│ ├── Room
│ ├── Room
│ ├── Room
├── Region
│ ├── Room
│ ├── Room
```

### Exits
Rooms contain exits. Exits can be locked to block progress through the game.

```csharp
// create a test room
var room = new Room("Test Room", "A test room.");

// add an exit to the north
room.AddExit(new Exit(Direction.North));
```

### Items
Items add richness the game. Items support interaction with the player, rooms, other items and NPC's. Items can morph in to other items.
For example, using item A on item B may cause item B to morph into item C.

```csharp
// create a sword
var sword = new Item("Sword", "The heroes sword.");
```

### Playable Character
Each BP.AdventureFramework game has a single playable charcter. This who the player controls.

```csharp
// create a player
var player = new PlayableChracter("Dave", "The hero of the story.");
```

### Non-playable Characters
Non-playable characters (NPC's) can be added to rooms and can help drive the narrative. NPC's can hold conversations, contains items,
and interact with items.

```csharp
// create a player
var npc = new NonPlayableChracter("Gary", "The antagonist of the story.");
```

### Commands

Expand Down

0 comments on commit 7eb6ea9

Please sign in to comment.