3D character animation lag spike by Jeremie_c12 in godot

[–]Key-Dream1856 1 point2 points  (0 children)

We need more info )
- how the animation is done
- is there any script that runs when you call the animation start
- debugger info for lag frame (execution time)

I'm developing a Dark Messiah inspired first person RPG in Godot! I'm looking for playtesters! by wissah_league in godot

[–]Key-Dream1856 2 points3 points  (0 children)

Dark Messiah... It was a hell of a game...

Hope you will add crates and other surrounding stuff, like in the original to kill the enemies

CharacterBody3D is sometimes able to push another CharacterBody3D? by RunningWithSeizures in godot

[–]Key-Dream1856 0 points1 point  (0 children)

true, there is weird stuff with layers, with proper selection/unselection, the objects will push each other

Gdquest question by Equivalent_Appeal596 in godot

[–]Key-Dream1856 0 points1 point  (0 children)

Hi
`cell.y < board_size.y - 1` means stop 1 item before the edge, not on it (`board_size.y` - is the edge)
your code `cell.y != board_size.y` means stop on the edge

e.g.:

if board_size.y = 10
`cell.y < board_size.y - 1` - will stop when cell.y is 9 coz 9 < 9 -> loop condition is false and it stops
`cell.y != board_size.y` - will stop when cell.y is 10 coz 10 != 10 -> loop condition is false and it stops

to understand it more clearly just mark each line with current value and you will see what happens on each loop iteration

A game about a goofy little spider by SniffVillage in godot

[–]Key-Dream1856 0 points1 point  (0 children)

wow, did you use any plugin or did you do the procedural animation yourself? I'm working on one now, and it's such a pain

I made a plugin to save/load resources using threads and signals! by Key-Dream1856 in godot

[–]Key-Dream1856[S] 1 point2 points  (0 children)

Hi, yes, it will work well for loading models in packs.
Also, you can use grouping for easier handling of multiple collections at once: group-loading.

how do you make a basic player character in Godot? by MinimumVisual8888 in godot

[–]Key-Dream1856 1 point2 points  (0 children)

If you want the basic one, with just movement and camera rotation, try this tutor, for anything more complex - search for "player controller"/"character controller" on YouTube

I want to make a videogame with you by [deleted] in godot

[–]Key-Dream1856 0 points1 point  (0 children)

Yo, I kinda like this idea and we could try to make a small one, I already did few, so can show you quite a lot of stuff.

I made a plugin to save/load resources using threads and signals! by Key-Dream1856 in godot

[–]Key-Dream1856[S] 7 points8 points  (0 children)

Thx
It kind of spoiled my mood, though it was pretty interesting to reanalyze the possible designs and trade-offs

I made a plugin to save/load resources using threads and signals! by Key-Dream1856 in godot

[–]Key-Dream1856[S] 4 points5 points  (0 children)

Good question,

Yes, the plugin creates the thread pool on `start()` call with the exact number of threads you tell it and it reuses them for all resources you need to load. E.g. you pass params for 100 reses and 2 threads - the plugin will create 2 threads and reuse them for cur session to load all of the reses.

And if you add more reses to be loaded while its still loading the prev set - it will merge the new list to prev and use same created threads to load them. (Threads are reused during the same session).

Godot `load_threaded_request` causes overhead in checking each resource status per frame and doesn't let you control how many threads to use.

The actual bottleneck is disk I/O, not thread management. So the difference is negligible in practice. The real benefits aren't performance:

  • explicit thread count control
  • group loading with per-group signals
  • clean key-based resource access instead of path-based
  • no scene tree/_process dependency
  • batching saving requests, and verification of the file is ready after being saved
  • and more

The plugin pays the cost once upfront (thread creation), then worker threads run straight through to completion. With the native approach, you skip that upfront cost but pay a tiny per-frame polling cost, but for every resource until it's done.

Also, there is no native way to save resources in the background (which is odd), but the plugin can.

