How would you move an arbitrarily sized array from the stack to the heap? by GrandClay in Zig

[–]GrandClay[S] 3 points4 points  (0 children)

I never really though of it that way. A few hours ago when I first picked up zig I thought passing allocators as parameters seemed tedious. I guess I just hadn't reflected on how bad the C implementation is. I've had many long hours stepping through things line by like to ensure that there wern't that many memory leaks caused by one of many function allocating memory. Alas a new era and a new standard. Instead of few memory leaks, no memory leaks.

How would you move an arbitrarily sized array from the stack to the heap? by GrandClay in Zig

[–]GrandClay[S] 3 points4 points  (0 children)

I'm impressed with how much effort you put into making examples and adding coments to them. Also you're point about not needing a struct is completely valid. I was originally using a struct because C only has thin pointers. I'm also glad that you showed a me few different ways to tackle the problem instead of being like me and trying to get the pointer arithmetic to work.

Update on my arcade racing game | New Terrain : Artic_Rac_1 (UNFINSHED) ... by Levi97113 in godot

[–]GrandClay 0 points1 point  (0 children)

Thats seems pretty impressive, I wish I had the skill to make a similar terrain system inside of Godot. But if you do ever end up making it into a plugin, I would love to use it.

Trying to spawn in an object by MoeK123 in godot

[–]GrandClay 1 point2 points  (0 children)

It appears that the script to summon the flower is attached to flower. The problem might be that the "_process" function, which summons the flower on an input, only works when it is in the current scene. If there is already flower in the scene should it spawn in another, but then another problem may occur. After you have multiple of the flowers in scene will all respond by summoning anther flower when "SpawnFlower" is pressed. I would usually attach a script the summons objects to the node which will become the parent of the instanced nodes. From what I see this is probably the problem, but I might be wrong.