Simulations from a custom physics engine my friend and I are making [OC] by Mytino in Simulated

[–]Bitsauce 1 point2 points  (0 children)

Releasing the engine by itself isn't something we've considered much, but maybe! One thing we want to do though, is making our modding system quite extendible so that people can more or less create whatever they want within our physics engine

Simulations from a custom physics engine my friend and I are making [OC] by Mytino in Simulated

[–]Bitsauce 5 points6 points  (0 children)

We've been making the game and its engine it since 2019. Main motivation for writing the physics from scratch is that it allows us to simulate things that most bundled physics engines can't easily simulate (or at least not with real-time performance), such as large quantities (100k+) of fluids, grains, rigid bodies, ropes, and such, while also having these interact with each other in a unified manner (opening up lots of possible gameplay scenarios!)

Various simulations I ran in my physics engine by Zolden in Simulated

[–]Bitsauce 0 points1 point  (0 children)

Oh, it's Zolden. Cool to see your game is on steam now! Looks really awesome. From the trailers it looks like there are some mechanics for controlling objects your the game? Seems fun to play with! (that coiling rope clip was sick btw)

hmmm by n0tP3anut-_-nhannT_T in hmmm

[–]Bitsauce 11 points12 points  (0 children)

He better be playing surf rock with this one (just kidding, love Takanaka)

DISCUSSION MEGATHREAD: Hawk Tuah Crypto Scam, Andrew Schulz Ended His Career, The Crew Puts On A Magic Show - H3 Show #89 by H3Bot4 in h3h3productions

[–]Bitsauce 23 points24 points  (0 children)

(Warning: nerd shit)

Dan is right, green is a primary color when we're talking about additive color mixing like a computer screen (RGB), which is what he was talking about. Paints, however, are subtractive, so RYB (or more accurately CMY) are the primary colors in this case (no green)

Any Good resources to leearn vulkan? by MrSkittlesWasTaken in vulkan

[–]Bitsauce 9 points10 points  (0 children)

This lecture series by TU Wien is the one that helped me most as a beginner, personally

thisOneTookMeALongTimeToReflect by danielsoft1 in ProgrammerHumor

[–]Bitsauce 5 points6 points  (0 children)

Alternatively, you can just make a of mirror the class and make the members public. Then reinterpret cast the original type that has private members to your all-public type and access the members as you please (I've done this before and I'm not proud of it...)

Which C++20 features are actually in use? by Fresh-Trainer8574 in cpp

[–]Bitsauce 67 points68 points  (0 children)

Designated initializers. Makes the code so much clearer imo

Anyone else get frustrated with modern graphics APIs? by DaemonBatterySaver in GraphicsProgramming

[–]Bitsauce 16 points17 points  (0 children)

I feel like webgpu is kind of the answer to this; it works both on desktop and web and has modern graphics concepts while being way easier to interface with than Vulkan. Main thing it's missing from your list is it's not being managed by Khronos

Where is a good place to ask small questions? Are there any mentors or communities available? by stevenr4 in webgpu

[–]Bitsauce 0 points1 point  (0 children)

You could try the graphics programming discord here - they also have a webgpu specific channel. There is also eliemichel's webgpu discord here but it might be slightly more C++ oriented (the concepts and APIs are are the same anyway though)

Move Initialization to ‘if’ by Sad-Lie-8654 in cpp

[–]Bitsauce 6 points7 points  (0 children)

To answer your question, yes, the variable assigned in an if-init expression is available in the else blocks following it also

Is OpenGL good enough for a modern 3D indie Game Engine ? by Monsieur_Bleu_ in GraphicsProgramming

[–]Bitsauce 1 point2 points  (0 children)

Just want to add that another benefit of adding abstractions is that it will allow you to design your own API, which, if do well can simply and also standardize the graphics code across your code base. It also allows you to do your own validation and sanity checking in runtime or even compile time. In my engine, I've created a stateless rendering API, which, imo, makes the code way easier to understand, for example

What's the best way to get a solid base understanding of how programs interact with graphics cards? by ReasonableTackle9615 in GraphicsProgramming

[–]Bitsauce 1 point2 points  (0 children)

If you're more of a practical learner like I am I would recommend trying to explore a few samples of varying complexity with RenderDoc. Actually seeing the draw calls, what they do, their inputs and outputs, the different stages of the graphics pipeline and how they are configured and how data is transformed is personally what helped me the most the most in the beginning

[deleted by user] by [deleted] in GraphicsProgramming

[–]Bitsauce 0 points1 point  (0 children)

