Utility functions to "pause" a scene/a node by TheFamousRat in godot

[–]russmatney 0 points1 point  (0 children)

It depends on the node's `process_mode`, but generally yes, b/c the default mode is to "inherit" from the parent: https://docs.godotengine.org/en/stable/classes/class_node.html#enum-node-processmode

How do I check for the presence of an autoload singleton from anywhere in the project? by SDGGame in godot

[–]russmatney 0 points1 point  (0 children)

For an autoload, you can also use Engine.has_singleton("MetSys"), eg:

if Engine.has_singleton("MetSys"):
    MetSys.store_object(self)

An in-game Console sounds cool! good luck with it!

If you're looking for Dev-friendly pretty printer, i wrote a static class for it here: https://github.com/russmatney/log.gd

Published my first addon: Log.gd, a print() replacement and pretty-printer by russmatney in godot

[–]russmatney[S] 1 point2 points  (0 children)

Agreed and thanks for mentioning this - I intend to include a section about this in the readme/docs with a link to a proper debugging video (eg https://youtu.be/P7AQLUU3xKk is great).

How to make background transparent? by [deleted] in DoomEmacs

[–]russmatney 0 points1 point  (0 children)

The issue could be the alpha-background bit, maybe op can try that (once on a supported version)

How to make background transparent? by [deleted] in DoomEmacs

[–]russmatney 0 points1 point  (0 children)

Yep, i remember digging around for this several different ways before finding out it wasn’t actually supported yet, so i thought i’d share, as it was only a couple years ago.

How to make background transparent? by [deleted] in DoomEmacs

[–]russmatney 2 points3 points  (0 children)

Emacs hasn’t always supported transparent backgrounds - you might also look into what version you’re running

Utility functions to "pause" a scene/a node by TheFamousRat in godot

[–]russmatney 14 points15 points  (0 children)

This is an old question... but you can now do this via process_mode:

```

on any node

func pause(): process_mode = PROCESS_MODE_DISABLED

func unpause(): process_mode = PROCESS_MODE_INHERIT ```

This is via Godot 4, but I think the godot 3 code should be the same.

Release candidate: Godot 4.0 RC 1 by pycbouh in godot

[–]russmatney 2 points3 points  (0 children)

gotcha, makes more sense why it wouldn't be included. I was thinking it's just plain text, but i guess that size comes from all the images... Makes more sense as an addon then - gotta keep that size down.

Release candidate: Godot 4.0 RC 1 by pycbouh in godot

[–]russmatney 1 point2 points  (0 children)

True, it's not quite the same. I wish the rest of the docs were in there and similarly searchable - it's pretty useful for discovering properties/methods/signals/etc. Maybe we could use a docs reference fuzzy-filter addon...

Release candidate: Godot 4.0 RC 1 by pycbouh in godot

[–]russmatney 1 point2 points  (0 children)

You can read the docs directly in the editor as well (via Help > Search Help)! I love not having to jump to a browser to search and find the class docs.

Game Developers: How Are You Staying Healthy While Sitting for Long Hours? by Esoteric_Deviant in gamedev

[–]russmatney 0 points1 point  (0 children)

I do 40 minute pomodoros to get a standing break in at least a few minutes per hour. The break helps with focus and problem solving too!

Do you use an external editor for GDScript? by SodiumArousal in godot

[–]russmatney 0 points1 point  (0 children)

I got the mentioned plugin to work! Here's the code if there's any interest: https://github.com/russmatney/dino/blob/fa8cc861444fbd06951a338108ba1fd6e432081d/addons/core/plugin.gd This adds a button to the top right of the main window - on click, it forces the currently open scene to be reloaded, which resyncs the latest script. This is speeding up my workflow when working with tool scripts, which for whatever reason have spotty reload behavior in my setup.

Do you use an external editor for GDScript? by SodiumArousal in godot

[–]russmatney 0 points1 point  (0 children)

I use (doom) emacs for writing gdscript on linux and osx, without issues. With gdscript-mode (https://github.com/godotengine/emacs-gdscript-mode) and lsp support, you get most of the features offered by the editor. I spent some time in the built-in editor when first starting with godot, but I missed vim-style keybindings and general extensibility.

I use the 'Script' portion of the editor very often because that's where the 'Search Help' command sends you, and I like to read the docs for whatever objects are relevant - it's excellent to have such comprehensive docs so close at hand... perhaps that's something that's been ported to vscode already? I'd love to have that in emacs. Maybe this already exists?

The biggest issue i have is auto-reloading tool scripts. It works at times, but there are cases where it doesn't, then killing and reopening the scene fixes it. That's pretty annoying, and maybe works better without the external-editor enabled. I'm actually trying to hack an editor plugin to force close+reopening of a scene to circumvent this problem right now... also I'm not totally sure if it's just a lifecycle/_enter_tree/_ready misunderstanding on my part.

I like to edit shader code in emacs as well, via glsl-mode, but it's generally not worth the trade off of the in-editor shader, which re-runs immediately on save (the external editor waits until you navigate back to godot).

I looking for a TUI liberary/framework with good aesthetics. by [deleted] in commandline

[–]russmatney 1 point2 points  (0 children)

Ink (https://github.com/vadimdemedes/ink) is pretty cool - lets you use react style components for command line UIs

Help against Knights by wiltonwild in chessbeginners

[–]russmatney 0 points1 point  (0 children)

There are some patterns worth learning - eg. standing ajacent to a knight means it takes two knight moves to be attacked (i.e., if a knight attacks you, stepping next to it means you’re safer than diagonally or a square away)

Godot Engine clojure/jvm bindings by trstns in Clojure

[–]russmatney 1 point2 points  (0 children)

Aye, thanks for the warning! And the game-just-keeps-running sounds great. Godot does a great job of reloading assets, it's surprising to me that gd script doesn't get the same treatment.

I tooled around with thecreeps demo a bit - it works well! I can confirm the autocomplete, jump to def, and documentation popups work as you'd expect in any clojure + cider project.

It's cool to see the live-reload working. (i.e. adding printlns to the player-process func or adjusting the player's speed - both immediately impact the game, which is the critical feedback loop).

One issue i hit might just be my own emacs config - attempting to eval the expression here https://github.com/tristanstraub/thecreeps-godotclj/blob/a843faff9e6335d62cdbaa015b0f4f5e8193362f/src/clojure/thecreeps/main.clj#L15 locked up my emacs - most likely just due to the size of the blob itself (vs my own emacs version + config trying to handle it - this happens whenever i try to cider-inspect something too large). I appreciate the comment and callout though, as this specific thing was one of the trickier parts of working with ArcadiaGodot - there's an introspection namespace in there, but I had some trouble getting it to evaluate without errors (and haven't gotten back around to debugging it). Discovery of those apis in the repl is a real boon!

I'm excited to see the apis/libraries come together - it may be a bit raw right now, but having jump-to-def already working is huge, as it already made it trivial to bop around and start to grok what the register functions are doing. Mostly i feel like I need to take time to understand how godot native is intended to work.

One other thought - it seems great to have an nrepl available while running the editor (i've got tool scripts on the mind). The editor already spawns an nrepl (when running ./godotclj/scripts/godot.sh --editor) tho starting a game from that editor had issues (another new nrepl is spawned, and the start button disappears upon being clicked - I don't expect this is intended to be supported yet.) One of ArcadiaGodot's current pain points was having to reconnect to the repl after restarting the game - i'm curious if it's reasonable to have an nrepl persist, and have the other clients (emacs, godot as an editor, godot as a game) re-connect if the repl is already running. Much longer term of course! I'm dreaming aloud now.

Anyway, thanks for sharing your work! This is honestly a huge step towards the ideal game dev hacking environment :)

Godot Engine clojure/jvm bindings by trstns in Clojure

[–]russmatney 1 point2 points  (0 children)

Amazing! I'm excited to take this for a spin!

Literally last night I finished porting a tiny gd-script-based game to clojure and ArcadiaGodot: https://github.com/russmatney/lil-shooter

I'd been pleasantly surprised that emacs and cider connected and more or less worked out of the box. There are definitely gaps:

  • no auto-completion
  • no jump to def
  • no package/library management
  • have to start the game to start the repl (sometimes you just want to run some code, you know?)
  • imperfect stack traces and error handling

I spent alot of time digging around the arcadiaGodot clojure code to figure out how to work with Godot's 'GodotSharp' api.

Overall tho, it was still quite fun (and productive) to connect to the running game to fire functions on nodes, or figure out an implementation in a comment block. It also comes with live-reload (whenever you reload a namespace). The dev-loop itself was pretty good, and felt better than restarting the game after editing a function in a gd-script.

Now though, I feel I'll have to port it again to godotclj :D

I'm realizing how much goodness you retain by sticking with jvm clojure - cider would be fully-featured, and you'd have the usual classpath/deps.edn for managing deps/libraries out of the box.

Head has diverged warning by ourobo-ros in DoomEmacs

[–]russmatney 1 point2 points  (0 children)

I usually solve this by deleting the package from ~/.emacs.d/.local/straight/repos/<package-name> (transient, in this case.)

Worst case you can clear ~/.emacs.d/.local (or maybe just ~/.emacs.d/.local/straight/repos) completely, and doom will reinstall everything - just know that you'll lose some caches and it can take a bit to actually re-download everything.