曉郁
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Hana Project 介紹 # 簡介 Hana Project 主要目標是讓小說家,或想要做文字冒險遊戲的人比吉里吉里更簡單更容易跨平台的galgame(目前目標是windows + Linux + Mac) Hana 計畫目前有兩個正在執行的內容,分別是: Hana 腳本語言跟 Hana 引擎。 由於腳本語言是單純的設定好,沒有架構之類的需解釋內容,因此在這邊先說明。 # hana腳本語言: 目前只能存在一個main.hana檔案,所有文本都只能在一個檔案裡。 一個服務於hana引擎的腳本,主要目標讓使用者不用寫到太多像程式碼的東西 其實我個人覺得五種有點多了,但這已經是壓到極限了 這五個分別是: * background (背景圖片) * backgroundMusic (背景音樂) * 立繪 * role1 (立繪1):畫面左邊的人 * role2 (立繪2):畫面中間的人 * role3 (立繪3):畫面右邊的人 * sound (音效) * system (系統) 如果系統不算且不須特效的話基本上所有的東西一個叫fileName的東西而已,需要用到腳本的話前面加上"hana.",一般文本的話直接打字上去就好了 下面直接給個例子: ``` 在這個世界上不存在著希望。 為什麼你會這樣想阿? 突然一個聲音從前方傳到我耳邊。 我抬起低著的頭。 hana.background.fileName("頂樓夜景.png") hana.role1.fileName("女主角1.png") hana.backgroundMusic.fileName("背景音樂1.wav") 一名少女出現在我眼前。 ``` ## Hana 引擎架構 整體架構如下圖。 ![](https://i.imgur.com/jkQLDIm.png) 主要分成三大區塊對應內容如下: * Hana Back: 後端(包含DB) * Hana Front: 前端 * Resource: 圖片音樂文字等資源 接下來會依序講解: ### Hana Back Hana 引擎的後端,本身是 spring boot服務,透過rest API 與Hana Front 溝通。 目前 Hana Back 主要處理兩份工作,分別是 Hana 語言解析跟存讀檔。 #### Hana 語言解析 由於Hana腳本語言會有一定數量的指令,當發現該行是指令後會繼續讀取下一行,直到非指令為止。 讀取完之後會將內容轉換成Json傳遞給 Hana Front。 原先想要一個 Json 就代表一個畫面,但最終考量到 restful 應該是無狀態的,不應該因為之前呼叫過哪些行數而改變傳遞內容;如果是每次都從開頭讀取 Hana 腳本語言而組成 Json 的話,在面對大量交換場景的部分可能會導致物件內容的大量重新 new 與拋棄,因此最終決定就忠實傳遞 Hana 腳本的內容就好了。 #### Hana Save System 目前尚未實作完成。 本體是使用內嵌的 H2DB搭配 MyBatis,雖然有部分資料不建議使用H2DB在生產環境中。但實際考量 galgame 本身並不會大量的 CRUD,因此就放心地使用了。 會在 Hana 引擎啟動的時候透過 spring boot 自動去尋找是否有建立 DB 跟 table。如果沒有的話將會自動建立;但目前尚未實作存讀檔,因此會建立DB跟table但不會有資料在裡面。 將來 Hana 引擎完成後會考慮搭配可視化工具讓開發者可以簡單去觀看資料。 ### Hana Front Hana 引擎的前端,透過 Libgdx 框架完成。 原先預計透過 JavaFx 瀏覽器配合 spring boot 用網頁的形式來實作,但後來因為想要讓專案完全都用 Java 因此改用 Libgdx,但因為 Libgdx 可以透過 GWT 轉成網頁遊戲,因此"或許"可以繞回去也說不定。 Hana Front 主要繪有四個畫面,分別是主畫面,對話,存讀檔跟設定頁面。 由於 #### 主畫面 ![](https://i.imgur.com/cJk52yO.png) 主畫面從背景到按鈕都是圖片。 目前會使用的圖片檔名是寫死的,將來會參考 spring boot 的作法: 提供預設值,但也提供設定可以修改。 下面是檔名要求: * 背景: mainMenuCg.png * new game: newGameForMenu.png * Continue: continueItemForMenu.png * config: configForMenu.png #### 主要對話遊戲畫面 ![](https://i.imgur.com/ucZVqlV.png) ![](https://i.imgur.com/7ZB0O6c.png) 使用者面: 像陰影的區塊是一張圖片,目前也是寫死吃特定的圖片檔,使用者可以自行更改。 主畫面上主要會有左、中、右三個位置,分別為 role1 role2 role3 只需要用 hana.role1.fileName("fileName.png") 就可以指定了。 如果要清除該位置的話只要寫 hana.role1.fileName("null") 就可以移除掉。 另外將來會新增: hana.clear 用來同時清除 role1 role2 role3 的圖片。 玩家面: 由於玩家面主要是操作面,因此用列表的方式說明: * Esc: 關閉對話區 * Alt: 快進 * 滑鼠左鍵: 進入下一句話 * 左 ctrl: 快進 下面是示範影片,但當時尚未完成主畫面,所以沒有顯示主畫面。 https://youtu.be/vEkztdlp2UE

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully