Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
088499a
Add linters and apply rules
Hyuchia Jul 8, 2017
872d805
Merge branch 'master' into lint
Hyuchia Jul 16, 2017
beb4f16
Fix line endings mismatch
Hyuchia Jul 16, 2017
230c9a4
Improve variable validation
Hyuchia Jul 16, 2017
2b7e782
Add type animation to dialogs
Hyuchia Jul 16, 2017
5baded4
Add typed library
Hyuchia Jul 24, 2017
5cdc12a
Fix slot null validation
Hyuchia Jul 24, 2017
572eb41
Add protocol warning
Hyuchia Jul 24, 2017
146681c
Backport Oregano changes from Aegis Framework
Hyuchia Aug 2, 2017
3565dea
Remove replaced library
Hyuchia Aug 2, 2017
f3f2a89
Add auto play, text speed settings and graceful option objects fallback
Hyuchia Aug 5, 2017
d5e536e
Add Animatelo implementations, wait statement and missing translation
Hyuchia Aug 30, 2017
4785895
Use minified version of animate.css
Hyuchia Aug 30, 2017
162b3ec
Allow infinite loop in scene animations
Hyuchia Aug 30, 2017
a794215
Keep CSS animations instead of JavaScript based ones.
Hyuchia Sep 27, 2017
6aa4191
Corrected french strings
BakaKiller Oct 8, 2017
afec41c
Merge pull request #34 from BakaKiller/master
Hyuchia Oct 10, 2017
ba852d3
Change variable declarations to let and const
Hyuchia Nov 8, 2017
429601f
Update Aegis dependencies
Hyuchia Dec 6, 2017
a05bbde
Add dynamic character naming and considerations for native platforms
Hyuchia Dec 6, 2017
cfce727
Improve CSS structure to allow easier size changes
Hyuchia Dec 12, 2017
22ba48e
Add title property and fix macOS fullscreen defaults
Hyuchia Dec 14, 2017
2fc33f9
Add cordova detection and polyfills for older platforms
Hyuchia Dec 14, 2017
cb97532
Install gulp plugins and add lint task
jiunwei Dec 18, 2017
15c3234
Merge pull request #38 from jiunwei/add-lint-tasks
Hyuchia Dec 18, 2017
9c2a69c
Fix voice path on assets preloading
Hyuchia Dec 24, 2017
08d3d43
commit
ign1ght Dec 24, 2017
d31b4e9
Merge pull request #40 from ign1ght/master
Hyuchia Dec 25, 2017
98264cd
Corrected the links to Documentations and Demo
ahmadmanga Dec 29, 2017
aeca018
Remove extra trailing slash
Hyuchia Dec 29, 2017
c32372f
Merge pull request #41 from ahmadmanga/patch-1
Hyuchia Dec 29, 2017
406143d
Update fonts, fix issue on htaccess and sw files and add typed.js map
Hyuchia Dec 31, 2017
8133df7
Merge branch 'master' of https://github.com/Monogatari/Monogatari
Hyuchia Dec 31, 2017
9a9a65f
Add initial support for custom save slot naming
Hyuchia Dec 31, 2017
0c22b2b
Remove enforced character height on mobile devices
Hyuchia Jan 7, 2018
3d6617b
Add engine options support for new dialog typing animation
Hyuchia Jan 7, 2018
2d283b4
Add more save and load actions, change some elements to Kayros grid.
Hyuchia Jan 9, 2018
8c0ebe0
Improve mobile sizes
Hyuchia Jan 9, 2018
055e91a
Add dynamic quick menu
Hyuchia Jan 10, 2018
60fd627
Add packaging tasks
Hyuchia Jan 10, 2018
f0b871c
Improve font size stylings
Hyuchia Jan 11, 2018
9968760
Improve save and load functions and style
Hyuchia Jan 11, 2018
a3c7067
Adapt library to fit Monogatari use case
Hyuchia Jan 11, 2018
cda3ee5
Improve mobile-first approach
Hyuchia Jan 13, 2018
7d2b267
Improve auto play feature
Hyuchia Jan 27, 2018
86ee7aa
Move storage to it's own file
Hyuchia Jan 28, 2018
f83cf39
Remove storage object
Hyuchia Jan 28, 2018
2e33069
Disallow asset related directories
Hyuchia Feb 21, 2018
eec07a2
Continue after wait
Hyuchia Feb 21, 2018
3acf3a8
Set scrolling to auto and keep button style on hover
Hyuchia Feb 21, 2018
792625c
Update to follow same behaviour as other animations
Hyuchia Feb 21, 2018
4e80bb9
Prevent overwrite of engine settings when loading
Hyuchia Feb 21, 2018
3cf11ad
Fix wrong selector for adding/removing a class
Hyuchia Feb 21, 2018
90d4129
Add simple template with useful selectors
Hyuchia Feb 21, 2018
6c16076
Update dependencies
Hyuchia Feb 22, 2018
1cc769d
Prevent saving state of invisible images
Hyuchia Feb 22, 2018
d01ec91
Add missing French translations (thanks to BakaKiller!)
Hyuchia Feb 22, 2018
9d62145
Small changes on syntax
Hyuchia Feb 23, 2018
108d21b
Fix slot ordering
Hyuchia Feb 23, 2018
d627548
Style fixes
Hyuchia Feb 23, 2018
2a406b0
Allow more flexibility on choice uses and fix particles issues
Hyuchia Feb 23, 2018
e866341
Fix background animations
Hyuchia Feb 24, 2018
03fe956
Improve back function
Hyuchia Feb 24, 2018
56c40e4
Change structure of previous function
Hyuchia Feb 24, 2018
f567272
Improve Particles persistence
Hyuchia Feb 24, 2018
52408a8
Add type animation to centered character
Hyuchia Feb 24, 2018
4c6e3ea
Update Auto Save slots on new save
Hyuchia Feb 24, 2018
0e24992
Fix behaviour of centered character
Hyuchia Feb 24, 2018
49cbe40
Fix behaviour of false branch in a conditional
Hyuchia Feb 24, 2018
ce792cc
Add more elements to the sample theme.
Hyuchia Feb 24, 2018
00eff46
Prevent main menu from showing while preloading
Hyuchia Feb 24, 2018
ce87828
Fix regression on background staying the same after game end
Hyuchia Feb 24, 2018
a225651
Add placeholder translations
Hyuchia Feb 25, 2018
09e4f54
Add missing files and information
Hyuchia Feb 25, 2018
664f3f3
Add missing comma
Hyuchia Feb 25, 2018
9fbce89
Simplify engine step changes
Hyuchia Feb 25, 2018
1da24c7
Prevent step back on load
Hyuchia Feb 25, 2018
0cd067a
Remove state of sound and particles when backing
Hyuchia Feb 26, 2018
6bed35a
Improve styles
Hyuchia Feb 26, 2018
b59daab
Clear particles on stop
Hyuchia Feb 26, 2018
a2005af
Prevent loading from modifyng step state.
Hyuchia Feb 26, 2018
e937ed5
Add better sorting for slots
Hyuchia Feb 26, 2018
a09cb23
Filter array for ordering slots
Hyuchia Feb 26, 2018
01faec1
Split slots generation
Hyuchia Feb 26, 2018
54b4a90
Improve particles removal to prevent high memory usage
Hyuchia Feb 26, 2018
052eecb
Prevent state change on some special events
Hyuchia Feb 26, 2018
ef45332
Small improvements
Hyuchia Feb 27, 2018
4dadf29
Center slot deletion input
Hyuchia Feb 27, 2018
96592c9
Update docs
Hyuchia Feb 27, 2018
d434b9a
Add link to demo
Hyuchia Feb 27, 2018
40566b6
Add separate storage file
Hyuchia Feb 27, 2018
1466edb
Update date on input when save menu is shown
Hyuchia Mar 1, 2018
8bf1442
Fix auto play behaviour issues with multilanguage games
Hyuchia Mar 4, 2018
ce5ee37
Fix other multilanguage issues
Hyuchia Mar 4, 2018
73f7a83
Bump version
Hyuchia Mar 4, 2018
2510979
When resetGame is called, engine.Label is no longer hard-coded to 'St…
Jantho1990 Mar 15, 2018
6be0877
fixed the fix so it now works when multiple labels are used
Jantho1990 Mar 15, 2018
42cafa7
Merge pull request #46 from Jantho1990/bugfix/reset-label-should-matc…
Hyuchia Mar 30, 2018
2c985c1
Fix side image sizing
Hyuchia Mar 30, 2018
9232dbd
Merge remote-tracking branch 'origin/master'
Hyuchia Mar 30, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ insert_final_newline = false
trim_trailing_whitespace = true
charset = utf-8
indent_size = 4
indent_style = tab
indent_style = tab
90 changes: 90 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"rules": {
"dot-notation": [
2
],
"indent": [
2,
"tab",
{
"SwitchCase": 1,
"ObjectExpression": "first"
}
],
"quotes": [
2,
"double"
],
"linebreak-style": [
2,
"unix"
],
"no-console": [
2,
{
"allow": ["warn", "error"]
}
],
"no-eq-null":[
2
],
"no-eval":[
2
],
"no-implied-eval":[
2
],
"no-redeclare": [
2,
{
"builtinGlobals": true
}
],
"one-var": [
2,
"never"
],
"prefer-const":[
2
],
"semi": [
2,
"always"
],
"keyword-spacing":[
2,
{
"before": true,
"after": true,
"overrides": {
"if": {
"before": false
},
"for": {
"before": false
},
"while": {
"before": false
}
}
}
],
"space-before-blocks":[
2,
"always"
],
"space-before-function-paren": [
2,
"always"
],
"strict":[
2,
"global"
]
},
"env": {
"es6": true,
"browser": true
},
"extends": "eslint:recommended"
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.thumbs
.Thumbs
.buildconfig
package-lock.json
/node_modules
/cache
/src
Expand Down
3 changes: 0 additions & 3 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ Deny from env=block_bad_bots
php_value session.cookie_httponly true
</IfModule>

