Secret Orb
___ _ ___ _
/ __| ___ __ _ _ ___| |_ / _ \ _ _ | |__
\__ \/ -_)/ _| '_/ -_) _| | (_) | '_|| '_ \
|___/\___|\__|_| \___|\__| \___/|_| |_.__/
A Text Adventure for the Ages
A retro text-based adventure game designed to fit on a single 720KB floppy disk. Written in Free Pascal for maximum portability across DOS, Windows, and Unix-like systems.
๐ฎ About
Secret Orb is a modular, lightweight text adventure game that brings back the classic feel of early computer gaming. Explore mysterious rooms, collect objects, interact with characters, and uncover secretsโall through a simple text interface.
Features
- ๐ฏ Compact Design: Entire game fits on a 720KB floppy disk
- ๐ฅ๏ธ Cross-Platform: Runs on DOS (16-bit and 32-bit), Windows, Linux, and other Unix systems
- ๐๏ธ Modular Architecture: Clean separation between game engine and world data
- โ๏ธ World Editor: Included TUI-based editor for creating your own adventures
- ๐ Dual Format Support: Binary format for space efficiency, text format for easy editing
- ๐งญ 6-Direction Movement: Navigate in all directions including up and down
- ๐จ Retro Aesthetics: 80x25 character display with classic CRT colors
Project Goals
- Target retro hardware (x86 compatible, 720KB floppy capacity)
- Maximize portability through Free Pascal
- Keep codebase simple and educational
- Enable easy world creation through text-based data files
๐ฆ Download & Installation
Pre-built Binaries
Download the latest release from GitHub Actions artifacts:
- Linux:
secretorb-linux-x64.tar.gz - Windows:
secretorb-win32.zip - DOS:
secretorb-dos32.zip(requires CWSDPMI.EXE for DPMI support)
Linux/Unix
# Extract archive
tar -xzf secretorb-linux-x64.tar.gz
cd secretorb-linux
# Run the game
./secretorb
# Or run the editor
./editor
Windows
REM Extract secretorb-win32.zip to a folder
REM Run the game
secretorb.exe
REM Or run the editor
editor.exe
DOS
C:\> SECORB.EXE
Note: DOS 32-bit version requires CWSDPMI.EXE (freely available DPMI host)
๐ฒ How to Play
Starting the Game
Run secretorb (or secretorb.exe) to start. The game will load world.dat by default, or you can specify a different world file:
./secretorb myworld.dat
Commands
Secret Orb uses a simple text parser. Type commands at the prompt:
Movement
northorn- Move northsouthors- Move southeastore- Move eastwestorw- Move westuporu- Go up (stairs, ladders, etc.)downord- Go down (descend, climb down, etc.)
Interaction
look- Examine your surroundingsexamine <object>orlook at <object>- Inspect an object or charactertake <object>- Pick up an objectdrop <object>- Drop an object from inventoryuse <object>- Use an objectopen <object>- Open somethingread <object>- Read text on an objecttalk <character>- Speak with a character
Inventory & Help
inventoryori- Check your inventoryhelp- Show help screenquitorq- Exit the game
Example Session
> look
You stand in a grand entrance hall. Stone walls rise high around you,
covered in faded tapestries depicting ancient battles. A cold draft
blows from the north.
Exits: North
You see: Rusty Key
> take key
You pick up the Rusty Key.
> north
You move north.
> examine scroll
A yellowed parchment scroll covered in faded runes and mystical symbols.
> read scroll
The scroll reads: "Seek the orb in the darkest room, where shadows
dance and secrets loom."
๐ ๏ธ Development
Building from Source
Prerequisites
- Free Pascal Compiler (FPC) 3.2.0 or later
- Make (optional, for Makefile builds)
Build Commands
# Clone the repository
git clone https://github.com/yourusername/secret-orb.git
cd secret-orb/pascal
# Build for your platform
make native
# Or use the build script
./build.sh native
# Build the converter tool
make converter
# Cross-compile for other platforms
make dos32 # DOS 32-bit DPMI
make win32 # Windows 32-bit
# Check size constraints (720KB floppy)
make sizecheck
# Clean build artifacts
make clean
Compiler Flags
The build uses these optimization flags:
-O2- Optimization level 2-XX- Smart linking (dead code elimination)-CX- Create smartlinkable units-Xs- Strip symbols from executable
Project Structure
pascal/
โโโ secretorb.pas # Game launcher (main entry point)
โโโ editor.pas # World editor (main entry point)
โโโ src/
โ โโโ gamedata.pas # Core data structures (rooms, objects, mobs)
โ โโโ datafile.pas # World file I/O (text and binary formats)
โ โโโ display.pas # Terminal display abstraction
โ โโโ gamecore.pas # Game engine & command processing
โโโ tools/
โ โโโ converter.pas # Text-to-binary format converter
โโโ data/
โ โโโ world.dat # Default game world
โโโ bin/ # Compiled executables (created by build)
Creating Custom Worlds
Using the Editor
Run the world editor to create or modify game worlds:
./editor
The editor provides a menu-driven interface to:
- Add/edit/delete rooms with descriptions and exits
- Create objects with properties (pickup, use, open, read)
- Add NPCs (mobs) with dialogue
- Save worlds to
.datfiles
Manual Editing
World files support two formats:
- Binary Format (default): Compact, space-efficient format saved automatically by the editor
- Text Format: Human-readable INI-style format for manual editing
You can edit text format files directly and convert them to binary using the converter tool:
./converter world.txt world.dat
Text Format Example:
[WORLD]
TITLE=My Adventure
START=1
[ROOM:1]
NAME=Starting Room
DESC=You are in a small room.
NORTH=2
SOUTH=0
EAST=0
WEST=0
UP=3
DOWN=0
[OBJECT:1]
NAME=Magic Sword
DESC=A gleaming sword with mystical runes.
ROOM=1
CARRIEDBY=0
FLAGS=pickup,use
USETEXT=The sword glows brightly!
[MOB:1]
NAME=Mysterious Wizard
DESC=An old wizard with a long grey beard.
ROOM=2
DIALOGUE=Greetings, traveler! Seek ye the Secret Orb?
See CLAUDE.md for detailed format specification.
Contributing
Contributions are welcome! The codebase is intentionally simple and educational.
Guidelines:
- Keep the 720KB size constraint in mind
- Follow the existing Pascal coding style
- Test on multiple platforms when possible
- Update documentation for new features
๐ฏ Technical Details
Size Constraints
The entire game (executables + data) must fit on a 720KB floppy disk (737,280 bytes). This constraint drives many design decisions:
- Aggressive compiler optimizations
- Efficient data structures
- Text-based data format
- No embedded assets or multimedia
Limits
- Maximum 256 rooms
- Maximum 128 objects
- Maximum 64 mobs (NPCs)
- Maximum 8 inventory slots
- 40 character room names
- 255 character descriptions
Platform Compatibility
Tested on:
- Linux x64 (Ubuntu 22.04+)
- Windows 10/11 (32-bit executable)
- DOS (32-bit DPMI via go32v2)
Should work on:
- Any x86 system with FPC support
- FreeBSD, OpenBSD
- DOS with DPMI host (CWSDPMI, DOS4GW, etc.)
- Windows XP through Windows 11
๐ License
[Add your license here - MIT, GPL, etc.]
๐ค Acknowledgments
Built with Free Pascal - a mature, stable, and portable Pascal compiler.
Inspired by classic text adventures from the golden age of computing.
๐ Links
Seek the Secret Orb. Adventure awaits.