GithubHelp home page GithubHelp logo

yhdgms1 / novely Goto Github PK

View Code? Open in Web Editor NEW
18.0 1.0 3.0 22.5 MB

Engine that will let you create interactive stories with ease

Home Page: https://novely.deno.dev

License: ISC License

HTML 1.64% TypeScript 87.81% CSS 9.13% JavaScript 1.41%
novel engine game game-engine javascript typescript visual web game-engines interactive-storytelling

novely's Introduction

novely's People

Contributors

dependabot[bot] avatar yhdgms1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

novely's Issues

Actions

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.

Translations

At the moment, the @novely/t9n module is used for translation. It does not require the initial translation values.

  • Standard values must be provided that can be imported and used.
  • There should be a type check for their presence
  • The package should be removed and the functionality moved to @novely/core

Bug on `withStory`

Sometimes using ValidAction[] breaks the indexation, but I cannot reproduce it now (last time was 2 weeks ago)

SingleSave Feature

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.

Customization

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

Future

Novely currently needs:

  • Easier setup, because right now it is too much to configure
    • Local storage by default
  • Better story
    • Story splitting in different files (Not a [file - translation] but a [file - act])
  • Only one way of doing translations. Right now you can use 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.
  • Options for checkbox inputs and etc
  • Some promotion
  • Done sounds
    • Music
    • Voices (like in Genshin Impact or kinda like when you skip it stops)
    • Sounds
  • Better text
    • Should support things like {wait:3000} and {pause} inside the text somehow
  • Active projects
  • Support for DLC's or different versions of games
    • Split preview into different parts like testing rive or testing particles
  • Make it possible to use gifs and videos as character source
    • Replace system of head, left and right parts of picture to just array of any pictures

Character Animation

I 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

ShowImage

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.

Clothing

There should be a way to set character different clothes.

Global Data Storage

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.

Extended Translations

Лучше бы сделать модуль переводов более полезным.

action.dialog('Персонаж', '{{name%capitalize}}')

Например, через % указывать какое-то действие

Native Custom Actions

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')
  ]
})

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.