Thread #108586519
/gedg/ - Game and Engine Development General #342 Anonymous 04/12/26(Sun)01:13:18 No.108586519 [Reply]▶
File: based devs.jpg (330.5 KB)
330.5 KB JPG
Based devs edition
/gedg/ Wiki: https://igwiki.lyci.de/wiki//gedg/_-_Game_and_Engine_Dev_General
IRC: irc.rizon.net #/g/gedg
Progress Day: https://rentry.org/gedg-jams
/gedg/ Compendium: https://rentry.org/gedg
/agdg/: >>>/vg/agdg
Graphics Debugger: https://renderdoc.org/
Requesting Help
-Problem Description: Clearly explain your issue, providing context and relevant background information.
-Relevant Code or Content: If applicable, include relevant code, configuration, or content related to your question. Use code tags.
Previous: >>108552924
280 RepliesView Thread
>>
>>
>>
>>
>>108572666
build with address sanitizer, crashes don't exist in address sanitizer, you get an asan report instead.
Msvc is kind of useful because it has saner Debug defaults compared to gcc / clang in msbuild/cmake projects (such as enabling RTC checks). So basically if you try to access outside the bounds of a buffer, asan will always catch that (RTC sometimes catches that).
Personally I think MSVC is better than gcc or clang when it comes to C++ iterator checking (but it's the main reason msvc runs iterator code 10x slower on debug builds).
undefined behavior sanitizer is similar to RTC checks (and does other things) but it has the potential to contain false positives (and it is not supported on msvc, msvc has asan but it won't work on windows 7 because it needs new kernel features, I used VS studio 2019 in windows 7), unlike address sanitizer which should have zero false positives (but asan comes with leaksanitizer on linux, and it ALWAYS leaks for graphics applications, maybe it doesn't on AMD but I know that the nvidia driver is not the only source of false positive leaks, I personally just disable leaks ASAN_OPTION=detect_leaks=0 And you can choose to manually add the false positive dll or function to a suppression list).
If your code is leaking memory, leak sanitizer isn't very precise, and you may want to use valgrind (or on windows Dr Memory), with tracked origins.
Also valgrind and Dr Memory does 90% of the same stuff address sanitizer does, EXCEPT it wont catch stack overflows, but instead it will catch using uninitialized memory (asan won't, ubsan/RTC checks might if you are lucky).
Valgrind and dr memory are the only reason why I have a non-asan debug build, because asan will not work with valgrind/dr memory. I would prefer to just have asan + release as my only cmake presets.
>>
>>108587068
*Oh and I forgot to mention, valgrind and dr memory don't work in debuggers, and they run 100x slower than asan. So if you are using SDL, you should not be surprised to wait 1-2 minutes for your game to start, but asan will take 1 second.
>>
>>
>>
File: 1763511296262371.png (62.5 KB)
62.5 KB PNG
Einstein argued that there must be simplified explanations of nature, because God is not capricious or arbitrary. No such faith comforts the game engine developer. Much of the complexity that he must master is arbitrary complexity.
>>
>>
File: global_rules.png (94.8 KB)
94.8 KB PNG
>>108587878
stop trolling
>>
File: snailge.webm (2.6 MB)
2.6 MB WEBM
>thread almost dies on orthodox easter
/gedg/ confirmed eastern european
>>
>>
>>
>>
>>
>>
File: 1663606534379805.gif (15.6 KB)
15.6 KB GIF
>tfw shits too complex so you just wanna start over but you know you'll just end up with the same problem
>>
>>
>>
>>
>>
File: fem-46-thrull-wizard.jpg (102.2 KB)
102.2 KB JPG
I'm going to try to make an Ultima Underworld style 3d engine in Monogame for Android.
Wish me luck.
>>
File: godot-king.png (2.2 MB)
2.2 MB PNG
did anyone try this?
>>
>>
>>
>>
>>
>>
>>
>>
>>
File: vulkan-meme.png (901.7 KB)
901.7 KB PNG
>>108586519
Fuck Vulkan.
>>
>>
File: 1773538761963136.png (145.4 KB)
145.4 KB PNG
>>108590888
>heh, I'm sure this framework has a reason for being this retarded, I must just be too dumb to see it
meanwhile at framework, llc
>>
>>108591571
I was talking about SDL as in SDL3. But /sdl is like -fstack-protector for windows.
So release hardening. So that buffer overflows lead to crashes (when you reach the return address), since overflows are a source of where exploits could start.
tldr: Not really that important, and potentially obsolete because of intel cet shadow stacks.
BUT intel cet probably won't shut down your program due to an overflow, unlike /SDL, cet puts the return address onto a shadow stack, and the overflow will just keep on overflowing beyond the function stack (probably until you hit below the stack).
And CET and /SDL Only protect the return address, it's possible to overwrite a vtable or function pointer.... to protect against hijacked calls, you need cfguard on windows (BUT not on linux because cf-protection=full enables IBT which is like cfguard).
Also cet's IBT and windows cfguard are coarse solutions. clang has cfi-sanitizer which is fine grain, but it's 1000x harder to compile anything with (if you are using clang-cl, a lot of msvc's C++ library wont run... opengl GetProcAddress extensions won't work... etc). Also cfi-sanitizer will not protect DLL functions (But I assume you cant call a function that you don't import / you can't just call a random DLL address)
and /SDL is just /GS which is enabled by default and usually explicitly disabled in the release builds (AND RTC checks are required if you want finer grain checks for debugging, such as accessing 1 byte beyond fixed sized stack buffer).
And ALSR (enabled by default on windows) generally makes most exploits very annoying to do, since you need to know the address of a function before you can set it to what you want, but all it takes is a information to leak, and that 1 single leak easily leaks every single address including the addresses of all loaded DLL's, so you can't really trust ALSR. Basically the exe binary is one chunk of memory, and it's randomized by 1 offset, I think? (and the stack and heap are random).
>>
>>
>>108594738
you need to make a multiplayer server for this to matter.
and if your server is closed source, it wouldn't apply to you (you need to reverse engineer the binary to do anything).
but in short, if there was a information leak (bypass ALSR) + overwriting a buffer / return address with a payload (without crashing), you could in theory get arbitrary code execution running, and bad things can happen.
there is zero chance this would apply to anyone, it's very hard. But I would love to believe that a uncensored AI could get good enough that a script kiddie could hack a game for fun.
>>
>>
>>
>>
>>108595556
shut up
>>108595550
use raylib
>>
>>
>>
>>
>>
>>
File: vulkan.png (437.4 KB)
437.4 KB PNG
>>108595550
>>
>>
File: 1756115900720055.jpg (323.8 KB)
323.8 KB JPG
devsisters... it's so over
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
File: 1761749550025647.png (2.3 MB)
2.3 MB PNG
>>108596241
>smolbox pc gaming
>it's just a usb and an instruction manual
FUND IT
>>
>>
>>
>>
>>
>>108596562
That's the whole point of writing good code. Well designed software minimizes its resistance to reasonable changes. You also want to work on the parts on your project that are most likely to change as soon as possible, so that changes happen early on
>>
>>
>>108596261
2gb flash drives are <$2/each in bulk, you could probably find some chinese company on alibaba to hook you up with ~200 unit run for the usb with a custom decal, passable quality manual and cover, with an off-the-shelf case case solution for like... $5 dollars per unit
may come preinstalled with malware
>>
>>
>>
>>
>>
>>
>>
File: 1773770774518605.jpg (35.2 KB)
35.2 KB JPG
>>108597362
>>
>>
>>
>>
File: 1745276883910182.mp4 (3.8 MB)
3.8 MB MP4
I got gravity, friction, and collisions implemented. Vulkan is an utter bitch to set up, but it was worth it. I also found a love for making my own tooling, especially for debugging. Fuck dependencies.
>>
File: 1563761847308.gif (497.3 KB)
497.3 KB GIF
claude is really fucking good, guys. I'm using it to do all the fucking busy work that I don't want to do and it gets it done almost perfectly every time, creating tests as it goes. I'm a little worried about my easy-street programming job, but probably more likely is that I'm just the last one through the door.
>>
>>
>>
>>
>>
>>
>>
>>108599437
>>108599447
Thank you for the insight!
>>
>>
>>108599468
MCP servers are largely just ways to burn extra tokens achieving the same amount of work. And anything selling itself as a collection of MCPs is usually ass, at this point in time. The situation could change eventually but for now the simple way is the best way
>>
>>
>>
>>
>>
>>
>>
>>
>>
https://docs.vulkan.org/tutorial/latest/00_Introduction.html or https://vkguide.dev/? I am experienced with C++ if that matters
>>
>>
>>108600717
Herd mentality. Established studios like Blizzard use C++, therefore they too must use C++.
>>108602077
Too lazy to look, are either of them 1.3+? Either way you probably want to just make a throwaway project, follow either or both of those to the point where you have a triangle, and then keep going on your own. I learned following vk-guide and I had to go back and fix retarded design decisions multiple times.
>>
>>
My Game Engine that I have been working on for over 2 months just got forked by SumRandDude.
This is my original Repo: https://github.com/Puppyrjcw/Nebrix
This is theirs: https://github.com/SumRandDude/Nebrix
I specifically said in the license:
© 2026 Nebrix. All rights reserved.
What should I do?
>>
>>
>>
>>
>>
>>
>>108603691
>>108603711
>>108603716
Wow you people are truly something, I expect some support here since you are all supposed to be fellow engidevs guess I was wrong.
>>
>>
>>
>>108603640
Nothing unless you have money to waste. If he actually does something with it and/or makes money, then he gets legally raped as he doesn't own the code.
And it shouldn't be copyrighted to the project name, retard. Copyright should be to something identifying you unless you have a company or product you own.
But you're also a retarded nigger for putting it up on goyhub and then whining that some bot account forked it.
>>
>>108603640
>>108603667
Why was your repo public? Other than contacting him and asking him to delete it, the only recourse is a lawyer.
>>
>>
>>
>>108603752
I'll get a lawyer and send a C&D, and escalate if needed.
>>108603767
I wanted to show my work.
>>108603933
Already made it private, good luck loser.
>>
File: meds.jpg (32.6 KB)
32.6 KB JPG
>>108603954
>I'm going to pay for a lawyer and send a C&D to Sanjay Kupoor
>>
>>
>>
>>
>>
>>
File: SmartSelect_20260414_092623_Brave.jpg (28.9 KB)
28.9 KB JPG
Your game engine will never have as many forks as mine ha ha ha ha!
>>
File: red eye apu.png (202.1 KB)
202.1 KB PNG
How do you vibebros do it?
Started working on a new game using Flecs instead of rolling my own ecs (again). Ran into a few snags learning the C API syntax, and decided to try asking the Github Copilot for help. It was able to identify the problem area correctly more often than not (maybe 70-30), but the code suggestions it wrote flat out didn't work and I had to fix the problems myself.
Is AI only able to write generic boilerplate? It would be a great debugging tool just for finding the problem code if it wasn't wrong about the problem so often
>>
>>
File: 1768194977805278.jpg (72 KB)
72 KB JPG
>>108605085
I usually open claude on my 2nd monitor and ask it any questions I have regarding whatever it is im learning, I almost never ask it for code in fact a lot of times I have to speficially tell it to not spit out any code and just explain shit to me. The exception is when Im debugging at this point my debugging experience is just posting the code on claude and telling it to find the issue and very often it will, the times it doesnt I can usually find it myself
>>
>>
File: 1657278910215.jpg (64.5 KB)
64.5 KB JPG
Im vibecoding lgbtq oriented slop games to defeat the gays.
You welcome for my service, fags.
>>
File: 1771719842474680.jpg (62.5 KB)
62.5 KB JPG
>>108605426
>vibecoding
Funny you mention this now because I just had Claude 4.6 Opus with high effort thinking completely miss that a continue in a while loop would skip a vital increment 4 lines down.
>getting all children of a parent recursively (meaning the children of the children as well)
>while loop with a cursor, iterate over the inheritance structure and add to the array of total children
>if this node has no children, increment the cursor and continue
>if not add the children, then increment the cursor for next pass
>Claude tells me to remove the increment before the continue because it's already at the bottom
>"Leave it alone. My mistake." when I point out that the continue 4 lines above will skip it and enter an endless loop (cursor never increments on an empty node and will keep early-continuing back into itself forever)
I guess the next prompt would have caught it and fixed it but damn, awful way to program.
>>
>>
are there any real arguments against using a software renderer in 2026? it seems to me that all the arguments made are under the assumption you want to make AAA gaytraced UE5 tier slop, what if i just want to make a simple building block game or some pixelshit? is it really necessary to use the gpu just because its there?
>>
File: gJxxUk.gif (3.3 MB)
3.3 MB GIF
>>108605506
It sounds like you wanna suck on them rat-tits you lil creep. I bet your mom had rat-tits LOL. Thats how Im going to call you now you lil nerd, rat-tits.
>>
>>
>>
>>
>>108605313
>>108605754
Thanks for the genuine responses. I think I'll stick to writing it myself and save the AI for particularly puzzling bugs
>>
File: 32354623r423r43e2r332352.jpg (242.9 KB)
242.9 KB JPG
>>108603640
is this real?
I bet you forked it yourself to make it seem popular. why would anyone want to fork your slop-code, sorry, I mean 'engine'???
please stop trolling gedg is serious business. thank you.
>>
>>
File: where_the_beetle_people_fight_mole_people.png (1.5 MB)
1.5 MB PNG
C and Vulkan. Raymarched Voxels SVO via the Fragment shader.
It's all coming together.
>>
File: DSC0002325464.jpg (39.4 KB)
39.4 KB JPG
>>108606139
did you make the landscape resembling to a post-op trans vagina on purpose?
>>
>>
>>108605085
I use Claude for:
>proofreading
>assisting in bug hunting
>explaining idiomatic stuff that I'm not familiar with
>game content stuff
I don't use it for writing code. Note, ASSISTING in bug hunting, you still have to be able to observe what's going wrong and help coax it in the right direction, it's good at reading a big ol chunk of code and catching errors that your eyes might glaze over but it's bad at actually reasoning about the problem. You reason about what's wrong, you identify likely problem blocks of code, you feed them to Claude telling it what to look for. That's how you get effective assistance.
>>
>>
>>108605987
so your argument is "use it because it is there"? why would i go through the trouble of learning a graphics api if all im making is a pixel shit game? the original doom ran entirely on the cpu. so whats the point of using the gpu to make a doom clone when cpus today are far superior?
>>
>>
>>
>>
>>
File: mountain_with_some_sand.png (1.1 MB)
1.1 MB PNG
Some more Tergain from my Raymarched Voxel ( Fragment Shader based ) engine written in C and using Vulkan. I do intend to expand it to more rendering backends such as Metal, NVN ( Nintendo Switch), WebGPU, WebGL2, OpenGL, and Software.
>>
>>
>>
>>
>>
>>108606758
>especially when you've described in sufficient details the symptoms and where the problem is likely to be.
at that point you are doing all the effort of troubleshooting. aifags are terminally retarded.
>>
>>
>>
>>
>>
>>
>>
anyone here used sokol before? How can you live reload shaders without having to rely on the stupid shader compiler? Its really annoying to compile everything to a separate file and then load at runtime and write a wrapper name. Moved on from raylib because everyone said its dogshit but I feel like sokol isn't the solution...
>>
>>108606603
>I don't see a lot of post op trans vaginas
lies
>>
>>108607150
I also tell everyone how easy it is to grow vegetables, plants and fruits but I never done it myself.
I got a reddit account where I pretend to be a 60 year old carpenter, giving advice on woodworking techniques or problems and I am a beloved member of the community. I never touched a single woodworking tool in my life.
>>
>>
>>
>>
>>
>>
>>
File: 1775817625230660.jpg (360.5 KB)
360.5 KB JPG
>>108608176
>Copyright (c) 2026 Nebrix. All rights reserved.
>
>This software is proprietary and confidential.
>No permission is granted to use, copy, modify, or distribute this software
>or any part of it without explicit written permission from the author.
>>
File: 1755907022810019.jpg (13.3 KB)
13.3 KB JPG
>>108608176
looking good
strong gmi energy there
>>
>>
>>
>>
>>
>>
>>
>>
Is there any reason to use or not use vertex shading over face shading? I'm trying to implement lighting in OpenGL.
What's mostly on my mind is the lighting on jagged angular models like buildings. It wouldn't benefit from the smoothed lighting of vertex shading. Face shading seems harder to implement at the moment though.
LearnOpenGL has the example cube without an index array, so there are 36 vertices so that each of them can have their own normals that point the right direction.
How does everyone else do it? Just have overlapping vertices on edges or something?
>>
Is there any reason to use or not use vertex shading over face shading? I'm trying to implement lighting in OpenGL.
What's mostly on my mind is the lighting on jagged angular models like buildings. It wouldn't benefit from the smoothed lighting of vertex shading. Face shading seems harder to implement at the moment though.
LearnOpenGL has the example cube without an index array, so there are 36 vertices so that each of them can have their own normals that point the right direction.
How does everyone else do it? Just have overlapping vertices on edges or something?
>>
>>
>>
File: 928d8a9a5712414211123012328.jpg (118 KB)
118 KB JPG
Serious answers only please: Why did he do it?
I mean why would you feel to need to say that openly and why the hell would you do it twice, because you felt the need the correct the term 'tranny' to 'transexual woman'
Im now 50% sure he is a tranny and 99% sure he is gay.
>>
File: af7aa0d86b7d85a1d36cfaac0452dc62.jpg (11.7 KB)
11.7 KB JPG
>>108610412
>Why did he do it?
>he is gay
I think you got the answer on your own already
>>
File: sonlidrad.webm (3.9 MB)
3.9 MB WEBM
>>
>>
>>108610412
he's saying
>I have nothing against trannies
that's fine. typical behaviour.
>if the woman I love took on the form of a tranny, I'd still love her
>later corrected to transexual woman
so, he is saying that if the woman (XX) he loves took on the form (appearance) of a transexual woman (XY) he would still love her.
He's not gay, since the woman he loves is an XX sexual female who is taking on the appearance of an XY sexual man who is taking on the appearance of their idea of a woman.
So, he is saying
>The female XX woman I love could get surgery that would give her a dick, then get another surgery to remove it, and I'd still love her.
>>
>>108610736
Supposed to be a scanner (vaguely based on lidar/sonar) that maps the environment each pulse, so you have to navigate via series of snapshots instead of seeing the world in real time. Pain in the ass to implement tho.
>>
>>
>>
>>
>>
>>
File: Belly_Hills.png (1.1 MB)
1.1 MB PNG
Hills of Chunk. I already see the 3D Gnorfs.
It's all coming together.
>>
>>
>>
>>
>>
>>
>>
>>
>>
File: file.png (482.5 KB)
482.5 KB PNG
>>108586519
i've got some textured meshes loaded up in vulkan but i want to scale them to roughly the same size automatically and position them far apart enough not to clip into each other automatically. basically i need to make flexbox for my meshes. any reading material or videos that can point me in the right direction? i can't find anything online about this sort of thing.
>>
>>
>>108605458
I have similar experiences you have to back and forth with multiple models or get a fresh context to re-examine stuff. It's not the one-shot they claim it is. I'm still doing most the work. It actually does miss stuff or convince itself something is right that's wrong.
>>
>>108617743
What >>108618233 said. This is why I don't want to use libraries except where it is really needed, I assume you used some importer that does everything for you so you don't really know what's happening under the hood, not much different from using Unity or Unreal.
The short answer is: you would calculate the AABBs when importing a mesh by getting the biggest and smallest values for each axis as you import the vertices. Once you have two AABBs you want to be equal, it's trivial to find what you need to multiply one to make it equal to the other in size, and do the same to your mesh transform.
>>
>>
>>108618351
>>108618233
how can i learn more about the details of meshes like this? almost everything online is just copy-paste tier tutorials and doesn't really go into detail.
>>
>>
>>
File: qJFnmh5F.png (9.1 KB)
9.1 KB PNG
I've spent roughly a year developing my game. Coding wise, it's basically ready to go, but I still can't find a fucking artist to make my game.
WHAT IN THE ACTUAL FUCK? Do artists really hate money? It's the third artist this month I try to "hire" and he suddenly stopped answering me after the demo. FUCK YOU!
>muh, you're paying bad
Is €40/hour really bad just to draw shit on a screen? I don't think so. That's why the indie market will flood with AI slop, we simply can't take artists' arrogance anymore.
>>
>>
>>108619443
>where are you looking for artists?
X™ (formerly Twitter™) and Pixiv. I basically see some designs then look for contacts. We usually have some nice conversations, then we schedule a demo (when they respond (very rare though)).
>are you actually paying them or just promising future pay?
I pay for the demo so they don't feel like I'm looking for feedback for free. When I finish demoing the game, I ask them if that's the kind of game they're willing to design, they always answer "yes". Then I ask for an estimate budget, most of the times they ask less than I'm willing to pay. Then they tell me to wait for a time slot and a return. They never return.
Some stuff about me that maybe feels off:
>solo developer
>zero games launched
>xwitter profile with less than 100 followers
>no real photo of me on the internet
I don't think they think I'm a scammer, I'm willing to pay in advance. It's not a "I promise to pay when the game starts to sell". I have the fucking money, I just need a fucking artist.
>>
>>
>>
>>
>>
>>108619374
>>108619576
why don't you enlighten us then, how do you calculate bounding boxes from vertices?
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
File: 1751415894498621.jpg (1.2 MB)
1.2 MB JPG
>>108620120
>>
>>
>>108619691
you divide the task into subtasks map it into thread groups/weaves or whatever its called and then make group compare. Its quite simple literally first thing you learn when reading up on radix sort for gpu.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>108619091
>>108619571
>>108619590
I told you in >>108618351: loop all the vertices, find the min and max positions for each axis, you get 6 floats that you stuff into a min and max vector, done you now have min and max points that define your AABB.
You can do this any time but mesh import is the most apt if your AABBs never change since you're already reading vertices and (probably) doing so in a loading screen where it won't cause a hitch.
>>
>>108619601
>>108619604
>>108619624
>>108619681
>>108619694
I think you guys are massively overcomplicating this. Either do it behind a loading screen when loading in the meshes, or simply serialize the AABB either by saving it to a file (or into the same file as your mesh, if your format supports it) from your DCC, at compile time, or at startup (check for new mesh files and/or hash changes I guess).
>>108620892
>>108620906
You absolutely do, I run my culling on the GPU for example, as well as other compute. Doesn't need to be a fully GPU driven renderer, you start needing AABBs on the GPU pretty quickly.
>>
>>
>>108621225
Most likely, but it's not much of an overcomplication. You have to cull somewhere and dumping some data into a buffer or two and doing that logic in a compute shader is not much more work than doing it on the CPU. You already need camera data on the GPU, so the only real extra step is hoisting the AABBs to GPU memory.
Thank God for Vulkan 1.3+, just dump data into buffers and read, it's almost like normal, sane programming.
>>
>>
>>
>>108621269
Which I do. Not denying it was case of me thinking it would be cool to try and to learn it more than needing it, but at the same time a lot of that work is just shifted work you'd have to do somewhere anyway. The main complexity comes from rendering APIs having been historically a pain in the ass to work with. If you're just dumping stuff into buffers it's not *too* bad, even if it's more fiddling that if you did it on the CPU.
>>
All of my game ideas are way too big. I know that I should make smaller games just to actually finish something for once and move my way up to larger ones, but I don't know what to make.
What were some of your favorite beginner projects you made? That might help me come up with some ideas.
Or, should I even bother, and just keep trudging along making my big game that I'll put up on steam for $5, and probably not sell much?
>>
>>
>>108621360
snake
tetris
rubic cube
falling sand game
tower defense
raymarching+marble game inspired by marblemarcher very nice intro to graphics programming
synths
thats pretty much it afterwards you might be more motivated or procrastinate even more. I did the latter.
>>
>>
>>
File: 1775125142652006.jpg (120.9 KB)
120.9 KB JPG
>>108621569
>insanely hard
>>
>>108619830
He's talking of the fact that cache locality, branch prediction, SIMD, etc., are much more important when it comes to performance, with big-O being pretty meaningless in a lot of the cases to the point you'd often use algorithms with higher big-O (e.g., pineda instead of scanline). You would know this if you actually developed games.
>>
>>
>>108619826
>>108621630
>>108621717
I fucking hate Big O, doesn't help even some seniors don't know what it is.
>oh an unordered_map is O1 so that's good for hot paths
No, that's not how it works at all, Big O just tells you how it grows and even then it doesn't do so well because it takes only the fastest growing term (n^2 in n^2 + n*50545145) since it's meant to really be considered as n approaches infinity. Says nothing about the actual time an operation takes (e.g. the overhead of a unordered_map lookup).
>>
>>
>>
>>
>>
>>
File: 1749083296036167.jpg (20.6 KB)
20.6 KB JPG
>>108622089
>next goal: 4.7e26 gallons of semen
>>
just watched chandler carruth's talk on zero-cost abstractions. turns out unique ptr isn't zero cost @ runtime. is there any feature i can use in c++ that doesn't have some gotcha or edge case I need to worry about? Is c++ actually better than C in any way or is it just used b/c every one else already uses it?
also, I am considering going with SDL GPU, but its stuck at vulkan 1.0 because it abstracts over metal. How much better is vulkan 1.3+ compared to 1.0? I do actually want to ship on mac and iOS.
>>
>>108622443
You don't need to worry about the cost of unique pointers, at all
As a beginner don't watch opinionated talks about shit because they will just fill your head with nonsense, focus on getting experience
>>
>>108622443
m8 it's just a pointer with copy and move deleted, if your library can't provide that at 0 cost then that's a (You) problem
>b-but it has to actually call the destructor!!!
shit gets inlined with any optimization enabled and then it's literally just the exact same delete call you'd be doing yourself anyways
>>
>>108622443
I'd recommend just looking at the generated assembly yourself, std::unique_ptr is the kind of class that just turns into compiler hints about its usage and compiles down to identical assembly to a naked pointer. There's no reference counting or anything going on. Are you sure you weren't watching a video on some deprecated feature like auto_ptr or one of those old core guideline library implementations of features before they were finalized?
There's also no rule saying you can't use naked pointers in C++. I mean, it's a stupid idea that's going to bite you in the ass and create a lot of code bloat, but it's your project.
>>
>>108621717
The most basic iteration in a game engine is triangle rasterization, and it uses Pineda instead of scanline. Pineda has much higher big-O complexity. Sorry, but your undergrad algorithms course is not very useful when it comes to making actual software.
>>
>>