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

Integrating into other web applications #16

Open
S-North opened this issue Feb 10, 2023 · 4 comments
Open

Integrating into other web applications #16

S-North opened this issue Feb 10, 2023 · 4 comments

Comments

@S-North
Copy link

S-North commented Feb 10, 2023

Hi, this is really great stuff. I've been looking for something like this to integrate into my open source D&D encounter tracker.
Do you have any documentation or suggestions for how I might be able to add this to an existing JS/React project? I'd like to pass options to the dice roller (number & type of dice), have the physics dice roll on the screen, then pass the retults back to the application.
Is there an interface for this already, or something you might be planning to implement.
I'm not familliar with Godot or WASM.
Here's my project: https://github.com/S-North/DnD-NextJs-MongoDb

@Qubus0
Copy link
Owner

Qubus0 commented Feb 10, 2023

Hey there, glad you like it. I'm currently working on dice syntax support e.g. 2d5r1 or 1d20+2. After that is done, I'm planning to add exactly what you need - a way to pass these commands to the application. But I'm not entirely sure how well it would work to integrate it into another webpage, since Godot doesn't really provide good methods to communicate with the application once it's running.

@S-North
Copy link
Author

S-North commented Feb 10, 2023

Hi Qubus0, thanks for the reply. Sad to hear Godot has no good method for returning values, this makes it unsuitable for my case. If in future you find that this can be done, I would greatly appreciate hearing about it. I'll continue to follow your project with great interest :)

@Qubus0
Copy link
Owner

Qubus0 commented Feb 10, 2023

I'm not saying it can't be done, but we might have to use some unconventional methods to communicate - like using local storage for example

@Qubus0
Copy link
Owner

Qubus0 commented Feb 10, 2023

Another way could be sending post requests to your server or using websockets. Though I haven't worked with those in Godot yet

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

No branches or pull requests

2 participants