# Prevent Iframe
Header set X-Frame-Options DENY

# Disable server signature
ServerSignature Off

Expand Down
18 changes: 18 additions & 0 deletions .htmlhintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"tagname-lowercase": true,
"attr-lowercase": true,
"attr-value-double-quotes": true,
"doctype-first": true,
"tag-pair": true,
"spec-char-escape": true,
"id-unique": true,
"src-not-empty": true,
"attr-no-duplication": true,
"tag-pair": true,
"tag-self-close": false,
"title-require": true,
"doctype-html5": true,
"inline-style-disabled": true,
"space-tab-mixed-disabled": "tab",
"alt-require": true
}
25 changes: 25 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"rules": {
"block-closing-brace-empty-line-before": "never",
"block-closing-brace-newline-after": "always",
"declaration-block-semicolon-newline-after": "always",
"block-opening-brace-space-before": "always",
"color-hex-case": "lower",
"color-named": "never",
"color-no-invalid-hex": true,
"function-comma-newline-after": "never-multi-line",
"function-comma-space-after": "always",
"no-duplicate-selectors": true,
"no-eol-whitespace": true,
"indentation": "tab",
"number-leading-zero": "always",
"property-no-unknown": [ true, {
"ignoreProperties": [
"composes"
]
}],
"selector-list-comma-newline-after": "always",
"unit-case": "lower",
"unit-whitelist": ["em", "rem", "s", "vmax", "vmin", "vh", "vw", "%", "px"]
}
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 - 2017 Diego Islas Ocampo
Copyright (c) 2015 - 2018 Diego Islas Ocampo

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
59 changes: 52 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,67 @@
# Monogatari
Built to bring Visual Novels to the modern web and take them to the next level, making it easy for anyone to create and distribute Visual Novels in a simple way so that anyone can enjoy them on pretty much anywhere, create games with features that no one has ever imagined... it is time for Visual Novels to Evolve.

