All Projects → lettertea → React-Visual-Novel

lettertea / React-Visual-Novel

Licence: MIT license
A visual novel application made with React.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to React-Visual-Novel

Renpy
The Ren'Py Visual Novel Engine
Stars: ✭ 2,734 (+10415.38%)
Mutual labels:  visual, novel
Monogatari
Monogatari is a simple web visual novel engine, created to bring Visual Novels to the web.
Stars: ✭ 357 (+1273.08%)
Mutual labels:  visual, novel
lostX
(RSS 2018) LoST - Visual Place Recognition using Visual Semantics for Opposite Viewpoints across Day and Night
Stars: ✭ 60 (+130.77%)
Mutual labels:  visual
improviz
A live-coded visual performance tool
Stars: ✭ 85 (+226.92%)
Mutual labels:  visual
Translator3000
Automatic translator of games made on Ren'Py engine.
Stars: ✭ 78 (+200%)
Mutual labels:  novel
VB.NET
🌐 In this repository included useful examples of Visual Basic completed on Studio 2017 Enterprise Edition, added diploma work of time since 2013. 👔
Stars: ✭ 35 (+34.62%)
Mutual labels:  visual
VisualBasicObfuscator
Visual Basic Code universal Obfuscator intended to be used during penetration testing assignments.
Stars: ✭ 115 (+342.31%)
Mutual labels:  visual
The-Swallows
Novel-generator and generated novels for NaNoGenMo 2013
Stars: ✭ 32 (+23.08%)
Mutual labels:  novel
chinese-novel
📙 Chinese novel database 最全的中国古典小说数据库。
Stars: ✭ 131 (+403.85%)
Mutual labels:  novel
DataStore
Visual develop tool of creating mocked Json
Stars: ✭ 30 (+15.38%)
Mutual labels:  visual
Cerebrum
Crossmodal Supervised Learning Toolkit using High-Performance Extreme Learning Machines over the audio-visual-textual data
Stars: ✭ 41 (+57.69%)
Mutual labels:  visual
SQLServerTools
This repo is the home of various SQL-Server-Tools
Stars: ✭ 28 (+7.69%)
Mutual labels:  visual
novelsave
This is a tool to download and convert novels from popular sites to e-books.
Stars: ✭ 25 (-3.85%)
Mutual labels:  novel
VisualBTC
Visual bitcoin private key generator - a tool for safe bitcoin private key generation with the physical coin, or create funny "patterns" keys for gifts to your friends.
Stars: ✭ 29 (+11.54%)
Mutual labels:  visual
dify
A fast pixel-by-pixel image comparison tool in Rust
Stars: ✭ 41 (+57.69%)
Mutual labels:  visual
SettingsUI
Windows 11 settings page in WinUI 3 applications ported from Powertoys
Stars: ✭ 95 (+265.38%)
Mutual labels:  visual
fan-ren-xiu-xian-zhuan
凡人修仙传(fanrenxiuxianzhuan)的资源汇总,谨献给“凡友”们。
Stars: ✭ 32 (+23.08%)
Mutual labels:  novel
Visual-Attention-Model
Chainer implementation of Deepmind's Visual Attention Model paper
Stars: ✭ 27 (+3.85%)
Mutual labels:  visual
extensions
Shosetsu - Extensions - Universe
Stars: ✭ 51 (+96.15%)
Mutual labels:  novel
node-red-contrib-FIWARE official
FIWARE-Node-Red integration supporting NGSI-LD
Stars: ✭ 14 (-46.15%)
Mutual labels:  visual

React-Visual-Novel

The application runs on the web browser and renders sounds and images to provide gameplay via React. The user may also see previous texts through the backlog (scrolling up), hide the text box (space), hit next (left click or enter), or skip (hold control).

preview

Live Demo

Installation

  • Clone the Repository
$ git clone https://github.com/nashkenazy/React-Visual-Novel.git
  • Navigate to the root directory in the command line
$ cd React-Visual-Novel
  • Run one of the following commands to install the package.json dependencies: $ yarn or $ npm install

Running the Application

There are a couple of methods to start the application.

  1. Run start-site.bat from the root directory.

Or

  1. Open the command line in the root directory and run $ yarn start or $ npm start.

Usage

story.js Properties

From the root directory, navigate to ./src/story/story.js. There should be an array called story. Each index represents a frame, and its properties are written in an object. All the available properties are listed below. Assume default value is undefined.

Key Value Type Description
bg Function Displays a 1280x720 background image by accepting require('path/to/image').
bgm Function Loops through an audio file by accepting require('path/to/audio').
bgTransition String Uses the value for transition animations for ReactCSSTransitionGroup for bg. Currently has no options.
choicesExist Boolean If true, choices from choices.js will be presented to the user.
jumpTo String Jumps the user to the index where the receiveJump property is if the jumpTo and receiveJump properties are same value. Often used to return to the common route.
jumpToBecauseStore String Jumps the user to the index where the receiveJumpBecauseStore property is if the jumpToBecauseStore and receiveJumpBecauseStore properties are same value. Often used to show scenes from making a particular choice(s).
receiveJump String The receiving point of jumpTo's index jump if they share the same value.
receiveJumpBecauseStore Array The receiving point of jumpToBecauseStore's index jumps under two conditions: 1. the first index of 'receiveJumpBecauseStore' is the same value as jumpToBecauseStore and choices.js's store. 2. The second index of 'receiveJumpBecauseStore' is the same value of the choice's store.
routeBegins String The end point of a jump immediately following making a choice. Must equal to the routeBegins property in choices.js.
soundEffect Function Plays an audio file once by accepting require('path/to/audio').
speaker String Presents the string in a bubble on top of the textbox. Also wraps text in quotes.
sprite Function Displays a sprite in the center of the screen by accepting 'require('path/to/image').
spriteEffect String Uses the value as a class for sprite. Currently has "shake", "bounce", "grow", "shrink-back", "shrink", "grow-back", "grown", and "shrunk".
spriteTransition String Uses the value for transition animations for ReactCSSTransitionGroup for sprite.
spriteLeft Function Displays a sprite in the left of the screen by accepting require('path/to/image').
spriteLeftEffect String Uses the value as a class for spriteLeft.
spriteLeftTransition String Uses the value for transition animations for ReactCSSTransitionGroup for spriteLeft.
spriteRight Function Displays a sprite in the right of the frame by accepting require('path/to/image').
spriteRightEffect String Uses the value as a class for spriteRight.
spriteRightTransition String Uses the value for transition animations for ReactCSSTransitionGroup for spriteRight.
text String Presents string in the textbox on bottom of screen.
voice Function Plays an audio file once by accepting require('path/to/audio').

Effect Properties

Values for spriteEffect, spriteLeftEffect, and spriteRightEffect include the following:

  • "shake"
  • "bounce"
  • "grow"
  • "grown"
  • "shrink-back"
  • "shrink"
  • "shrunk"
  • "grow-back"

Transition Properties

Values for spriteTransition, spriteLeftTransition, and spriteRightTransition include the following:

  • "from-right-leave-left"
  • "from-left-leave-right"
  • "move-right"
  • "move-left"
  • "move-right-far"
  • "move-left-far"

choices.js Properties

From the root directory, navigate to ./src/story/choices.js. There should be an array called choices. Each index contains an object that contains a single property of choices. The choices property (different from the choices array) accepts a value of an array where each element is an object that represents a single choice. All of the properties of that object follows below:

Key Value Type Necessary Description
content String Yes Presents the string as a button that user can choose.
nextIndex Integer No Determines what index will be presented the next time a choice appears to the user.
routeBegins String Yes Jumps to the index where routeBegins is in story.js if both properties (one from choices.js and one from story.js) are the same value.
resetStore String No If a value is detected (doesn't have to be "true"), then choicesStore will be set to a clean object.
store String No The value becomes a property of choiceStore in App.js and increments it by one.

Streamlining the Writing Process

Variables

Creating variables for properties that reuse values tend to be more consistent, accurate and faster.

const b = "Block";
const bn = require("./sprites/block-neutral.png");
// ...
  {
    speaker: b,
    text: "I like turtles.",
    sprite: bn
  },
  // ...

Setting Future Properties

On the bottom of story.js, there are function calls to the function setFutureProperties(). The function takes in a key as an argument and sets all the future undefined properties to the last defined property for the argument. Thus, choosing the correct keys your project is important to speeding up the writing process. It is very much a case-by-case type of decision.

For example, the sample site calls setFutureProperties() for speaker as well as some other properties. It is advantageous to call the function for speaker because the story is set up so that a sprite is talking most of the time. In some visual novels, it would be very awkward if a character talks that long. It would be best to remove the function call for speaker in that case.

Creating Choices

When you want the user to make a choice, set choicesExist: true in novelFrames.js. The app will go through the array of objects in Choices.js and present the current choice. For example, if it is your third time setting choicesExist: true, then the second index in choices will be used.

See the sample site, which aligns with the repository's story.js and choices.js files, for a working application of these concepts.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].