yhdgms1 / novely Goto Github PK
View Code? Open in Web Editor NEWEngine that will let you create interactive stories with ease
Home Page: https://novely.deno.dev
License: ISC License
Engine that will let you create interactive stories with ease
Home Page: https://novely.deno.dev
License: ISC License
At the moment there are very few actions, there should be an order of magnitude more.
Some of actions can be taken from Monogatari - a pretty good visual novel engine.
Some can be implemented by a more universal method. For example, ShowParticles
.
At the moment, the @novely/t9n
module is used for translation. It does not require the initial translation values.
@novely/core
Sometimes using ValidAction[]
breaks the indexation, but I cannot reproduce it now (last time was 2 weeks ago)
engine.script({
start: [action.jump('somewhere')]
})
Infinite Loop happens. Maybe because of check for restoring.
At the moment, the saves are implemented in such a way that there are many of them. It's needed to add the singleSaves
option, thanks to which you can have only one save for the entire game.
At the moment, only a small part of the interface can be configured, especially since it is implemented only in @novely/solid-renderer.
Must be implemented via CSS custom properties, as well as passing CSS classes
Novely currently needs:
t
function along with object (needed for novely file format to work without issues). So we can remove t
function and it's strings
parameter.{wait:3000}
and {pause}
inside the text somehowhead
, left
and right
parts of picture to just array of any picturesI am planning to think about character animation. It could be live2d animation or Rive animation. Rive is seem to be more developer friendly, but more dedicated to vector graphics.
Some self implementation based on canvas api is also possible, but not interesting to me
I think there should be action that will show image. Also there is a thought that action can can be layered. There should be animation support. Image should be able to be positioned.
Proposed api is something like that
engine.script({
start: [
// placed on top
action.showImage('image-url.png'),
// configured
// todo: also why not pass string and then object?
action.showImage({
// image url (required)
src: 'some-url.png',
// z index
z: 10,
// add animation
in: 'some css class',
class: 'className',
// css
css: {
// css properties goes here
},
// maybe 'left', 'center', 'right', some absolute values, tuple of [x, y]
position: unknown
}),
action.hideImage('image-url.png'),
// i guess we should not allow to change z-index when hiding
action.hideImage({
// remove animation
out: 'another css classname',
})
]
})
I think these things look nice when context is HTML5 game, however in case of other things like in example Pixi.js making some things is not possible or wrong (mixing html with canvas, as UI may be drawn in canvas <img /> will break the game)
Maybe this action can be added only to solid, but then it will be impossible to preload these images, and this is very important feature.
I think these should be an api to let engine know that something can be preloaded. Usually custom actions are made like that:
const makeAction = (props) => {
const fn = () => {
// use props here
}
return ['custom', fn]
}
So it is likely possible to add some property on that function that will return resources (it can be an array!)
But more I think about extending custom actions the more I think they should be just an object with function in it instead of function with lots of properties.
There should be a way to set character different clothes.
There are "saves" and "meta" keys, that are used for saves and data like language, typewriter speed, etc. Saves have their own data, but it can be only accessed in the running game.
The idea is to add "data" key that will store data not dependent on saves. This could be used in features like achievements, when in one save you get an "Apple", and in another one a "Pear" and both should be saved.
Also, unwrap
function should refer to "data" instead of "state" of save when used outside of game. Or, another function might be created and made public.
Лучше бы сделать модуль переводов более полезным.
action.dialog('Персонаж', '{{name%capitalize}}')
Например, через %
указывать какое-то действие
Engine should support native custom actions. Unlike custom actions supported now there should be registered inside. These could be provided by renderer. In example right now there is a @novely/solid-renderer
based on SolidJS which works with DOM. Animation and etc happens by using the DOM. However, there might be a Pixi renderer which will not accept arguments that solid renderer accept.
In example registering could look like
const engine = novely({
renderer: customRenderer,
actions: {
addCharacter: ({ renderer }) => {
return {
call([character]: AddCharacterParametersType) {
const style = getCharacterStyle();
renderer.addCharacter(character, style);
}
}
}
}
})
engine.script({
start: [
engine.action.addCharacter('Micah Bell')
]
})
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.