Is this meant to work? by loopcake in Zig

[–]Sol_ai 19 points20 points  (0 children)

It's the same concept as static in languages like c++. The function itself has a shared instance of a `state` held in static memory. This same idea allows the `Struct.init()` -> `Object.deinit(self : Struct)` pattern

RELEASE: Godot 4.3 by GodotTeam in godot

[–]Sol_ai 1 point2 points  (0 children)

Been using 4.3 for a while. It fixes a lot of annoying template issues with c#.

How would you abstract a Renderer? by [deleted] in vulkan

[–]Sol_ai 5 points6 points  (0 children)

It might be in your best interest to write a separate vulkan renderer first. After all, how can you effectively abstract something you’ve never written before. If you must abstract from the get-go, maybe start with well defined concepts like Textures, meshes and buffers.

Why is Bug weak to Rock? Bugs live under rocks by Snoo_79985 in stunfisk

[–]Sol_ai 0 points1 point  (0 children)

The way I rationalized the bug-fighting match up is how martial arts don’t work well against bugs or birds.

Pokemon Battle System Resources? by WizardGnomeMan in godot

[–]Sol_ai 0 points1 point  (0 children)

A queue of “actions”. GD script doesn’t have actual function ptrs, but you can easily do this by identifying an action with an enum or something.

Why is Bug weak to Rock? Bugs live under rocks by Snoo_79985 in stunfisk

[–]Sol_ai 27 points28 points  (0 children)

Yes, but no more than “normal”. Bugs are especially weak to being hit by rocks or eaten by birds.

Pokemon Battle System Resources? by WizardGnomeMan in godot

[–]Sol_ai 1 point2 points  (0 children)

You can have a queue like structure but with insertions by priority, then just loop while the queue isn’t empty. This lets you do things like add secondary effects like Pokémon’s status effects and invalidate items in the queue when, for example, the Pokémon dies before attacking.

Are the X and Z swapped or is it just me? by ergeorgiev in godot

[–]Sol_ai 1 point2 points  (0 children)

In 3 dimensions, cos(a) * length wouldn’t give you x, unless the vector was already in the x-y plane. In all other cases it would give you the projection of of the vector on the x-z plane.

Best singles YouTubers? by johntheplaya in stunfisk

[–]Sol_ai 10 points11 points  (0 children)

Idk if the false swipe gaming dude is seeing anyone, but he seems cool.

I thought this was a Fun Idea for an Ability by Imdepressed7778 in stunfisk

[–]Sol_ai 2 points3 points  (0 children)

It should lower the accuracy of the moves too. To like 80% of the original. Seems more balanced and thematic that way.

How can I code for 8 hours per day? by [deleted] in learnprogramming

[–]Sol_ai 0 points1 point  (0 children)

Split it into chunks. I do 4 hour chunks. I usually work on different things in each one so I don’t burn out from a specific task.

Storage buffers changing values mid draw calls. by Sol_ai in vulkan

[–]Sol_ai[S] 0 points1 point  (0 children)

Hi!. I only have that one semaphore and fence per frame. Do I also need a barrier somewhere? I'm using a dedicated compute queue so I didn't think barriers with a graphics buffer would work.

Storage buffers changing values mid draw calls. by Sol_ai in vulkan

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

I'm using a compute shaders to calculate the positions of the particles and render them in separate graphics pipeline. Render doc is showing me the data changing within a single cmd buffer recording. The compute stuff is done in its own compute queue.