Website: https://monogatari.io/

Demo: https://monogatari.io/demo/

## Features
- Responsive out of the box
- Plays nice with electron for Desktop apps and phonegap for mobile apps
- Plays nice with Electron for Desktop apps and Cordova for mobile apps
- Simple Syntax
- Progressive Web App Features allowing offline game play
- Allows you to use any kind of media supported by browsers
- Compatible with all major browsers
- Includes libraries for animations and particle effects
- Allows saving/loading games
- Extensible, you just can't imagine how much!

Website: https://monogatari.io/
## What do I need to get Started?
The first thing about Monogatari that you should probably know is that with it, your visual novel is a web page first and a game later. That means that Monogatari has been created specifically for the web, putting things like responsiveness (the fact that your game will adapt to any screen or device size) first. You don't necessarily need to think of your game this way as well, but you'll certainly take the most out of Monogatari if you do.

### Set up your environment

To develop in Monogatari you would need the same as to develop a webpage, you just need a text editor capable of editing HTML, Javascript and CSS, which means that pretty much any text editor should work, even Windows NotePad but to make it easier, you probably want one with code syntax highlighting.

Some recommended (and free) ones include:

* [Atom](https://atom.io/)
* [Brackets](http://brackets.io/)
* [Visual Studio Code](https://code.visualstudio.com)

Take a look at them and pick the one you like the most and feel comfortable with, this will be your main tool from now on.

Now, you can always open a website by just clicking the file (index.html) and opening it with your browser, however there are small aspects of Monogatari that work better when served through a web server. You don't need anything fancy for this, in fact there's a perfectly fine web server you can [download from the Chrome Store](https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb)

As previously mentioned, the use of a web server is completely optional, you can just open your game with the browser as a file and it will run just fine, the web server will allow you to test features such as the Service Workers, needed for Monogatari's offline support and asset preloading.

### Workflow

Ok so now you have the environment set up, you have some idea on what the files you got are for so how can you start developing your game?

1. Try the game first, open the index.html file inside the directory you just unzipped and play the sample game through.
2. Once you've played it once, open the directory (the one you unzipped) with the editor you chose to start making changes.
3. Open the script.js file with your editor, find the variable called ˋscriptˋ, as you'll see, all the dialogs you just saw are just a simple list in there. More information can be found in [the documentation](https://monogatari.io/documentation/script/text/).
4. Change one of the dialogs, save the file and reload the game (just like you reload a website).
5. Play it again and you'll see the dialog changed just like you made it.
6. Now try adding more dialog to it and you'll quickly get how things are done.
7. Once you've gotten yourself used to adding dialogs, [add a scene](https://monogatari.io/documentation/script/scenes/) as a challenge, that means you'll have to add your image file to the ˋimg/scenes/ directoryˋ, more instructions are on the link.

If you manage to do all that, congratulations! You just made your first game and are probably more familiarized with the workflow you'll be using, just make changes, save, reload, try and repeat!

## Documentation
You can see the documentation in https://monogatari.io/documentation/
You can take a look at the documentation in https://monogatari.io/documentation/

You can also contribute to the documentation in the [Website repository](https://github.com/Hyuchia/MonogatariWebsite)
You can also contribute to it in the [Documentation repository](https://github.com/Monogatari/Documentation)

## Contributing

If you have contributed to this project, or in the webpage, please make sure you are listed in the contributors list of the website, you can add yourself in the [contributors file](https://github.com/Hyuchia/MonogatariWebsite/blob/master/templates/contributors.html) of the website
## Get in Touch
If you have any doubt, problem or just want some help please contact me, I'll be glad to help in any way I can. Even though Monogatari is simple enough and you can find many resources online, I know it can be hard to get started and sometimes the documentation is not clear enough, so really, contact me anytime!

You can join the [Discord Server](https://discord.gg/gWSeDTz), send me an email, DM me at [Twitter](https://twitter.com/Hyuchia), and [Mastodon](https://mastodon.social/@HyuchiaDiego) as well.

## Contributing
Contributions are always welcome! If you have contributed to this project, or in the website, please make sure you are listed in the contributors list of the website, you can add yourself in the [contributors file](https://github.com/Monogatari/Website/blob/master/templates/contributors.html) of the website

## License
Monogatari is a Free Open Source Software project released under the [MIT License](https://raw.githubusercontent.com/Hyuchia/Monogatari/master/LICENSE).
Monogatari is a Free Open Source Software project released under the [MIT License](https://raw.githubusercontent.com/Monogatari/Monogatari/master/LICENSE).
46 changes: 30 additions & 16 deletions electron.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
const {app, BrowserWindow} = require('electron');
const path = require('path');
const url = require('url');
/**
* =======================================
* Monogatari Electron Configuration
* =======================================
**/

// Keep a global reference of the window object, if you don't, the window will
"use strict";

/* global require */
/* global process */
/* global __dirname */

const {app, BrowserWindow} = require("electron");
const path = require("path");
const url = require("url");

// Keep a global reference of the window object, if you don"t, the window will
// be closed automatically when the JavaScript object is garbage collected.
let win;

function createWindow() {
function createWindow () {
// Create the browser window.
win = new BrowserWindow({

// Title that will be shown in the window (Your game's title)
title: "",

// Set the minimal window size
minWidth: 640,
minHeight: 360,
Expand All @@ -29,23 +44,22 @@ function createWindow() {

// Full Screen options
fullscrenable: true,
fullscreen: false,

// Set an icon for the window
icon: __dirname + '/img/icons/icon_128x128.png'
icon: __dirname + "/img/icons/icon_128x128.png"
});

// and load the index.html of the app.
win.loadURL(url.format(
{
pathname: path.join(__dirname, 'index.html'),
protocol: 'file:',
pathname: path.join(__dirname, "index.html"),
protocol: "file:",
slashes: true
}
));

// Emitted when the window is closed.
win.on('closed', () => {
win.on("closed", () => {
// Dereference the window object, usually you would store windows
// in an array if your app supports multi windows, this is the time
// when you should delete the corresponding element.
Expand All @@ -56,24 +70,24 @@ function createWindow() {
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow);
app.on("ready", createWindow);

// Quit when all windows are closed.
app.on('window-all-closed', () => {
app.on("window-all-closed", () => {
// On OS X it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') {
if (process.platform !== "darwin") {
app.quit();
}
});

app.on('activate', () => {
// On OS X it's common to re-create a window in the app when the
app.on("activate", () => {
// On OS X it"s common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (win === null) {
createWindow();
}
});

// In this file you can include the rest of your app's specific main process
// In this file you can include the rest of your app"s specific main process
// code. You can also put them in separate files and require them here.
Loading