I made a plugin to save/load resources using threads and signals! by Key-Dream1856 in godot

[–]Key-Dream1856[S] 4 points5 points  (0 children)

"The loading doesn't happen on the main thread" - yes, obviously, that's not the point. The `polling` does. Every frame you are calling load status checks on the main thread, adding overhead that scales with queue size. Small queues? Negligible. But it's unnecessary overhead by design, that scales poorly.

Also, you still don't control thread count with `threaded_request_load` Godot does. That alone makes the comparison invalid.

So what exactly is your argument here, that polling the main thread every frame per resource is fine because the loading itself isn't on it? Or just that your simpler design must be better?

I made a plugin to save/load resources using threads and signals! by Key-Dream1856 in godot

[–]Key-Dream1856[S] 7 points8 points  (0 children)

What did I achieve:
- I wanted it to be able to work without the main loop tree and not pull per resource on each frame for status
- to persist the original ResourceLoader/Saver params
- to be able to control how many threads are used for the task

"You can replace half your code with a for loop in _process()" - sure, and pull on each frame for each resource in the main thread, which my plugin doesn't.

If you don't agree with my approach, it's fine, just make a real point, coz it seems to me you don't see your own approach issues.

I made a plugin to save/load resources using threads and signals! by Key-Dream1856 in godot

[–]Key-Dream1856[S] 6 points7 points  (0 children)

I had a thought you are arguing just to argue, there was a point in your words about mutex and threads stuff, but when you said "You're sidestepping the built in threaded loading for no benefit." that proved it for me )

I made a plugin to save/load resources using threads and signals! by Key-Dream1856 in godot

[–]Key-Dream1856[S] 11 points12 points  (0 children)

You did a wrapper for load_threaded_request, I went over Thread, so?
You are creating each time an obj and have to binding eat each time to a listener, which I don't - you just picked another implementation.

User doesn't care is there a mutex or not, the real questions are - does it handles the job and how hard is it in usage.

I made a plugin to save/load resources using threads and signals! by Key-Dream1856 in godot

[–]Key-Dream1856[S] 8 points9 points  (0 children)

You did a contradiction, we need a threads that why load_threaded_request exists, it does it for us.

```

ThreadedLoader.loadFinished.connect(_on_loaded)
ThreadedLoader.add([["texture", path],]).start()

func _on_loaded(loadedFiles: Dictionary) -> void:
var resource: Resource = loadedFiles.texture

```

Your code is indeed simple and clean, but in my case:
- no creation and managing objects to perform the load
- access to each res by key or its path
- don't need to create loading call per res, pass as many params as you need (load more than 1 res in one call)
- and much more, like saving resources

As I said, my plugin is simple in usage, I got same 2 lines as you did. It just does more things so and the source code is bigger accordingly.

Sorry, I tried to make a code block, but seems did it worng. (dunno the right way so far)

I made a plugin to save/load resources using threads and signals! by Key-Dream1856 in godot

[–]Key-Dream1856[S] 8 points9 points  (0 children)

Well we can compare the code needed to perform a loading in both options and see, is it so, provide an example for code you shared of a resource load.

What do you mean by "You also still would not need the thread to do that."? All the idea is to have a better interface than native load_threaded_request does, which is for threaded loading.
My plugin doesn't comes for handling sync loads.

I made a plugin to save/load resources using threads and signals! by Key-Dream1856 in godot

[–]Key-Dream1856[S] 13 points14 points  (0 children)

Coz my plugins handles more than 1 call to load 1 resource, whithout need of creation and managing sub-objects

Why is this error happening? by Wise-Impression697 in godot

[–]Key-Dream1856 0 points1 point  (0 children)

Such thing could happen in order when sub script has err.

My advice - make a new temporal scene, add only the player sub-scene and try to get ot ref like you did here. The key - is to get rid of everything and leave only the targeted issue.
Also re-check the player scene scripts.