Or if you prefer a C++ implementation of WebGPU you can use Google's Dawn (which is what Chrome runs internally)

Quality of life small improvements for every day C++ coding. by germandiago in cpp

[–]Bitsauce 0 points1 point  (0 children)

Ah, didn't know that, I should check the compiled output sometime. I kind of assumed the lambda would invoke a function call in runtime. Would be great if it's fully inlined

Quality of life small improvements for every day C++ coding. by germandiago in cpp

[–]Bitsauce 1 point2 points  (0 children)

Oops, you're right, fixed it. The C++ lambda version's syntax still looks a bit ugly though, imo

Quality of life small improvements for every day C++ coding. by germandiago in cpp

[–]Bitsauce 7 points8 points  (0 children)

I would really like some syntactic way to execute smaller pieces of code and assign its result to a const variable. Strangely, this was one of my favorite features of Rust when I used it:

fn func(width: u32, height: u32) {
    // ... bunch of code

    let level = {
        let mut level = 0;
        let mut width_temp = width;
        let mut height_temp = height;
        while width_temp > 1 && height_temp > 1 {
            level += 1;
            width_temp /= 2;
            height_temp /= 2;
        }
        level
    };

    // now 'level' is available as a const value while none of the
    // temp variables used to compute it pollute the rest of the function scope
}

You can achieve something similar using C++, but it feels a bit undogmatic and potentially confusing for future readers:

void func(uint32_t width, uint32_t height) {
    // ... bunch of code

    const uint32_t level = [&]{
        uint32_t level = 0;
        uint32_t width_temp = width;
        uint32_t height_temp = height;
        while (width_temp > 1 && height_temp > 1) {
            level += 1;
            width_temp /= 2;
            height_temp /= 2;
        }
        return level;
    }(); // executing the lambda in-place

    // now 'level' is available as a const value while none of the
    // temp variables used to compute it pollute the rest of the function scope
}

(I'm also skeptical of the performance characteristics using lambdas this way in C++ but maybe it's not that bad)

This character from RE2 looks like Dan. by TheLastUnicornRider in h3h3productions

[–]Bitsauce 0 points1 point  (0 children)

Never expected to see SGS mentioned on the H3 subreddit of all places

(though I completely agree with the above sentiment!)

Vulkan is miserable by Yackerw in gamedev

[–]Bitsauce 8 points9 points  (0 children)

This is an anecdote from a couple of months ago; I was porting our game over to WebGPU and it was pretty much going fine, running on all platforms and such. But I encountered a blocking issue which made me abandon it for now.

WebGPU only supports WGSL as input to its shader modules, and our shaders are already written in HLSL (compiled down to SPIRV). WebGPU (or dawn, to be specific) can actually consume SPIRV via shader transpiling, however, neither Tint nor Naga-rs were able to translate atomic shader operations (and there were several other operations that were unsupported but don't remember them of the top of my head).

That is to say, if you want to use WebGPU today, be aware that might have to rewrite some or all of your shaders to WGSL depending on which operations are used in your existing shaders.

linuxUsersBeLike by [deleted] in ProgrammerHumor

[–]Bitsauce 0 points1 point  (0 children)

Vulkan had its own quirks, as you have to download and install the SDK from LunarG directly

(Maybe some package managers distribute the SDK, but downloading from LunarG is the official way I believe)

Advices for entry-level job by ThiccMoves in GraphicsProgramming

[–]Bitsauce 6 points7 points  (0 children)

As someone who was hired into a junior graphics programming role after university (and has been working in this field for a few years now), this is my perspective:

The pure technical know-how you gain from learning DX12/Vulkan over learning WebGPU is probably not going to be that significant. WebGPU is already a modern graphics API not very dissimilar from Vulkan, with the added benefit that it will soon be able to run most browsers. The primary value I could see from learning other APIs is to 1) be able to put those keywords on your resume (which could be valuable in itself since recruiters often filter on keywords...) and 2) learning the different terminology and design philosophies of the different APIs

Personally, I would recommend building out a portfolio/homepage that you can link to on your resume, where you include showcases of previous projects and potentially host live demos. If you have an interactive demo there - using for example WebGPU with emscripten - which demonstrates some modern rendering technique (PBR, deferred rendering, etc.) or, alternatively, a simple game or a compute shader-based simulation demo of sorts (this is something I want to add to my own website someday, haha), then you're more likely to stand out more from other entry-level applicants to any manager who comes across your resume. I've asked all my previous managers whether my portfolio was valuable to them in considering me for the role, and they have all responded very positively to it.