diff --git a/README.md b/README.md index 4c580fa..4d544da 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,19 @@ Notice: Strange way of javascript is being used. ``` # What's new +Demo Site + ``` -Version 0.1 is coming +Version 0.1 is released, with its demo site published + +By the way, the current version is published without preloadimg functions, so you may would like to wait a little while so that are pictures are loaded + +这个版本没有preloading,所以在图片加载完成前你可能需要等待一段时间 ``` -# NovelScript - - - -This is NovelScript. +# Documentation +点此查阅文档 Documentation # Process ## changement of developping plan @@ -22,14 +25,16 @@ The new plan aims to quick iteration of versions in order to suit the process of 游戏的剧本,音乐,绘画工作已经开始,NovelScript将为了配合游戏进度进行重新开发, 新的开发计划基于已有代码,希望在短期内快速迭代版本,以适应游戏开发的需要. -## ongoing + +## checked ### NovelScript 0.1 "hina" -90% Version 0.1 is the base of the whole project, which provides a basic presentation of a powerpoint-like visual novel, with dialogue, portrait, background dessin and simple music playing functions. 进度65% 0.1版本是项目的基础,将实现一个单纯的galgame展示功能 + +## ongoing ### NovelScript 0.2 "hane" 85% diff --git a/doc/README.md b/doc/README.md index 0722813..96e45cc 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,13 +1,26 @@ # Documentation +``` +At least we have something out, functions are coming soon in future versions. +至少我们有个雏形了,其他的功能会稍后出现在后续版本中 +``` + ``` This is a document for NovelScript 0.1 "hina" 这是为NovelScript 0.1 "hina" 版本准备的文档 ``` +## 0. Functions to Expect in Next Versions +* bgm and voice +* save and load +* conflict and condition +* preloader +* interface + ## 1. Get Started 开始使用 ### 1.1 Integrate NovelScript ```html + ``` NovelScript occupies 2 global Javascript variables as ```NovelScript``` and ```ns```, no DOM object is occupied. NovelScript is based on jQuery, please import it at first. @@ -41,18 +54,6 @@ This will start the game and display the slide from script ```script``` and posi 此函数将开始游戏,并展示参数所指向的剧本名和页数,默认值为第一个剧本的第一页 -ns.start returns a ```$.Deferred.promise()``` Object, which means you can manually add to a callback function: - -此函数返回```$.Deferred.promise()```对象,因此可以手动添加回调函数: -```javascript -$.when(ns.start()) - .done(function(){ - ... - }) - .fail(function(){ - ... - }) -``` ## 2. Script Parser 剧本生成器 NovelScript is designed to reduce redundant works, as for script writers, NoveScript Script Parser can generate the JSON data needed from simple formatting script as: @@ -121,4 +122,52 @@ var json = ns.parseScript(data) // data : string, the content of input.txt {"welcome":[{"speaker":null,"dialogue":"梦里不觉秋已深,余情岂是为他人。 "},{"speaker":null,"dialogue":""},{"speaker":"[泽村]","figure":["sawamura_tdr.png","katou_normal.png"],"bg":"ano_ona_no_house.jpg","bgm":"ready.mp3","dialogue":"我和伦也才不是那种关系!"},{"speaker":null,"dialogue":" "},{"speaker":"[霞丘]","figure":["","kasumigaoka_ironic.png","hyoutou_normal.png"],"bgm":"star.mp3","dialogue":"毕竟是冒牌的青梅竹马。"},{"speaker":null,"dialogue":""},{"speaker":null,"figure":["0","0","0"],"dialogue":"我还是继续装睡吧……"},{"speaker":null,"dialogue":""},{"merge":true,"mergeBody":["我在漫无目的的生活里突然有了要做的事情","我遇到了改变了我漫无目的的的生活的人"]},{"speaker":null,"dialogue":""}]} ``` -## 3. Settings (TODO) +## 3. Settings +In current version, the argument ```setting``` provides just 2 settings, theme and path, where there is merely one theme (other themes and costume theme functions are on there way) + +此版本中```setting```只能设置主题和路径,其中主题只有这一种(其他主题和自定义主题功能将在后续版本提供) + +Example: + +例子: +```javascript +{ + theme: "hina", + path: { + figure: "tmp/e/", + cg: "tmp/e/", + bg: "tmp/e/", + bgm: "tmp/e/" + } +} +``` + +## 4. controls + - ```controls.js``` will serve in future versions. + + - ```controls.js``` 将在后续版本中发挥作用。 + +## 5. Customization 自定义功能 +### 5.1 callback 回调函数 +The callback function is replaced by ```$.Deferred()``` + +NovelScript的回调函数功能现在由```$.Deferred()```承担 + +- ```ns.$deferred``` is a ```$.Deferred()``` Object, which means you can manually add to a callback function: + +- ```ns.$deferred```是一个```$.Deferred()```对象,因此可以手动添加回调函数: + +```javascript +$.when(ns.$deferred) + .done(function(){ + ... + }) + .fail(function(){ + ... + }) +``` + +- ```done``` will be triggered once the game script reaches an end. +剧本文件通过游戏浏览完成之后,```done```将被触发 + +## 5. API Reference API文档 (TODO)