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

Ingame Block Coding Editor with custom blocks #196

Open
sgaseretto opened this issue Aug 14, 2024 · 4 comments
Open

Ingame Block Coding Editor with custom blocks #196

sgaseretto opened this issue Aug 14, 2024 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@sgaseretto
Copy link

sgaseretto commented Aug 14, 2024

What Happened

This is not an issue but a question. Is it possible to embed the code editor in a game? Sorry if this is a very obvious question, I'm very new to godot and want to know if:

  • The editor can be rendered insied a godot game
  • We can create custom Blocks with specific functions, like move forward 5 times, turn left, move forward 5 times, and so on
  • Can the generated code be executed while the game is running? (Don't know if gdscript is compiled at some point and cannot be executed dynamically while the game runs)

I know it sounds very meta, but basically the idea is to build something like blockly-games

@manuq
Copy link
Contributor

manuq commented Aug 20, 2024

@sgaseretto this would be interesting to investigate. The way it works today: the BlockCode node replaces the script of the parent node with the code generated by its blocks. So it wouldn't be too hard.

@parencompany
Copy link

Hope this happens!

This is just about 'killer feature' territory for me --
And can actually imagine way more usecases (personally),
in-instance / in-game than using in-built in the existing editor.

Would be cool if there was like a custom.gd or something
that we could just have a bunch of dict definitions for
basic structure of block, category, etc (no idea how it works now lol)

@dylanmccall dylanmccall added enhancement New feature or request help wanted Extra attention is needed labels Aug 24, 2024
@SanchoPanza8000
Copy link

I have been wondering about this extension or possibility as well:

  • it would enable an incredible foundation for automation or programming-focused games like desynced, adventure land or stationeers coming to mind as some of the better examples
  • ideally the functionality, addon/plugin would become exposable to the client-side and support godot's multiplayer and sync modes as well.

@DavidGasku
Copy link

After looking at the code, seems like a big refactor to me. The whole code generation should be replaced by a interpreter, that runs one block each time.

dylanmccall added a commit that referenced this issue Sep 19, 2024
dylanmccall added a commit that referenced this issue Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants