A library for text games.
- Resource loaders
- Menu system
- Curses wrapper
- Crashes don't mess up the screen
- Abstract away curses lib - [ ] Use urwid instead?
- Curses wrapper
ResourceLoader
- Resolves asset names (see below).Resource
- Allows for R/W of assets by asset name (see below).
Asset names follow 2 formats:
- Namespaced:
namespace:path/to/asset.ext
, resolves toassets/namespace/path/to/asset.ext
. - Non-namespaced:
path/to/asset.txt
, resolves toassets/path/to/asset.ext
.
Allows for resolving names to objects. Use txtgamelib.resolver.Resolver.addResolver
to add functions to resolve names.
txtgamelib.resource.ResourceLoader
is an example of a Resolver
.
The txtgamelib.menu.Menu
screen is a Curses GUI handler. Subclass it and change the draw_menu function. Curses tutorial can be found here.