This document provides a high-level introduction to READCOM.Core.Delphi, an interactive story-telling engine built with Delphi and FireMonkey. It covers the system's purpose, architectural concepts, major components, and their relationships.
For detailed information on specific subsystems:
READCOM.Core.Delphi is a reusable interactive story-telling engine that enables creation of hierarchical, multimedia narratives with user interaction, puzzle mechanics, and non-linear navigation. The system supports image, audio, and text content types organized in a tree structure where each node can be a navigation point, collectable item, or interactive element.
The engine is delivered as:
Sources: README.md1-21 Source/boss.json1-19 boss.json1-19
| Feature | Description |
|---|---|
| Cross-Platform | Single codebase targeting 8 platforms: Windows (32/64-bit), Android (ARM32/ARM64), iOS (device/simulator), macOS (Intel/Apple Silicon) |
| Interface-Based Design | Polymorphic content through IStory, IStoryItem, IImageStoryItem, IAudioStoryItem, ITextStoryItem interfaces |
| Factory Pattern | Extensible type system via IStoryItemFactory and IStoryItemFactoryRegistry for runtime instantiation |
| Dual Serialization | Text-based (.readcom) and binary (.readcombin) formats with automatic detection |
| Hierarchical Navigation | Tree-structured stories with path-based lookup syntax (/, ~, ., .., ID, #, @) |
| Puzzle Mechanics | Tag matching system (AreTagsMatched) for conditional progression and locked story points |
| Mode Support | EditMode, InteractiveStoryMode, GuidedInteractiveStoryMode, AnimatedStoryMode via TStoryMode enumeration |
Sources: boss.json1-19 Source/boss.json1-19
READCOM.Core follows a layered architecture with clear separation of concerns:
Architectural Layers:
IStory, IStoryItem and specializations) define polymorphic behaviorIStoryItemFactoryRegistry) enables runtime type instantiation without hard-coded dependenciesTStory/TEditableStory encapsulate navigation, tag matching, and state transitionsTFrame-based components (TStoryItem hierarchy) implement visual renderingREADCOM.App.Main handles initialization, command-line parsing (-thumb, -html), and form creationSources: boss.json1-19 Source/boss.json1-19
Dependency Management:
All dependencies are managed through Boss Package Manager with three-tier configuration:
Demo/boss.json - Demo application dependenciesCurrent version: 19.0
Sources: boss.json1-19 Source/boss.json1-19
READCOM.Core is consumed by three production applications:
| Application | Repository | Purpose |
|---|---|---|
| Reading Communities App | READCOM_App | Interactive multimedia stories for literacy and reading comprehension |
| iLearnTsakonika | iLearnTsakonika_App | Language learning application for Tsakonian Greek dialect |
| Adventure in Tsakonia | AdventureInTsakonia_App | Interactive adventure game set in Tsakonia region |
Each application integrates READCOM.Core through the interface layer (IStory, IStoryItem) and can provide custom story item types via factory registration.
Sources: README.md12-16
| Platform | Architecture | Target | Package Output | Status |
|---|---|---|---|---|
| Windows | Win32 | Desktop | .bpl, .exe | Full support + design-time |
| Windows | Win64 | Desktop | .bpl, .exe | Full support + design-time |
| Android | ARM v7a (32-bit) | Mobile | .apk + system JARs | Production ready |
| Android | ARM64 v8a (64-bit) | Mobile | .apk + system JARs | Production ready |
| iOS | ARM64 | Device | .ipa | Production ready (requires code signing) |
| iOS | ARM64 | Simulator | .app | Development only |
| macOS | Intel x64 | Desktop | .app bundle | Production ready |
| macOS | Apple Silicon (ARM64) | Desktop | .app bundle | Production ready |
Platform-Specific Notes:
dclREADCOM.Core) is Windows-onlyTTakePhotoFromCameraActionCheckSafeMode(): Skia, Metal (iOS/macOS), Vulkan (Android){$IFDEF ANDROID}, {$IFDEF IOS}, {$IFDEF NOSTYLE} directivesFor details on multi-platform development, see Multi-Platform Build System and Multi-Platform Development.
Sources: boss.json1-19 Source/boss.json1-19
| Interface | Purpose | Key Members |
|---|---|---|
IStoreable | Base persistence | Load(), Save() |
IStoryItem | Story element contract | 30+ properties: ID, Parent, StoryPoint, Home, Collectable, Tags, UrlAction, FactoryCapacity, Content: TBytes |
IImageStoryItem | Image content | Image: TBitmap, SVGText: String, Looping: Boolean |
IAudioStoryItem | Audio playback | Audio: IMediaPlayer, Play, AutoPlaying, Looping |
ITextStoryItem | Text display | Text: String, Font: TFont, Editable, HorzAlign |
IStory | Story container | ActiveStoryItem, HomeStoryItem, RootStoryItem, StoryMode |
| Class | Base | Interface | File Location |
|---|---|---|---|
TStoryItem | TFrame | IStoryItem | Source/READCOM.View.StoryItems.pas |
TImageStoryItem | TStoryItem | IImageStoryItem | Source/READCOM.View.StoryItems.Image.pas |
TAudioStoryItem | TStoryItem | IAudioStoryItem | Source/READCOM.View.StoryItems.Audio.pas |
TTextStoryItem | TStoryItem | ITextStoryItem | Source/READCOM.View.StoryItems.Text.pas |
TStory | TComponent | IStory | Source/READCOM.Model.Story.pas |
TEditableStory | TStory | IStory | Source/READCOM.Model.Story.Editable.pas |
For detailed interface documentation, see Core Data Models.
Sources: boss.json1-19
StoryPoint propertyGetStoryItem() supports / (root), ~ (home), . (current), .. (parent), ID-based, # (index), @ (name) syntaxAreTagsMatched() implements puzzle mechanics where moveable items must match anchored item tagsUrlAction property with TagsMatching modes (!, ?, ??, ???) for conditional navigationSee Story Navigation System for details.
ZoomFrame (scalable display) and StructureView (hierarchy browser)TFrame component with Border, Background, and Glyph (TMediaDisplay)ActionList (20+ actions) for file operations, navigation, editing, and view controlsSee User Interface Components for details.
IStoryItem for creating copies based on FactoryCapacity propertySee Factory Pattern and Cloning for details.
TSVGIconImageList with 54 SVG graphicsREADCOM.App.MessagesSee Resource Management for details.
Sources: boss.json1-19
READCOM.Core supports dual serialization formats with automatic detection:
| Format | Extension | Description | Detection Method |
|---|---|---|---|
| Text-based | .readcom | Human-readable Delphi object notation starting with object keyword | Stream inspection: first 6 bytes = "object" |
| Binary | .readcombin | Compact binary format | Default if not text format |
Both formats support:
Content: TBytes propertyDefineProperties()Content loading pipeline: LoadFromStream() → format detection → LoadReadCom() (text) or LoadReadComBin() (binary) → Loaded event → specialized content handlers.
See Content Serialization and Persistence for details.
Sources: boss.json1-19
Sources: README.md1-21 boss.json1-19 Source/boss.json1-19
Refresh this wiki