Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
A jam submission

GDScript ConsoleView project page

A GDScript console built-in the Godot editor
Submitted by MrEliptik (@mreliptik) — 1 day, 20 hours before the deadline
Add to collection

Play tool

GDScript Console's itch.io page

Results

CriteriaRankScore*Raw Score
LOVE#124.1114.111

Ranked from 18 ratings. Score is adjusted from raw score by the median number of ratings per game in the jam.

GitHub or Gitlab repo
https://github.com/MrEliptik/gdscript_console

Leave a comment

Log in with itch.io to leave a comment.

Comments

Submitted

With a little usability refinement, this will be a ‘must-have’ editor plugin.

DeveloperSubmitted(+1)

Thanks! Do you have some in mind? I thought that having people use the addon would help me know what to implement

Submitted (2 edits)

Off the top of my head:

  • When the text box is focused it’d be nice to run it with ctrl+enter (or some configurable hotkey)
  • Your ctrl+scroll zoom is actually just scroll zoom. edit: pull request sent
  • I don’t use the built-in text editor(and I didn’t look at your (very nice) readme until after I’d already tried it), so it would be nice to have visual feedback for what script the console is currently running against. This could also be useful if you have a tool script loaded in a scene and you want to watch the viewport while manipulating a node or something.
  • It might be interesting to have a mode where instead of running against the open script, it runs against the selected node?
  • This is less of a console and more of a REPL, but I’m not sure normal godot users will really know what that is.
DeveloperSubmitted(+1)

Thanks for the suggestion, I’ll add issue on the github page

Submitted(+1)

If I think of anything else, I’ll make issues for them!

Submitted

To get around the `tool` requirement for executing functions from scripts, you can inject the `tool` keyword into the current script.

I use this pattern in a few of my plugins. It also makes developing plugins easier, as a nice side-effect :)

Submitted

interesting idea to inject the keyword. but it also needs to be removed afterwards

DeveloperSubmitted

Exactly what I was thinking.. How do you know when to remove it? If you inject it, users might not be aware of it and then weird stuff can happen

Submitted

It's injected after the script is loaded, so it doesn't persist on disk.

This is easily verifiable by trying it on any script and observing that no changes are made to the actual file.

DeveloperSubmitted

Oh ok that’s clever! Thanks for the anwser

Submitted

It does not, the injection occurs after the script is loaded

Submitted

REPL!!  This will be so useful, thanks for making it.

Submitted

I'm honestly surprised that this isn't in the base engine!  This is extremely useful for testing out functions and I reallwish I was using this when I was making my own addon lol

DeveloperSubmitted(+1)

Yeah me too. Someone told me yesterday that you can evaluate expression in your code, which is pretty good to know: https://twitter.com/AlfredBaudisch/status/1488209575874596865?s=20&t=5Ue2Dm5jVo3X8cBCST_bwA

Ahah that’s the idea! Just the ability to run functions can be super useful imo

Submitted

This is something I've wanted since fooooreeeeveer! Way too often I just want to run a 1-2 line snippet to test something, and so I always have little test scenes sitting around in my projects. Have you thought about allowing something more REPL like? This is already great, but that would be my dream. :-)

DeveloperSubmitted

Glad you liked it! I’d love to take it further but I had little time to work on it. I’ll see what the use cases are and then we can see where to go. REPL sounds interesting for sure

Submitted

I encountered the same issue as Dark Peace but looks interesting based on the gifs.

DeveloperSubmitted(+1)

I’ve updated the zip, tell me if it’s OK

Submitted(+1)

Yep it works now! Seems like a great tool for quickly testing code without needing to run the project.

Submitted
I tried to run your example project but this showed up
Control was not in dock.  Cannot open file 'res://addons/gdscript_console/fonts/main_font.tres'.  Failed loading resource: res://addons/gdscript_console/fonts/main_font.tres. Make sure resources have been imported by opening the project in the editor at least once.  Cannot open file 'res://addons/gdscript_console/fonts/main_font.tres'.  Failed loading resource: res://addons/gdscript_console/fonts/main_font.tres. Make sure resources have been imported by opening the project in the editor at least once.  scene/resources/resource_format_text.cpp:175 - Couldn't load external resource: res://addons/gdscript_console/fonts/main_font.tres
DeveloperSubmitted(+2)

Oh yeah Godot got confused when I deleted the resource. I’ve updated the zip, tell me if it’s OK

Submitted(+1)

Yes it does work now !

Pretty cool, might be useful for debugging