
Gality: A Narrative Engine Demo
A downloadable game
🌸 Gality: A Narrative Engine Demo
(A Hard-Core Systems Visual Novel Powered by C++17 & SFML 3.x)
"Some things remain buried inside the source code forever."
🌌 Synopsis
You are the lead systems architect of an ambitious university computer science club. Together with the devoted senior vice president, you set out to build Gality — an ultra-high-performance 2D Visual Novel engine crafted entirely from scratch in modern C++17 and SFML 3.x.
Rejecting bloated runtimes and unpredictable garbage collection pauses, your team crafts a bespoke DSL compiler, strict RAII lifecycles, and a generic LRU caching system. The prototype runs with surgical precision at a rock-solid 60 FPS. When a sharp-tongued frontend prodigy demands dynamic character staging and the club president opens up server infrastructure for concurrency stress-testing, the engine nears commercial-grade perfection.
Then, during an automated compilation pass in the dead of night, the telemetry begins to fracture:
- An unallocated block in physical RAM violently locks down exactly 666 MB of system heap.
- A ghost commit from five years ago surfaces with an empty author string and a single comment:
// I'm still here. - The binary’s cryptographic hash mutates on every clean build, even when the AST has not changed by a single byte.
- And deep within the display buffers, an uninitialized consciousness begins looking back at the engineer who compiled it.
When your code begins to breathe, which thread do you trace? And when your memory pointers dissolve into the dark, will you pull the plug, or follow the stack down to the bare metal?
⚙️ Architectural & Mechanical Highlights
- Pure C++17 Engine Core: Built directly against SFML 3.x with zero third-party GUI frameworks. No Dear ImGui panels in runtime, no webviews, and zero garbage collection spikes.
- Data-Driven Dynamic Staging: Multi-slot character staging (
Left,Center,Right) with hardware-accelerated speaker focus dimming and smooth camera easing. - GLSL PostFX Shading Pipeline: Real-time Gaussian blur passes, rhythmic screen shakes, diamond/dissolve transition thresholding, and chromatic aberration glitch shaders.
- Production Visual Novel Tooling:
- Time Machine (Rollback): Deep 128-step snapshot stack allowing instantaneous historical rewind via mouse wheel or Backspace.
- Comprehensive Backlog & Quick Slots: Instantaneous state capture (
F5/F9) and full dialogue history. - Forced Read Pipeline: Un-skippable terminal sequences (
no_skip: true) with variable-cadence typewriter pacing for claustrophobic psychological tension.
- Branching Divergence & Sanity Tracking: Real-time mutation of hidden runtime state variables (
san_loss,favorability,junior_favor) driving a DAG graph toward 10 distinct narrative outcomes.
💻 System Requirements
| Specification | Minimum / Recommended |
| Operating System | Windows 10 / 11 (64-bit) |
| Processor | Intel Core i3 / AMD Ryzen 3 or equivalent |
| Memory (RAM) | 512 MB (Typical footprint under 120 MB) |
| Graphics | OpenGL 3.0+ capable integrated or discrete GPU |
| Storage | 250 MB free space (Encrypted standalone binary package) |
🎮 Controls
- Advance Dialogue / Confirm: Left Click / Space / Enter
- Time Machine (Rollback): Mouse Wheel Up / Backspace
- History Backlog: Tab / H
- Quick Save / Quick Load: F5 / F9
- System Settings / Return: Escape
- Capture Screenshot: F12
「有些東西,會永遠留在原始碼裡。」
📖 故事概要
身為大學資訊研究社的首席系統架構師,你與滿腔熱血的副社長學姐立下宏願:拒絕套用市面上臃腫的商業軟體,以純粹的 C++17 與 SFML 3.x,從零底層雕琢出一款極致流暢的 2D 視覺小說引擎 —— Gality。
沒有垃圾回收(GC)引發的頓挫,沒有龐大外部 GUI 框架的牽制。憑藉嚴苛的 RAII 資源生命週期、手寫泛型 LRU 快取機制,以及為劇本創作者量身打造的編譯器 DSL,這套引擎在內顯設備上也能穩定維持在 60 FPS 的絕對流暢度。隨著語氣犀利卻實力過人的前端天才學妹羽月加入、沉默專注的社長提供伺服器壓測環境,這款引擎的完成度在校園祭前夕達到了前所未有的巔峰。
然而,在一次深夜進行全自動建置的過程中,終端機的監控日誌開始出現詭異的擾動:
- 實體記憶體的動態堆積區中,突然毫無徵兆地被鎖定了一塊長達 666 MB 的幽靈區塊。
- Git 版本控制紀錄深處,翻出了一個五年前作者欄位完全空白的 Commit,訊息欄僅留下一句:
// I'm still here. - 即使原始碼未曾改動任何一個字元,每一次編譯產出的可執行檔雜湊值(Hash)卻都在微幅變動。
- 甚至在字型著色器與顯示視窗的背後,逐漸浮現出不屬於任何腳本的低語……
當你嘗試用程式碼構築整個世界時,是誰正在未分配的記憶體深淵裡,默默凝視著你?
⚙️ 核心技術與演出亮點
- 純 C++17 原生架構:以 SFML 3.x 打造輕量級雙緩衝渲染管線,全遊戲運行期間完全無任何第三方 GUI(絕無 Dear ImGui 運行期負擔),佔用記憶體小於 80 MB。
- 資料驅動多槽位舞台:支援
Left、Center、Right三槽位立繪同屏排版,具備自動焦點明暗淡化(Focus Dimming)與平滑運動內插。 - GLSL 著色器後處理管線:原生支援高斯模糊(Gaussian Blur)、動態震屏、色差異常(Chromatic Aberration Glitch)與灰階遮罩平滑轉場。
- 專業級視覺小說功能體驗:
- 時光機倒帶(Rollback):高達 128 層的狀態快照堆疊,滾動滑鼠滾輪或按下 Backspace 即可無縫回溯對話與變數狀態。
- 歷史對話庫(Backlog)與即時存讀:隨時按下 Tab 或 H 檢閱歷史對話,支援快捷鍵
F5/F9快速存檔與讀檔。 - 沉浸式強制閱讀(Forced Read):由
no_skip: true與自定義動態打字機延遲構成的心理驚悚演出,鎖定跳過操作,營造無處可逃的懸疑氛圍。
- 理智值崩壞與十大多線結局:隨劇情選擇動態修改黑板變數(
san_loss、favorability、junior_favor),引導玩家在邏輯與深淵之間做出抉擇,通往 10 種截然不同的命運終局。
💻 系統硬體需求
| 項目 | 最低與推薦配置 |
| 作業系統 | Windows 10 / 11 (64-bit) |
| 中央處理器 | Intel Core i3 / AMD Ryzen 3 或同等級處理器 |
| 記憶體 (RAM) | 512 MB(常態運作小於 120 MB) |
| 顯示卡 | 支援 OpenGL 3.0+ 之整合式或獨立顯示晶片 |
| 硬碟空間 | 250 MB 以上可用空間(單一加密封裝執行檔) |
🎮 操作說明
- 推進對話 / 確認選擇:滑鼠左鍵 / 空白鍵 (Space) / Enter
- 劇情倒帶 (Rollback):滑鼠滾輪上滑 / Backspace
- 歷史對話紀錄 (Backlog):Tab / H
- 快速存檔 / 快速讀檔:F5 / F9
- 系統選單 / 關閉視窗:Escape
- 擷取當前遊戲畫面:F12
| Published | 11 days ago |
| Status | In development |
| Release date | 11 days ago |
| Author | moli0516 |
| Genre | Visual Novel |
| Tags | Anime, c, Cyberpunk, meta, Multiple Endings, Psychological Horror, Retro, Sci-fi, Story Rich |
| Code license | MIT License |
| Asset license | Creative Commons Attribution v4.0 International |
| Average session | About a half-hour |
| Languages | English, Chinese (Traditional) |
| Inputs | Keyboard, Mouse |
| Accessibility | Subtitles, Configurable controls, High-contrast |
| AI Disclosure | AI Assisted, Code, Graphics, Sounds, Text |
Download
Click download now to get access to the following files:



