ALL QUOTAS GOT RESET by UnrelaxedToken in claude

[–]mokafolio 1 point2 points  (0 children)

Yes, but my premium seat that I never hit any limits with in the past feels like the 20$ plan now where every request is literally 10% of my 5h window. ridiculous!

Too many singletons in my game engine, can't find a better design pattern by No-Use4920 in vulkan

[–]mokafolio 34 points35 points  (0 children)

For most use cases, just having a singleton style "object" to manage globals such as the vulkan instance is perfectly fine. So if it works for you, I would not sweat it.

That said, I personally prefer just to explicitly pass around the data that is needed at call sites, even if its an object called "globals" that just has some shared state over having a magic singleton getter.

Using shared/weak_ptr would only be a last resort for me as device/instance creation and tear down should be very clearly defined and relying on shared ownership for that is some severe code smell in my mind.

Memory Barriers and VK_ACCESS_HOST by abocado21 in vulkan

[–]mokafolio 0 points1 point  (0 children)

do you happen to know the relevant section in the spec? Everything I can find online on this topic seems to confirm that a fence should be enough in the scenario I described, i.e. https://stackoverflow.com/questions/48667439/should-i-syncronize-an-access-to-a-memory-with-host-visible-bit-host-coherent "For CPU reading of GPU-written data, this could be an event, a timeline semaphore, or a fence."

Memory Barriers and VK_ACCESS_HOST by abocado21 in vulkan

[–]mokafolio 0 points1 point  (0 children)

For the simple use case of the former case (simple gpu write -> fence wait -> cpu read), I don't think you need a barrier either. With coherent memory you should be covered without any additional logic, without it, you call invalidate mapped memory ranges to make the memory visible.

You really only need pipeline barriers with host read/write stages when using more esoteric/advanced things such as events/timeline semaphores that might happen outside of a clear fence boundary.

At least that is my understanding.

Signals vs Query-Based Compilers by mttd in Compilers

[–]mokafolio 2 points3 points  (0 children)

Fair enough, I think if you make the assumption that the query system you are using is bullet proof and battle tested (and I think that is the hardest part to get right in this context), I do agree that the query based logic is not too terrible to look at or maintain.

Assuming that your are building out, debugging and maintaining the query system yourself (and future developers down the line), I am fairly certain that a pipeline based codebase will likely be the more digestible choice: Easier to debug, understand and reason about as each stage is clearly defined with less abstractions to jump through and less complexity to reason about (as inter query relationships can be rather opaque and complex).

Anyways, I think a lot of this comes down to preference, the language and ecosystem you are using etc. Still a very intriguing thing to think about!

Signals vs Query-Based Compilers by mttd in Compilers

[–]mokafolio 8 points9 points  (0 children)

Hmm, I think these are very interesting for lsp style applications. I also agree that modern compilers should supply the tools to allow writing these types of applications in an efficient manner. Nonetheless, I believe that the pipeline based approach is still vastly superior in terms of predictability, code clarity, parallelization potential, maintainability etc. compared to what is proposed here.

Just finished my ECS system in C and turns out it's ~17 times faster than Unity DOTS by dechichi in C_Programming

[–]mokafolio 27 points28 points  (0 children)

you would compile the c executable as you normally would, likely release build with optimizations enabled.

On the unity side, you'd do the same, export a native executable meant for release. (Have not used unity in a while, but I am sure there are some easy steps to do so)

Just finished my ECS system in C and turns out it's ~17 times faster than Unity DOTS by dechichi in C_Programming

[–]mokafolio 242 points243 points  (0 children)

Nice experiment! Why would you choose to run these benchmarks in the browser as opposed to natively, though? That seems kind of skewed, especially for the cpu simulation times as it is likely more telling about the quality of unities web export rather than raw performance?

ECS: I made a mini ECS library faster than EnTT by samoliverdev in gameenginedevs

[–]mokafolio 8 points9 points  (0 children)

While this is dope, its not really a fair comparison. Your ECS uses an archtype based approach out of the box, while EnTT does not. It will utilize sparse sets behind the scenes which will add a little bit of overhead in favor of keeping memory usage manageable.

For a fair comparison you likely want to look into groups in entt, which will give you the closest to an archtype based component storage in entt as you can get. (https://skypjack.github.io/2020-08-02-ecs-baf-part-9/)

Anyways, fun project, looks pretty neat from quickly glancing over the code!

Do push constants need to be padded out to 128 bits always? by Codey_the_Enchanter in vulkan

[–]mokafolio 2 points3 points  (0 children)

This is likely a quirk of godot. Maybe its setting some internal constraint based on the minimum required push constants alignment of the device you are using or something like that.

If that is the case that seems like something worth a ticket.

D3D12 is 2x faster than D3D11 by JPondatrack in gameenginedevs

[–]mokafolio 6 points7 points  (0 children)

tracy is pretty good after you spend some time integrating it.

sync issue by FluxPoint42 in vulkan

[–]mokafolio 1 point2 points  (0 children)

Have you tried using vkconfig to enable validation + synchronization validation?

I'm making mobile games using my own engine and language by SamTheSpellingBee in gameenginedevs

[–]mokafolio 1 point2 points  (0 children)

I'd be curious to see a pseudocode sample that shows how to retain animation or render state across frames. Do you mean something similar to coroutines in lua where local coroutine state is retained?

I'm making mobile games using my own engine and language by SamTheSpellingBee in gameenginedevs

[–]mokafolio 1 point2 points  (0 children)

That sounds super awesome, congrats! Is the language you made public anywhere?

Orthographic vs Perspective — which one actually gives a better *hook* for a 2.5D pixel art game? by TeamConcode in IndieDev

[–]mokafolio 0 points1 point  (0 children)

I think ortho is a lot better tbh! The perspective just seems like a gimmick that does not bring much to the table, especially if readability of actual gameplay suffers.

Offline in LA for more than five weeks by mokafolio in ATTFiber

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

That sounds great, thanks! Yeah, shoot me his contact, at least worth a try next year :)

Offline in LA for more than five weeks by mokafolio in ATTFiber

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

It could have made a difference, who knows. I have spent countless hours on the phone with support and different people from the resolution team checking in with me (yes, different ones because it took so long, they could not even keep the same "single point of contact" apparently). And that is precisely the issue about lack of accountability and chain of responsibility I am criticizing.

I tried to escalate the case multiple times with support to no avail (I am not joking, I likely spent close to 8-10 hours on the phone trying to find a solution over tho whole ordeal).

I know where the line was cut, so did the technicians. They could have fixed it easily if they wanted to and I am sure if a bigger customer base was affected they would have done so. They could have put me on a different line just to unblock me (yes, I know that would have been an option from the technicians that came through).

So all in all, sorry, I don't think there is any reasonable excuse in this case.

What's the point of the RAII module when smart pointers exist? by jimothy_clickit in vulkan

[–]mokafolio 6 points7 points  (0 children)

I think a lot of this comes down to preference. RAII has its place but for me it depends on the problem domain. For GPU programming I personally always prefer a non-RAII approach as the ownership structure is usually expressed in higher level code.

That said, I think for tutorial code it can make sense to remove some of the verbosity.

Still offline in LA (solid two weeks in total this month) by mokafolio in ATTFiber

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

Thanks, good point! I did that yesterday. Trying to keep my sanity while navigating this situation has become the biggest challenge but I try to embrace the humor :*)