rakugoteam / Rakugo-archive

Framework (inspired by Ren'Py) for story driven games in Godot.
https://rakugoteam.github.io/
MIT License
317 stars 30 forks source link

Make Raku (RakugoScript) #80

Open Jeremi360 opened 5 years ago

Jeremi360 commented 5 years ago

Make similar scripting langue to Ren'Py Langue. It can base on python fairyscript

Jeremi360 commented 5 years ago

zrzut ekranu z 2019-01-27 18-05-48 zrzut ekranu z 2019-01-27 18-06-21 zrzut ekranu z 2019-01-27 18-06-45 zrzut ekranu z 2019-01-27 21-18-37

Jeremi360 commented 5 years ago

Now I think it will be better it to work like this:

use say with kind : adv, text_speed: 0.5
"test" : "say some things"
vmpajares commented 5 years ago

I understand that you want to create an easier to write language so you can write:

 $ e = Character('Eileen')
 show eileen happy
 e "I'm standing in front of the White House."

Rather than:

Rakugo.show("alice", ["happy"])
Rakugo.say({
        "who":"alice",
        "what":"I'm standing in front of the White House.",
        "kind":"left"
})

There are two opensource projects about that concept that were used in commercial games: 1.- Escoria, the 'official' Point&Click Framework uses a custom ESC language https://github.com/godotengine/escoria https://fr.flossmanuals.net/creating-point-and-click-games-with-escoria/the-esc-scripting-language/

The language parser is in GDScript so you can adapt it and integrate a subset of .ESC or create a new .RAK

2.- Ink is a Visual Novel language created for the game 80-days, but it was used in P&C games too: https://github.com/inkle/ink https://www.inklestudios.com/ink/

There are parsers for Godot, but they use the ink official C# libraries: https://github.com/paulloz/godot-ink https://github.com/inkle/ink-library

Perhaps you can use Ink as is, or adapt ESC to Rakugo.

Jeremi360 commented 5 years ago

Thanks, @vmpajares for your opinion and information I didn't know that godot-ink exists.

So:

But it doesn't mean I don't try to add more to support more langues. So, after release 2.0.0 I will start to add support for langues:

I will try to make some Ink variation (probably I call it Boku (jap. ink) I can use godot-ink - you can run gdscript code form C#.

vmpajares commented 5 years ago

It's good to know that you keep working in Rakugo. I really think that it could be a great project, maybe it already is but I don't try it yet. Any starting tutorial?

About Escoria, if I remember it correctly, when you want to add something, you create a new node2d and select which type are you creating attaching the correct gd script in globals/TYPE.gd: item.gd scene.gd actor.gd background.gd ....

Every of them inherits from interactive.gd that defines a: export(String, FILE, ".esc") var events_path = "" # API property

The .esc file indicates the behavior of the node, and not the gdscript that define the type of node. So the developer doesn't write a single line of gdscript or C#, instead it edit ESC files that are very descriptive and similar to ink or ren'py. For example this box.esc in the official demo:


> [box_open]
    say player "An old newspaper"

> [!box_open]
    say player "It's a box"

:pick_up

> [box_open]
    set_global i/inv_news true
    set_active box false

> [!box_open]
    say player "It's too heavy!"

:open

> [box_open]
    say player "It's already open"

> [!box_open]
    play_snd box "res://demo/audio/items/box_open.wav"
    set_global box_open true
    set_state box newspaper
    say player "There was a newspaper inside it"

:talk
> [!box_inverted]
    set_state box inverted
    set_global box_inverted true
    stop
> [box_inverted]
    set_state box default
set_global box_inverted false

I not saying that you must use ESC language, but you can use a similar approach to make rakugo language work and the parser is already done in GDScript. I suppose that adapting it would be less work than making a new one from the start.

Jeremi360 commented 5 years ago

@vmpajares I am sorry that I misunderstood what you meant.

It's good to know that you keep working in Rakugo.

Sorry, but I have problem with remembering to write post on my/Rakugo Pateron/itch.io on new things. In fact in every week I make at least 7 commits - developing Rakugo is Fun for me :smile:

I not saying that you must use ESC language, but you can use a similar approach to make rakugo language work and the parser is already done in GDScript. I suppose that adapting it would be less work than making a new one from the start.

I will try use ESC interpeter to make RakugoScript, I don't like ESC syntax. But last time (when godot has version 2.5) I couldn't understand it.

I really think that it could bea great project, maybe it already is but I don't try it yet.

Thanks :smile: ! Rakugo GDScript version is done in 95% and you could use it already.

Any starting tutorial?

In fact in last month I started working on docs/tutorials for Rakugo, but they are WIP and still missing some themes.

Jeremi360 commented 4 years ago

I started working on RakugoScript at rakugo-script branch

Jeremi360 commented 4 years ago

I just find out that raku in jap. means easy, comfort. I will try new attempt at this using tree-sitter.

Jeremi360 commented 4 years ago

I start try to do raku here: https://github.com/jebedaia360/Raku