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

BackgroundWorker Node for Godot EngineView project page

A BackgroundWorker node for the Godot Game Engine.
Submitted by Smaxx (@TheSmaxx) — 8 minutes, 34 seconds before the deadline
Add to collection

Play addon

BackgroundWorker Node for Godot Engine's itch.io page

Results

CriteriaRankScore*Raw Score
LOVE#323.6233.800

Ranked from 10 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/MarioLiebisch/GD-BackgroundWorker

Leave a comment

Log in with itch.io to leave a comment.

Comments

HostSubmitted(+1)

Cool work and I can see it as useful for a lot of people that might not be super comfortable with threads. Great work!

Submitted

when first loading:

Unable to load addon script from path: 'res://addons/BackgroundWorker/plugin.gd'. This might be due to a code error in that script.
Disabling the addon at 'res://addons/BackgroundWorker/plugin.cfg' to prevent further errors.

after enabling the plugin everything worked though.

Developer

Curious. Not really sure what triggered this, though.

Submitted(+1)

Im just curious what godot will do if we load some big scene without your worker. Will it just freeze for a moment?

Developer(+1)

This depends how you load it. Godot has a built in way to load something in background, too.

If you use load(), the program will halt/stall until loading is finished. If you use preload(), whatever you try to load will be preprocessed when building and then loaded together with the parent scene/node preloading, and you can use interactive loading provided by Godot's own ResourceLoader class. The latter just requires you to add a bit more code around it.

You could always just use your own thread, too. Depending on what you load, doing it with my node might still cause your program to stall for a moment, because some operations can only be performed on an application's main thread (especially OpenGL stuff).

Overall this whole node is mostly a convenience thing. This doesn't involve anything you couldn't build on your own or do in a slightly different way.

Submitted

Thanks for detailed response!

Submitted(+1)

"Invalid call. Nonexistent function 'is_alive' in base '_Thread'." upon clicking on the "do some work" button. Yes, the plugin was enabled.

Developer(+1)

Oh, any chance you're running 3.3 or older? I wasn't aware this is a new feature in 3.4!

Submitted(+1)

I'm running on V3.3.3 yes

Ok I see

Developer(+1)

Well, will see, I can definitely work around this requirement/dependency for a future post-jam version. Thanks for noticing!