• Stars
    star
    135
  • Rank 267,761 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created about 8 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A minimal library for writing text adventure games in Python 3

adventurelib

Build Documentation Status

adventurelib provides basic functionality for writing text-based adventure games, with the aim of making it easy enough for young teenagers to do.

The foundation of adventurelib is the ability to define functions that are called in response to commands. For example, you could write a function to be called when the user types commands like "take hat":

@when('take THING')
def take(thing):
    print(f'You take the {thing}.')
    inventory.append(thing)

It also includes the foundations needed to write games involving rooms, items, characters and more... but users will have to implement these features for themselves as they explore Python programming concepts.

Installing

adventurelib.py is a single file that can be copied into your project. You can also install it with pip:

pip install adventurelib

Documentation

Comprehensive documentation is on Read The Docs.

More Repositories

1

pgzero

A zero-boilerplate games programming framework for Python 3, based on Pygame.
Python
490
star
2

chopsticks

Chopsticks is an orchestration library: it lets you execute Python code on remote hosts over SSH.
Python
159
star
3

wasabi2d

Cutting-edge 2D game framework for Python
Python
144
star
4

flake8-html

Generate HTML reports of flake8 violations
Python
52
star
5

pyfxr

Sound effects generation for Python, in fast Cython code, compatible with Pygame and Pyglet.
Python
16
star
6

puppy

A prototype IDE for education; the precursor to mu https://github.com/mu-editor/mu
Python
11
star
7

goblit

Award-winning adventure game from PyWeek 19
Python
9
star
8

gamemaths

Slides for my remote.python.pizza 2020 talk
Python
7
star
9

lepton

Lepton: A high-performance, pluggable particle engine and API for Python
C
7
star
10

wasabi-geom

A 2D geometry library for Python, with ergonomic vector classes in optimised Cython code.
Cython
6
star
11

axium

Space shooter being built for PyWeek 32
Python
6
star
12

dark-world

A Pyweek 25 entry, for the theme "Two Worlds"
JavaScript
4
star
13

weddinglights

Fadecandy based lighting
Python
4
star
14

lightvolume

2D light volume rendering in OpenGL
Python
3
star
15

edubundle

Portable python bundle for Windows
Python
3
star
16

what-the-frog

What The Frog? - a PyWeek 27 entry
Python
3
star
17

lzf

CFFI-based Python binding for LZF stream compression
Python
3
star
18

python-now

Interactive Python tutorial, in the browser
JavaScript
3
star
19

wasabi-scenegraph

Python
2
star
20

fake-news

A fake news generator
Python
2
star
21

infinisweeper

Infinite game of minesweeper
Python
2
star
22

empty

Empty files in various languages
2
star
23

wvec

A Python vector implementation in Rust
Rust
2
star
24

doodlr

Python
1
star
25

korovic

Python
1
star
26

murder

A murder mystery game for Pyweek 23
Python
1
star
27

heightfield

Python
1
star
28

difflib-talk

Python
1
star
29

snowgame

Snow fall game
Python
1
star
30

wasabi-peace

Python
1
star
31

battleships

Python
1
star
32

pep666

The anti-linter for Python code
Python
1
star
33

wor

Python
1
star
34

dojos10e01

Instagram-like filters with numpy and Pillow
Jupyter Notebook
1
star
35

bamboo-warrior

Python
1
star
36

jumpatron

A one-button jumping game made for the Rock Band drum kit
Python
1
star
37

moonbaseapollo

Python
1
star
38

tetrish

Something like tetris
1
star
39

art-attack

Python
1
star
40

python-loglab

Python
1
star
41

nucleon

Python
1
star
42

ldnpydojos7e10

Wikipedia bot
Python
1
star
43

gardenkingdom

Exploring Ren'Py
Ren'Py
1
star