0 votes

Is it possible to write an in-game scripting language to support commands sent from a script to a godot game?

What is the best approach to do this, if it has been done in godot?
Is it the same way you implement any interpreter? Does it need c/c++ library and then loaded somehow to godot?

in Engine by (69 points)

2 Answers

+2 votes
Best answer

You can create your own scripting language for your game. But there may not be a "best" approach to this. Though you need to know the extent of the language. How will it be used? How complex should it be? What sort of flow or syntax will it use? As far as how to implement it, you can use GDscript. But it, again, depends on the purpose of the script. If you think speed will be an issue, go with C/C++.

See also this Stack Exchange answer to a similar question.

by (3,062 points)
selected by
+1 vote

I stumbled across your question while researching a good solution for this myself. After building something like that I thought I come back and share my solution. I posted a short video about my progress on Reddit and explained my approach. If your are still on the hunt on how to approach this you can take a look

by (16 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.