Giter VIP home page Giter VIP logo

theatre's Introduction

Games I made    Buy Me a Coffee
yellow stripes
func stuff_i_do():
  print(
    'Im currently doing some ',
    [ 'illustration',
      'game jam',
      'game dev',
      'web dev',
    ].pick_random()
  )

Languages

  Python   HTML 5   CSS 3   JavaScript   TypeScript   SASS  

Tools & Frameworks

  Godot Engine   MediBang Paint   Aseprite   Inkscape   Node.js   webpack  



Discord - nnda.dev

theatre's People

Contributors

nndda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

sgq69s

theatre's Issues

Reformat `Dialogue` syntax

Currently Dialogue 'raw' text file use 4 space indentation to differentiate between character name, dialogue body, and function calls:

character_name
    "dialogue body goes here"
    func()

Godot can use either tab or spaces for indentation.
To avoid any conflict I think its better to use symbols/characters instead. If the whitespaces are trimmed, this also makes indentation optional.

Maybe its better to determine wether the editor is using spaces or tabs using text_editor/behavior/indent/type

Constructing the variable with a direct string input, within a function in a script, also count the function's indents.

func _ready():
    var dlg = Dialogue.new("""
    foo:
       Hello, World!
     """)

Resulted as:

    foo:
       Hello, World!

Offset `Dialogue` tags with formatted variables

Dialogue tags save its start position, remove itself, and its function/behaviour is called in DialogueLabel when the character is drawn/displayed at that position.

         ▼
Hi there!{wait = 0.6} Welcome to...
Pos:     10
         ▼
Hi there! Welcome to...

This works fine, even with lots of tags. The problems comes when theres a variable in the text:

                    21
                    ▼
Hi there, {player}! {wait = 0.6}Welcome to...
Hi there, {player}! Welcome to...

                    ▼
Hi there, John! Welcome to...

                    ▼
Hi there, Christopher! Welcome to...

The position remain unchanged, when its formatted. (Might be worse with BBCode too).

Currently looking for a way to offset these, using their positions and length difference of 'before' and 'after' the text is formatted.

One quick 'fix' is to just format the text before applying the tags.

Use CSV as alternatives for dialogue with multiple languages

Right now, the Dialogue resources use filename to identify its locale:

intro.txt
intro.en.txt
intro.ja.txt

But it might not scale well when there's lots of resources. Maybe its better to use CSV files:

en id ja sp
Hello! Halo! こんにちは! Hola!

Theres FileAccess.get_csv_line(). But I don't know if this is a good approach.

Edit: The CSV file need to be re-imported as Keep File (No import)

Use YAML for `Dialogue`

The syntax is cleaner. But theres no built in feature to parse YAML in Godot yet. Still need to do that manually.

Also we don't need #4 with YAML files.

Demo not working?

I press Enter and Space, but the dialog doesn't start, I just have a blank panel

All action keys are set to default, I checked

I ran demo_scene.tscn

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.