go-hikarin

module
v0.0.0-...-dcacb1f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2026 License: MIT

README ΒΆ

Visual Novel Script Library (Go)

A Go library for parsing and executing Hikarin Framework visual novel scripts.
Inspired by the VisualNovelEngine.java from the open‑source MinecraftHikarinMod, this project translates the same ideas into idiomatic Go.

The JSON script format is exported from the Iteranya/hikarin-framework, a platform‑agnostic scripting system for visual novels.


✨ Features

  • Parse Hikarin JSON scripts into Go structs (ScriptEntry)
  • Iterate through script entries one by one
  • Handle dialogue, sprite management, labels, and game actions
  • Flexible API: load from file path, raw bytes, or any io.Reader
  • Designed as a reusable library for embedding into Go game engines (e.g. Ebitengine)

πŸ“¦ Installation

go get github.com/aclaputra/go-hikarin

πŸ“‚ Folder Structure

visualnovel/
β”œβ”€β”€ go.mod
β”œβ”€β”€ vnlib/
β”‚   β”œβ”€β”€ model.go        # ScriptEntry struct
β”‚   β”œβ”€β”€ extract.go      # ExtractFromBytes, ExtractFromFile, ExtractFromReader
β”‚   └── parser.go       # Helpers for handling entries
β”œβ”€β”€ scripts/
β”‚   └── status_quo_script.json   # Example script
└── examples/
    └── main.go         # Demo program

πŸ§‘β€πŸ’» Usage

Example Script

[
  { "type": "dialogue", "action": "say", "label": "Conductor", "content": "Evening again, miss.", "id": 3 },
  { "type": "remove_sprite", "action": "remove_character", "sprite": "conductor", "id": 4 }
]

See more on examples and scripts folder

πŸ“– Inspirations

MinecraftHikarinMod (github.com) – original Java implementation of a VN engine.

Hikarin Framework – JSON scripting format exported and consumed by this library.

βš–οΈ License

This library is open source under the MIT License. It builds upon ideas from the Hikarin Framework and MinecraftHikarinMod, both of which are open source projects.

πŸš€ Roadmap

[ ] Add support for branching choices

[ ] Integrate with Ebitengine rendering

[ ] Provide unit tests for script parsing

[ ] Expand documentation with advanced examples

Directories ΒΆ

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL