Git Product home page Git Product logo

hedgewars-typewriter's People

Contributors

vintprox avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

hedgewars-typewriter's Issues

Add whitespace delay

As of now, whitespace has a delay of any other character. There should be an option to specify special delay for whitespace characters. By default, it would be imperative to just use the same delay as set for other characters.

Whitespace handling

Currently, whitespace characters (usual space, wide space, tabs, etc.) are handled like any other. They need special treatment to make typewriter look and sound more natural.

HW Animate: make cinematic lock optional

Currently, there is no way to make cinematic and inputs lock optional for playing animations with OOTB Animate library. It's hardcoded.
This prevents from displaying team name and label during their animation.
Would be nice if Animate had some global variables and function parameters saying whether following animation requires cinemalock/inputlock, in single namespace Animate as it was implemented in Typewriter.

Skip serial whitespaces

Right now, whitespaces that come in sequence are treated as a regular character. But don't confuse this issue with sound (#9) and delay for whitespace (#10). In this scenario, we should treat whitespace and a bunch of consequent whitespaces as a single one. This means simply ignoring 2nd, 3rd, 4th and so on until another kind of character appears.

Trim spaces from both ends of line

There is no use for usual spaces dangling in the start and the end of each line (we may make an exception for other whitespaces), so they should be cut off prematurely. It will also mean that they'll receive no extra sound nor cause any delay.

Hedgewars mission panels have special syntax for doing line break with | (pipe) character, which means that in this case spaces can be trimmed around such line breaks. This suggestion doesn't account for spaces in the beginning and ending of the text though - use better judgment.

Adopt classes

I kinda dreaded to introduce object-oriented programming on the table because of added complexity, but I see quite a few advantages with an adoption of classes:

  1. Contain settings in instances of the class, separate objects. Imagine regularMissionAnimator and specialMissionAnimator. To make these work without repurposing class, one has to retain settings for regular (more common) animation in global Typewriter table, apply some other override for special mission animation, and on top of that merge this same override with one-time override (text, icon, etc.) - and so every time. With new approach, we avoid losing more common overrides somewhere in the middle and can reuse freshly made commons for consequent animations.
  2. Split the responsibility. Imagine MissionPanelAnim and CaptionAnim. We don't want to reinstantiate a giant monolith of settings for literally some speech bubble animation that we'll use just once per game. So, it makes sense to separate speech bubble animation from mission panel and any other kind of animation, for example.
  3. Inheritance can help us give classification and share common methods for all kinds of animation.

Change typing sound for whitespace

You'd imagine that caret should just skip whitespace and go type character after it. Right now, it's treated like any other symbol, hence it's doing typing of the air. Turn off sound by default and allow to change it to something else entirely.

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.