Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/retroindiejosh/cif
A primitive interactive fiction interface
https://github.com/retroindiejosh/cif
curses game interactive-fiction text
Last synced: 8 days ago
JSON representation
A primitive interactive fiction interface
- Host: GitHub
- URL: https://github.com/retroindiejosh/cif
- Owner: RetroIndieJosh
- License: gpl-3.0
- Created: 2021-07-09T20:02:06.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-27T15:14:06.000Z (over 3 years ago)
- Last Synced: 2024-12-05T00:09:11.196Z (2 months ago)
- Topics: curses, game, interactive-fiction, text
- Language: C
- Homepage:
- Size: 91.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# C Interactive Fiction (CIF)
A simple interactive fiction system in C.
## Building
Run `make`. Test with `cif -t`.
## Structure
**Item** is the base type including name, description, and ID. The Item ID identifies everything in a game.
A **Room** is an Item that can be connected in eight directions (E, N, S, W, NE, NW, SE, SW - not yet implemented) to other Rooms and contain multiple Items (including Rooms, but this is not handled in any sane way currently).
A **Person** (not yet implemneted) is an Item with a location, which is a Room ID.
The **Player** (not yet implemented) is a special Person controlled by (surprise) the player. This is essentially the game interface.
Every Person can execute **Commmands** which take up to two arguments. The player executes these commands in the game prompt, while a Person can be programmed to intelligently use these commands.
The **Parser** is very basic and simply splits input tokens by spaces. Since Commands can only handle up to two arguments, any text after the third token is ignored.
## File Format
Currently, all Items must be hard-coded into the engine. In the future, there will be a script format for creating custom games.