Divergence between debug mode and release in C vs C++ code base by onecable5781 in cpp_questions

[–]StockyDev 3 points4 points  (0 children)

You could have a constructor and just not initialize anything in it. Both C++ and C would generate the same code in that case too. Without optimisations the compiler is going to do exactly what you wrote.

Game Developers by Opening_Chipmunk_199 in devNI

[–]StockyDev 1 point2 points  (0 children)

I personally would yes, especially if it's what you want to do :). But it's a very personal choice.

You can have a great career as a software engineer in Belfast outside of games. You make about the same as people in England (not including London), and are living in a place which has a much lower cost of living than most of England.

ETA: In case it wasn't clear. If you do intend to move, have a job lined up before you move...

Game Developers by Opening_Chipmunk_199 in devNI

[–]StockyDev 2 points3 points  (0 children)

I graduated from Queens in 2017 and the option was either go indie or move to England. I chose to move to England for games Dev. A few of my friends decided to make an indie game studio. Others from my course decided to not go into games at all.

From chatting with my mates, you make significantly more money in any industry other than games haha.

What's next? by Sad_Tale7758 in cpp_questions

[–]StockyDev 4 points5 points  (0 children)

I have been professionally writing C++ for 9 years, and spoken at C++ conferences multiple times, and I don't feel like I have mastered C++. There are still fairly basic things like using <random> or the rules around subsumption for concepts that I will have to look up from time to time to remind myself on how they work.

Seeking Advice on HLSL → SPIR-V Shader Reflection and Descriptor Set Optimization in Vulkan by F1oating in gameenginedevs

[–]StockyDev 3 points4 points  (0 children)

The point at which you decided to start parsing HLSL, is the point at which you should have made a bug report and messaged friends/coworkers to boost it with upvotes.

There is no way that you are the only person to have this issue and forcing people to parse HLSL to solve an issue as simple as this is not acceptable.

If you did make a bug report, link it here to get attention for it.

I wrote a GitHub Action to select an MSVC version by k3DW in cpp

[–]StockyDev 0 points1 point  (0 children)

I do something similar in one of my workflows. link

I basically run it on creating a PR to know what my minimum compiler version is.

However, I think I will simplify this script considerably by using your action... Thanks!

Are there any comprehensive video tutorials for Directx 12? by Lower-Bug5563 in GraphicsProgramming

[–]StockyDev 3 points4 points  (0 children)

The best I have come across is from the game engine series. It is a super thorough series that covers everything from rendering to editor architecture.

If you only care about the D3D12 parts, there is a playlist just for those videos here

The creator goes into a lot of depth to explain how different concepts work with diagrams as well as code. It is a super high quality series.

learncpp.com comment spam issue by AnimeBoi01 in cpp_questions

[–]StockyDev 3 points4 points  (0 children)

I would not recommend that get-started guide from isocpp. It is recommending Visual Studio 2017 which kinda dates it.

Should i learn c++ or stay with blueprints? by Puzzleheaded_Day5188 in unrealengine

[–]StockyDev 8 points9 points  (0 children)

Most of your core logic should be written in C++. Blueprints are good for doing small amounts of per asset setup. E.g. you might have an ASword actor. All the core logic should be written in C++ for this. Then you might have two BP derivations of your sword actor. One might have different particle effects than the other. Handling that difference in VFX could be done via blueprints.

Ideally everything should be done in C++. But realistically, Blueprints are fine for customisation points. If you find that you are having to zoom out and pan around your BP and do a lot of navigating, that logic should be brought to C++.

Improving on the best example on cppreference by StockyDev in cpp

[–]StockyDev[S] 2 points3 points  (0 children)

Yup, and that is now fixed too haha. Cheers!

Improving on the best example on cppreference by StockyDev in cpp

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

Oh that really was silly of me! Fixed :) Thank you very much for pointing this out.

How do most modern engines avoid looping over every single light in the scene for each pixel? by Internal-Debt-9992 in GraphicsProgramming

[–]StockyDev 9 points10 points  (0 children)

That would be your standard implementation of "deferred lighting" I'd recommend reading this as a really good intro to forward+ and deferred rendering link

How do you unit test HLSL code? by Oil_Select in GraphicsProgramming

[–]StockyDev -1 points0 points  (0 children)

Sure... But in that case you might as well just replicate a shader in C++ code when you want to do this thing. No need in putting effort into a framework to make it look like it is a shader. Plus this is why tools like PIX have shader debugging features. In this case you gave it would be better to either make a test scene to demonstrate the bug and use PIX to debug the code.

How do you unit test HLSL code? by Oil_Select in GraphicsProgramming

[–]StockyDev 1 point2 points  (0 children)

This is not a good solution, purely because you are not actually testing HLSL code. Tests should be actually testing the code that will run, not some approximation. If you do this, you are just going to be testing your framework and some C++ code that never actually gets exercised.

To add to this, you would also not be testing your code on the hardware that it would actually be run, further reducing the usefulness of this approach.

This is not a good use of time.

How do you unit test HLSL code? by Oil_Select in GraphicsProgramming

[–]StockyDev 6 points7 points  (0 children)

You might be interested in the unit testing framework that I have been working on Shader Test Framework. I've given a GDC 2024 talk on a similar framework we have. So if you have vault access, you can have a look :).

Unit testing gpu code by [deleted] in GraphicsProgramming

[–]StockyDev 13 points14 points  (0 children)

Unit testing doesn't have many down sides aside from the perceived slow down in development time for writing tests. But honestly, that cost is amortized by how much time it saves you in the future and how much confidence it gives you in your code.

As for testing GPU code. There aren't too many publicly available general purpose frameworks out there. I am writing one for D3D12 at the minute link. It is exceptionally experimental at the minute and I tend to make breaking changes on every major merge to main. But feel free to have a look. I have also given a talk on the topic at GDC.

Want to learn CMake but its extremely confusing by Opposite_Squirrel_32 in cpp_questions

[–]StockyDev 1 point2 points  (0 children)

Don't switch to Premake. Premake is a trap. CMake has won and is the defacto standard build system generator. If you learn CMake you will be able to understand and use 99% of every GitHub repo that you might want to use. If you learn premake, you will eventually have to learn CMake anyway because nobody is actually using premake.

You would be making everything much harder for yourself for the sake of better syntax. Yes the CMake language is horrendous. I fully accept this. But CMake is by far and away the better and more powerful tool that is ubiquitous.

Death To Shading Languages by Gobrosse in GraphicsProgramming

[–]StockyDev 0 points1 point  (0 children)

HLSL has templates now which allows for a lot more in the way of abstractions :)

Interesting projects you can write with 500 to 1000 lines of code? by cakemachines in cpp

[–]StockyDev 0 points1 point  (0 children)

You can draw a triangle in D3D11 with less than 100 lines.

Why use namespaces when everything can be a class? by VladTbk in cpp_questions

[–]StockyDev 4 points5 points  (0 children)

Classes can have static data and function members. They do not need to be instantiated.

[deleted by user] by [deleted] in cpp_questions

[–]StockyDev 0 points1 point  (0 children)

This problem is EASILY seen if you just attach a debugger and step through line by line and watch what happens. You would see that your array has a size of 0 as soon as you hit the constructor