Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to the newest bondagejs or replace bondagejs with YarnSpinner-rust #6451

Open
blurymind opened this issue Mar 14, 2024 · 6 comments · May be fixed by #6466
Open

Upgrade to the newest bondagejs or replace bondagejs with YarnSpinner-rust #6451

blurymind opened this issue Mar 14, 2024 · 6 comments · May be fixed by #6466

Comments

@blurymind
Copy link
Contributor

blurymind commented Mar 14, 2024

Description

The current version of bondagejs which gdevelop uses doesnt have full yarn 2 syntax compliance.
Things like inline expressions dont work, so for example you cant show variables in text
The player name is ${playerName}

Solution suggested

There is a branch of bondagejs that upgrades it to the yarn2 spec
https://github.com/hylyh/bondage.js/tree/2.0

in theory all thats needed is to simply swap out bondagejs with the new one and test it in gdevelop

EDIT:
another idea I have is to create a module api and a wasm target of the rust port of yarn spinner.

That would probably be even better as it will give us a much better interpreter than bondagejs, which is in a much healthier condition. I created a ticket with intent here:
YarnSpinnerTool/YarnSpinner-Rust#213

@blurymind
Copy link
Contributor Author

btw one added extra of this branch is that the library's deployment size has considerably been shrunk

@4ian
Copy link
Owner

4ian commented Mar 15, 2024

That seems like a great idea! As usual I would say the most important is to triple check any potential breaking changes/regressions.

@blurymind
Copy link
Contributor Author

blurymind commented Mar 15, 2024

yes ofcourse, it may be a case that the wrapper i wrote for it might need some subtle tweaks. It will need to be tested with all the example projects and work exactly the same on them. Bondagejs itself has lots of unit tests - even more on this branch

@blurymind blurymind linked a pull request Mar 18, 2024 that will close this issue
2 tasks
@blurymind
Copy link
Contributor Author

blurymind commented Mar 18, 2024

I made a quick stab at it here, but am having some issues importing the module
#6466

The strange thing is that it logs the module - so it must have imported it, but gdevelop complains about some end of line error. I can do direct commits to that 2.0 branch btw, so any ideas of how it could be addressed at bondagejs tracker are also welcome :)

@mnbroatch trying to ugrade gdevelop to use your upgraded version of bondage

@blurymind
Copy link
Contributor Author

another idea I have is to create a module api and a wasm target of the rust port of yarn spinner.

That would probably be even better as it will give us a much better interpreter than bondagejs, which is in a much healthier condition. I created a ticket with intent here:
YarnSpinnerTool/YarnSpinner-Rust#213

@blurymind blurymind changed the title Upgrade to the newest bondagejs Upgrade to the newest bondagejs or replace bondagejs with YarnSpinner-rust Aug 30, 2024
@janhohenheim
Copy link

Chiming in to say that I'm very happy to help out if you have any questions regarding the Rust port :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants