[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


Janitor application acceptance emails are being sent out. Please remember to check your spam box!


[Advertise on 4chan]


File: DSCF0103_preview.jpg (157 KB, 1280x960)
157 KB
157 KB JPG
DirectX 11 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
Render bugs: 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.
>>
Implemented collision detection with SAT
>>
File: tmp.webm (1 MB, 640x360)
1 MB
1 MB WEBM
I implemented some point lights. no shadows yet though.
>>
>AI is a thing now
>all of a sudden enginekeks are posting decent progress
Very suspicious. What happened to building it yourself?
>>
>>107156256
i still enjoy programming without llms, so my lights are done without llm assistance.
i guess someone could vibe it and it would take them way less time, but I don't care.
>>
What is the best 3d collision library in C? I heard bullet is C++ and I cannot find any other.
Except if bullet has bindings for C
>>
File: 1762726079818.png (959 KB, 1440x1080)
959 KB
959 KB PNG
How can I do these retro looking lights in OpenGL, like the ones from original Majoras Mask?
>>
File: mm-rosa-sisters.gif (3.17 MB, 480x270)
3.17 MB
3.17 MB GIF
>>107156882
This one is better visible.
>>
>>107156835
Haven't used it myself, but I heard good things about Jolt. It's written in C++ has interfaces bindings for C.
https://github.com/jrouwe/JoltPhysics?tab=readme-ov-file#bindings-for-other-languages
It's quite the big package, but physics libraries usually need to cover lots of things
>>
File: 1762726575064.png (56 KB, 684x176)
56 KB
56 KB PNG
>>107156910
Isn't Jolt very new and doesn't support a lot of things?
>>
>>107156835
Write your own. https://gamephysicsweekend.github.io
>>
File: 1762657206647785.jpg (8 KB, 229x250)
8 KB
8 KB JPG
Why do all tutorials for Vulkan STILL treat the normal OpenGL/Vulkan1.0 way of doing things as the standard? It's not easier, it's not more intuitive, most features in Vulkan since 1.0 have been moving it towards being more of a normal programming language instead of some esoteric autistic cult thing like graphics APIs used to be, but every fucking tutorial still assumes you're some retard entrenched in 20 years of OpenGL work who can't think in more sane patterns (which must be rare considering they must then be unable to do "normal", non-graphics programming).

At the very least using buffers (and buffer addresses) for as much as possible should be standard. Honestly, bindless should be as well.
>>
>>107156886
Vertex colors. Northern Journey did it and it looks pretty good.
>>
>>107157309
If you know better than the tutorials why are you even following them you idiot?
>>
>>107157309
i agree. not having to worry about e.g. descriptors and bindings simplifies so many things and makes vulkan more approachable as a newbie.
opengl was in a similar situtation with many resources being available introducing opengl 1 and 2 as the way of doing things. Those were the tutorials people found first, so that's what most people learned. Way fewer tutorials were written for opengl 3 (until learnopengl.com changed that at least), and even fewer exist with opengl 4 in mind.
vulkan still carries some historical baggage because of how the hardware got to where it is today. And when new tutorials are written for newer versions, I think people often still want to point out the evolution of the hardware and api's. Sometimes knowing about that can explain why certain things are the way they are today, but often it's just unnecessary detail .
>>
Managed to take 30% off RTree querying time, though for 2 dimensions version only. With this spatial index autism can come to an end.
>>
>>107157372
Who said I'm following them? I did follow one initially but bailed after I got the basics.
>>107157448
Understandable but hopefully tutorials will update to more modern Vulkan methods instead of teaching people outdated and arcane ways.
>>
>>107157363
does that mean that I will have to split large flat surfaces into multiple quads to work?
>>
>>107158068
yes
>>
File: 1587331091980.jpg (59 KB, 655x527)
59 KB
59 KB JPG
>>107156256
I built my engine before LLMs
>>
Update from >>106889917
they uploaded the 25.3.0-rc4 release oh github and it supports GL_EXT_mesh_shader on zink and I does work (at least the feature appears, I have not run any code, just checking if the extension exists)
I wonder what the differences it has compareed to GL_NV_mesh_shaders, or what type of performance it has.
And this could be used to give mesh shaders for opengl on AMD and intel GPU's (but vulkan has had cross vendor mesh shaders for 3 years).
>>
File: Kuwahara.png (2.41 MB, 1920x1080)
2.41 MB
2.41 MB PNG
>>107155727
The
>previous thread
>>107136078
had mention of Kuwahara filters. I was messing about in Blender and noticed a Kuwahara compositor node.
>Actually I wanted to see what 'temporal distortion' would look like applied to a video but there seems to be no reasonable way to do this in Blender... so this is just noise in screen space rather than in time...
>>
>>107156256
It just took a while to build the foundations
>>
HEY! What were the technologies behind Windows XP era games? I'm interested in XP era game development technologies.
>>
>>107160338
same as the technologies behind Windows 10 and 11 games
>>
>>107160338
it's sometimes funny to see how much has changed since then.
XP released in 2001, so you'd have visual studio 6, c++ 98, directx 8 or opengl 1 (a little later also directx9 and opengl 2). renderware was a big graphics engine then, but more for console i think.
PC's were typically still single threaded back then. amd and intel released their first dual core in 2005/2006.
>>
>>107160816
What about networking side of things?
>>
>>107160964
Do you think internet protocols have changed since then?
>>
>>107155894
now just implement collision response.
how hard could it be :)
>>
File: john_doom2_preview.jpg (80 KB, 732x462)
80 KB
80 KB JPG
>>107161921
It has collision response! Very basic "collide and slide". Not going for a full physics simulation, just enough to do basic 3D games (interact with floors and walls, but everything else is just an AABB entity). Basically quake-like physics
>>
>>107156433
Great mindset. Congrats, anon, glad I'm not alone
>>
Did you remember to launder your pointers, /gedg/?
>>
If I have 3 vertices of a triangle, how can i scale them up or down like this while keeping a common distance between the sides/verts of the new triangle and the old one? i dont think simply multiplying the coordinates by some common factor will achieve this, right?
>>
File: 1762485074643350.jpg (15 KB, 256x248)
15 KB
15 KB JPG
FUCK TRUETYPE FONT RENDERING
>>
>>107164684
Barycentric coordinates?
>>
>>107164684
haven't completely thought it through if this is correct, but i think you could compute the new points by offsetting them from the opposite edge of the original triangle.
- take the midpoint m of the edge P1 - P2.
- compute the vector v from that midpoint m to P3.
- scale the length of the vector v based on your input factor. that should give you your new point P3' of the scaled triangle.
repeat for the other 2 edges. to get P1' and P2'.
>>
>>107155894
dumb question but what is SAT?
>>
File: tegaki.png (12 KB, 400x400)
12 KB
12 KB PNG
>>107164850
Separating axis theorem.
>>
>>107157309
>Spends all day seething at demo code
>No, I'm smarter than you
>Sees GPU code being forced to use slow paths over optimized classic code
>Nuhuh, everything should be bindless
>I know better than all the GPU and OS vendors that say it probably doesnt matter
>I know better than all the devs that said push is actually better
>I know better than all the benchmarks that show even the shittiest D3D9 and 11 codebases BTFOing crunch-hell 12 backends
>...because reddit told me so
>ackusally muh gpu pointers
>...*acks in amd abstraction hell that doesnt has never accurately described desktop silicon*
Go back, faggot. Repeating the abandoned talking points of a marketer as a greasy geek isn't smart or cool.
>>
>>107155727
How come suddenly there's lots of anons doing 3D graphics?
>>
>>107165035
Speaking for myself and also all the other anons, autumn induces panic at a biological level that causes progress to get done.
>>
>>107165070
that or maybe it's not shabbat currently
>>
>>107164684
That might be a tough one. You might need to offset a point from each wall by normal times distance and cast rays to find intersections between the offset lines going through the new points. That should work but maybe if you crunch the equations you might simplify it.
>>
>>107165029
cont:

>>107157448
>fixed function opengl1 and 2 is harder than modern apis
>something something
>>vulkan still carries some historical baggage because of how the hardware got to where it is today
>d3d12/mantle class hardware enforces baggage onto d3d12/rebranded-mantle v0.0.4-we-removed-some-amd-retardations
>hardware and the pipeline is so different now
>thats why amd is continues to be a plague
>STOP ASKING ABOUT HOW MUCH SIMPLIER THINGS WERE
>JUSE USE THE LATEST API
>HARDWARE (of pretty much the same feature level) HAS EVOLVED SO MUCH


This is really is a nodev zoomer cope thread, isnt it?
>>
"This is really is a nodev zoomer cope thread, isnt it?"

>>107165100
>>107164684
>>107164738
>>107164821
Answer: yes, yes it fucking is. 4 anons in and apparently we haven't even figured out common model translation matrices yet.

"bbbut the W component after applying projection isn't going to be right. a real tough one for sure. time to 'offset a point from each wall, something, something, raycast. youll have to crunch the equations and simplify it' "

You faggots will never be real programmers, holy shit. I've seen less levels of larp and cope from webshitters.
>>
File: 2.jpg (42 KB, 645x968)
42 KB
42 KB JPG
>>107155727
man I thought this thread kept dying cause I just searched the catalog for "graphics engine"

anyways, i've spent the last week trying to get a mental picture of how transformation matrices interact with eachother and I still don't have one, like I can memorize formulas and orders of multiplication but I want an intuitive understanding of them
>>
>>107164684
multiply an identity matrix by a vec4(x,y,z,1) where x,y,z are all the same value, thats your scale matrix
>>
>>107165257
https://youtu.be/1z1S2kQKXDs

cem is the goat for explaining CG stuff. The TLDR is that you combine matrices together to represent combined transformations. The Model View Proj is the main thing you need to know. Where model = transformation of individual model, view = the "camera" in the scene, there is no such thing as a camera in graphics so what you actually do is move everything away from the origin to simulate a camera "moving", and projection of course is the matrix that makes far away objects small and upclose objects big
>>
>>107165338
bookmarked thanks, I'll watch it tomorrow once my brain is back
>>
>>107165029
>>107165144
Take your meds schizo retard, I never even mentioned performance. It's not about performance, it's about it working more like "normal" programming with pointers and memory instead of the retarded arcane bullshit graphics APIs were until quite recently.

Not my fault you're a faggot retard who wants to cling onto what he knows because he's afraid "the others" are going to "catch up" or something.
>>
>>107164821
i'll give this one a go
>>107165231
now say it again without crying
>>
>>107165394
brother I must warn you, you're embarking on an incredibly stupid journey if you try to implement whatever it is that anon cooked up
>>
>>107165434
unironically would like to hear your method
>>
>>107165453
read about transformation matrices + I already gave you my method >>107165306
>>
File: file.png (181 KB, 1444x928)
181 KB
181 KB PNG
infinite grids are pretty cool
>>
>>107164684
just multiply the coordinates lol how stupid can you be?
>>
File: macaroni.png (672 KB, 1200x1500)
672 KB
672 KB PNG
I've noticed that a lot of game tutorials teach game object classes like this:

class GameObject {
public:
GameObject() {
this.m_image = loadImage("myPicture.png");
}
void update(float dt) {
if(keyDown(space)) {
jump(); // or something
}
}
void draw() {
m_image.draw(m_pos);
}

Image m_image;
}


i.e, the 'draw' function calls whatever functions are required to put pixels on the screen, usually immediately, but sometimes with some kind of command list or render queue (for sorting, or calling specific pipelines).

This seems to place a dependency between where you store your game objects and the order that you draw them in.

With physics engines, you often instantiate some kind of "actor" object and then update the state of that actor. The physics scene then integrates (updates) once per tick, but the storage of the actor is opaque to the game object (i.e, the physics state is decoupled from the game state).

It seems to me that the logical next step would be to separate rendering state from game state. So instead, you might have something like this:


class GameObject {
GameObject(Renderer& renderer) {
//loading an image adds some new state to a game object renderer pipeline
m_image = renderer.gameObjectPipeline.loadImage("image.png");
}

update() {
if(keyDown(space)) {
jump();
}
m_image.pos = m_pos; // update render state instead of calling render commands
}
}


This lets you separate the logic of rendering from the logic of the game. I think I've seen some javascript game libraries like Phaser do this, but I rarely see game dev tutorials explore this more declarative style
>>
File: dilation-inside.png (6 KB, 317x316)
6 KB
6 KB PNG
>>107166223
>while keeping a common distance between the sides/verts
thanks retard, this is what happens when you merely multiply the coords by some scale factor. it would then have to be translated, and again i'm trying to do this based on some arbitrary distance between the old and new tri's edges and points, and keep it consistent all the way around. i am NOT merely trying to scale a triangle by some ratio.
>>
>>107166308
the way you're suggesting is how most games do it
>>
>>107166353
I guess I just never see it documented anywhere. It makes sense, thinking about it, and I've seen other engines do it. I just never see articles or tutorials do it
>>
>>107155727
DirectX 11 sucks ass bros. why do game devs still use it in 2025?
>>
>>107166473
DirectX 11 is literally the most ergonomic 3D graphics API available. DX12 and Vulkan are much more convoluted than DX11, OpenGL passes stupid integer handles everywhere and Metal requires you to use a macbook (and I would rather give my dad a blowjob than use an apple product)
>>
>>107166333
you need to translate the triangle so its centroid sits at the origin, scale and then translate back
>>
File: 1727607523888.jpg (274 KB, 1595x821)
274 KB
274 KB JPG
>>107166529
translation layers are faster than native dx11 now
>>
>>107166616
But those APIs all fucking suck compared to DX11
>>
>>107166651
dx11 cant even do raytracing. dx12 and vulkan can. with dx11 you're at the mercy of IHVs to debug shit. with dx12/vulkan its all on the developer.
>>
>>107166692
Raytracing is retarded
>>
>>107166529
do people actually hobbydev with directx? I was under the impression the only people working with it are wagies cause why else would touch windows shit
>>
>>107166723
DX is better to work with than OpenGL/Vulkan it just has less documentation
>>
>>107166692
raytracing is a meme anyway, at least say that those 2 can me more customized
>>
>>107166573
yours sounds right but i'll have to check thanks
>>107164821
i graphed yours and its definitely correct but i think it uses a lot more operations than the other anons
>>
>>107166731
but why confine yourself to the whims of microsoft, it's like choosing to be a C# dev, no one does that willingly it's just something they accept as a necessary concession to make ends meet
>>
>>107166766
>but why confine yourself to the whims of microsoft
why confine yourself to the whims of the khronos group?
pointless question
>>
>>107166573
>>107166737
oh and with regards to your method, assuming its correct, how would i set the distance of the old sides/new sides by an arbitrary unit rather than just making the new triangle a ratio of the original? the other guy's works because he's talking about normalizing vectors and then multiplying them by the desired length to get that distance. but your method seems to require fewer math operations. just need to find a good way to convert from my desired distance to a ratio.
>>
>>107166723
It's significantly simpler/less tedious and leads you to spending much less time bothering with the API and the error messages are 1000x better.
That said i'd still recommend vulkan over opengl.
>>
>>107166778
well for starters the khronos group doesnt force an OS with telemetry data out the wazoo on me, also its not microsoft
>>
>>107166815
Gamers and game developers use Windows, having a melty about Microsoft just outs you as a tech hobbyist and not a game dev
>>
>>107166573
this one's not quite right, its usually still biased towards one edge than the others. it definitely needs to be translated by _something_, just not the centroid.
>>
>>107164684
I had to solve a similar problem, it simplifies to offsetting each point by
X*(v0*|v1|+v1*|v0|)/(v0.x*v1.y-v0.y*v1.x)

v0 and v1 is (P2-P1) and (P3-P1) for P1 , etc.
X is the distance
>>
>>107166927
I think I have a simpler method. You just add normalized direction vectors of both adjacent walls times the offset to each point. Faster than my raycast solution but didn't check that one though.
>>
SDL GPU is a nice API. I've committed to using it for my engine and haven't regretted it so far.

In terms of explicitness and verbosity, it's kind of somewhere in between d3d11/gl and d3d12/vulkan. Pipelines are explicit, but barriers are implicit. It offers resource renaming but only if you ask for it.

I like its approach to shaders. You can tell it which shader formats you can give it (spirv, dxil, metallib, nda) and it chooses a backend (d3d12, vulkan, metal, nda) accordingly, or you can force one.
There's a tool to help compile HLSL to the various formats, but you could also decide you only care about e.g. d3d12 and just built your shaders with dxc as if you were using D3D12 directly. It's better than the "use our custom tools and shader language" approach of bgfx. You do need to follow rules about what to bind in which set/in which order.

Cons
>d3d11-ish feature set, so no raytracing
>also no bindless except whatever you can achieve using d3d11 era psuedo-bindless tricks, like texture arrays or using one huge buffer and indexing into it
>it doesn't want you to access native device/resource handles so you need to soft fork it if you want that
>not many tutorials/examples so hard to recommend to beginners

I can see this becoming popular amongst indie/AA devs who want to write their own renderer but don't want the burden of going full d3d12/vulkan/gnm. Not sure how many people are actually in that group, but I'm one of them and I'm happy.
>>
>>107166998
>>107167007
i need a picture, my brains too stupid for this
>>
File: triangle.png (77 KB, 717x676)
77 KB
77 KB PNG
>>107167292
>>
>>107167314
thats blowing me mind, i'll have to try that when i leave my wage cage
>>
Going to bed, this thread better not be dead when I wake up in 8 hours.
>>
File: 20251110_173430.jpg (3.84 MB, 4000x3000)
3.84 MB
3.84 MB JPG
>>107167314
didnt quite do it unfortunately. the distance between the inner and outer verts is consistent, but their placement doesn't make the side distances match up.
>>
>>107166308
Probably you should handle the input in a single place and not in each object
>>
>>107168315
I suspected it, you probably need to divide by the cross product, which means >>107166998 and the raycast method are the correct way.
>>
>>107168315
it will work if you correctly scale sum of the normalized vectors, by multiplying by 1/sine of the angle between them (which simplifies to what I posted >>107166998 earlier)
>>
>>107166308
this is what lots/most game engines do. its the only setup that really makes sense when you want to add sorting/batching/instancing, shadow passes, etc.
its definitely a good pattern, my engine became a lot cleaner after decoupling gameobjects and render objects.

>>107164684
pretty sure you have to do some line intersections here. this is similar to 3d "brushes" where you want to extrude the face and have to do plane intersections.
theres going to be some factor of 1/x somewhere because when the triangle is super skinny, growing the sides by just a little will make the triangle massive/infinite.
its not a simple scale factor.
>>
best way to make a webm without it getting all grainy looking? I'm using one called webmconverter that I got from github
>>
>>107167282
I think there should be quite a few people in that group. With the priorities that vulkan sets (explicit control over everything), amateur-friendly graphics programming that was possible in opengl was essentially abandoned.
If you're new to graphics or maybe haven't even been programming for that long in general, the new GPU apis aren't the answer, but sdl_gpu might be. At least it attempts to go in that direction again.
>>
>>107168613
Fiddle with the settings, probably ask in the /wsg/ anime threads or something since they take their quality seriously.

However at the end of the day if you want it to look good, it will need a larger filesize.
>>
>>107168613
Cut the resolution, cut the framerate, cut the duration, use 2-pass encoding, then you go around fiddling more with some of the encoder settings.
If you're trying to post something long and you really want to show the full quality, just catbox it.
>>
>>107157309
Huh? The new official Kronos tutorial and vkguide don’t do 1.0. Sounds like you’re getting filtered and stuck in tutorial hell. All the “new” stuff is trivial to learn and implement.
>>
>>107166529
>I would rather give my dad a blowjob than use an apple product
these are the people saying macs are for faggots. why did this thought even cross your mind? fucking obsessed
>>
Game Engine Architecture 4th edition is coming January 31st
>>
Give me 20 reasons why +TiananmenSquare licensing shouldn't be commonly used.
>>
>>107171740
Never read it, is 3rd edition good?
>>
File: based_department.gif (406 KB, 640x640)
406 KB
406 KB GIF
>>107166766
Because I only target windows anyways. C# is also a based backend lang, more people should use it. Beats the fuck out of java/python/js
>>
>>107172685
Yes but as always it’s a reference book not a tutorial
>>
>>107173016
>Because I only target windows anyways.
NTA but I am also doing this, however I still went with Vulkan. I will not officially support Linux (or MacOS) so while it will be easy to get going on Linux, I have no obligation to go mad trying to fix bugs they found on some sperg distro.

If you want official support, you can always dual boot.
>>
File: cyberdeck.jpg (42 KB, 736x491)
42 KB
42 KB JPG
>>107171740
>2 volumes
>paperback is $160
>hard cover is $400
> This fourth edition offers the same comprehensive coverage of game engine architecture provided by previous editions, along with new material that includes:
>Two brand new chapters covering 3D rendering and photorealistic lighting
>A discussion of motion matching technology for character animation
>Improved coverage of undefined behavior in the context of compiler optimizations
>Fuller coverage of C++ language standards up to C++23
>An improved index, plus fixes for various errata found by our readers in previous editions

Not sure if the price is worth the upgrade if you've already got 3e, especially since a lot of toolchains don't support C++23 yet (or at least support is still experimental), but the 3D chapters sound useful, if it covers global illumination models or even baked lighting
>>
my game should have lots of duplicated string, so I want to store just string_view in objects to avoid allocation
could had just use char pointer but that's not kosher o algo
class SharedStringManager {
public:
SharedStringManager() { stringset.reserve(4096); }
std::string_view GetSharedString(std::string_view);
std::string_view GetSharedString(const std::string& value) { return GetSharedString(std::string_view(value)); }

private:
std::unordered_set<std::string, STRINGVIEW_LOOKUP> stringset;
std::shared_mutex mtex;
std::atomic<int> writer_count = 0;
};

std::string_view SharedStringManager::GetSharedString(std::string_view value) {
while (writer_count) {}

std::shared_lock readlock{ mtex };
if (auto search = stringset.find(value); search != stringset.end()) {
return std::string_view(*search);
}
readlock.release();

writer_count++;

std::unique_lock writelock{ mtex };

auto [it, inserted] = stringset.emplace(value);

writer_count--;

return std::string_view(*it);
}
>>
>>107173236
I don't get it, you feed in string_view to get a string_view from a different memory segment, but it shouldn't make enough difference since string_views aren't meant to have lasting lifecycle outside of baked const char* replacement with sv suffix. String with custom allocator would be more suited, but that works too I guess.
>>
File: 1759249456243847.png (1.06 MB, 900x900)
1.06 MB
1.06 MB PNG
>>107173236
Neat! When you call
GetSharedString
with a std::string, it passes by reference, and then copies the underlying pointer to the string_view. However, when your cache has a miss, it converts back from string_view to string, which is a copy. You can make this copy optional by passing the string by value instead:

std::string_view GetSharedString(std::string value) {
/*...*/

stringset.emplace(std::move(value)); // no copy, only a move
}


then you can call like this:

std::string myStr = "Hello world";
stringManager.GetSharedString(myStr); // copy the data here, immediately, gets moved later

//or

stringManager.GetSharedString(std::move(myStr)); // move the string into the parameter, then it gets moved internally


The mutation semantics are a bit clearer, and you get the option of zero-cost insertions: if you pass by value, you know your string will never be changed. If you explicitly move it, you know that your string gets mutated, but you get the benefit of not having to copy the data

Also for string literals, this may not even be necessary because modern compilers support string pooling
>>
>>107173463
The string_view that it receives could be from a different string but with same text value (from input, network data etc). What it returns is an internal string reference that is safe and cheap for game state logic.
>>
>>107173743
I think I get it, but it kinda calls for a wrapper signifying the ownership of the manager that can be cast to string_view on demand since string_view is not quite meant to be safely stored., though that's only pedantry
Also you should disallow inserting into stringset past the initial capacity because reallocation will invalidate string views to strings with small string optimization.
>>
what's a good resource on creating render submit queues? i have an idea of how to write the system but cant flesh it out
>>
Hello, I will pay $25 to 3 people to play my game for 15 minutes:

https://rumba-studios.itch.io/jumperia

https://www.my-chan.com/post/1/2
>>
>>107176231
You didn't even submit for DD, what the fuck would you prefer to pay people to play?
>>
>>107176620
What's DD?
>>
>>107176231
is this like a school assignment, a genuine attempt at making something people want to play or a bitcoin miner?
>>
>>107176780
Demo day hosted by /agdg/
>>
I gave up and I'm using Godot.
>>
>>107168613
You dont need more than a 360p video. I fucking hate opening some media here and you have to fucking zoom out to see shit.
>>
>>107176231
Hey, I'm broke and would love those $25.
>>
I'm making the ultimate quad tree with the new tech, wish me luck in the final benchmark.
>>
>>107167282
This is the only instance where I chose a library over SDL, and here I chose Sokol, it's basically the standard for api abstractions, even if you don't use it the blog of the dev is very valuable.
>>
File: 1742974223514118.png (64 KB, 874x383)
64 KB
64 KB PNG
>tweeted a while ago about how not making your own engine makes your game soulless
>his game is in the "not given up yet" state (never a good sign)
>80% of his tweets in the last month or two are just random games he's playing
>despite having effectively infinite money
>despite having such fame that just asking for devs would get him enough application emails to crash gmail servers
>despite working on a fucking blobber
I'm making my own engine too but Notch is fucking retarded.
>>
>>107178135
Notch is a braindead NPC
>>
>>107178135
lmao, he's got a week at best
>>
>>107178135
I liked it when he said he had to put the game on hold because he couldn't find any programmers in LA, lmao
>>
>>107178389
>move to LA
>be politically right of Lenin meaning a nazi genocidal maniac according to the average person in LA
>any programmer that would live in LA won't work for you due to the above
>anyone that would work for you won't go within 100 miles of a major American metropolitan area ESPECIALLY a Californian one
Just the fact that he moved to LA makes him a retard. You're not a "white guys for kamala" basedboy what the FUCK are you doing moving to a place like LA?
>>
>>107176945
How do I register?
>>107177332
Follow the instructions and I'll send them to you.
>>
>can't into geometry
>decide to make a whole ass game engine
are you all fucking retarded? go learn geometry first holy shit lmao
>>
>>107178613
Are you talking about Jumperia? I didn't make the game engine, I used Bevy + Rapier2d. I don't understand what you mean by "Geometry ".
>>
Started work on my 3D Might and Magic project again. Thinking about grabbing the GPL code from ScummVM and just layering a 3D renderer and some QOL stuff and calling it a day.
>>
>>107155972
Implement some antialiasing
>>
>>107178483
He literally lives in Franklin's house from GTA5
>>
>>107178483
how can he throw epic parties for people who pretend to be his friends if he's not in LA
>>
>>107173236
If you use strings as magic numbers that you compare the address of (perhaps?), I would highly suggest using an enum as an xmacro, since you will find that unordered_map is much slower compared to an Xmacro expansion of strcmp, and then just convert strings to enums while loading the strings from the network or input.
One problem is that it's tempting to use the enum in a save file, and there is a chance to break compatibility (you could use cmake to validate backwards compatibility using CTest or whatever, but at that point).
#include <assert.h>
#include <string.h>

#define MY_STRING_MAP(XX) \
XX(MY_STRING_1)\
XX(MY_STRING_2)

// you could add a prefix to it using ## but you need to modify the rest of the macros
// you could also use an enum class for better warnings on switches,
// but then you will get warnings for SOME_ENUM_END missing in a switch
// you can replace SOME_ENUM_END with a constexpr function, just count +1 for each enum.
typedef unsigned int my_enum_type;
enum my_enum : my_enum_type{
#define XX(name) name,
MY_STRING_MAP(XX)
#undef XX
MY_ENUM_END
};

const char* get_my_enum_str(my_enum_type id)
{
assert(id < MY_ENUM_END);
switch(id)
{
#define XX(name) case name: return #name;
MY_STRING_MAP(XX)
#undef XX
}
return "MY_UNKNOWN_STRING!"; // or NULL
}

// returns MY_ENUM_END if not found.
my_enum_type get_my_enum_id(const char* str)
{
#define XX(name) if(strcmp(#name, str) == 0) return name;
MY_STRING_MAP(XX)
#undef XX
return MY_ENUM_END;
}

Another problem is modules (DLL's? scripts?) and excessive rebuilding. This could be fixed by using perfect hashes using constexpr hash functions, which does not use Xmacros, but you won't get the compile time errors for typos (I guess you could wrap it around a global object, and then that object could hook up to a global std::set to check for duplicates during static initialization and to have a global list that you could access).
>>
File: ygg-1762908686.webm (2.93 MB, 1920x1200)
2.93 MB
2.93 MB WEBM
I'm working on a meta-game for my games website. So far I have all the normal soul killing web dev tasks done. Account registration, recovery system, ticket system, admin controls, sanitize and normalize every blah blah. Now working on the good stuff. I have "Personas" as a character system with full systems for inventory, equipment, etc. Just wrapped up the shops. More to come on this, and not sure how this will work with Steam. I may need to pull from Steam?
>>
>>107179232
Unless I put something in the client that uses my web API. Ill figure it out actually.
>>
>>107179228
Also I forgot to mention, there is another variant of X macro that uses #include and a more pleasant name than XX, and no need for the \ slash for each line (annoying if you don't have clang-format or similar), and you could add comments
So you could have an .inl file (it's a header file but without header guards / pragma once).
And the contents will look like:
// you can add comments here!
ADD_ENUM(MY_STRING_1)
ADD_ENUM(MY_STRING_2)

//replace this: 
enum my_enum : my_enum_type{
#define XX(name) name,
MY_STRING_MAP(XX)
#undef XX
MY_ENUM_END
};
//with this:
enum my_enum : my_enum_type{
#define ADD_ENUM(name) name,
#include "my_enums.inl"
#undef ADD_ENUM
MY_ENUM_END
};

But clangd will always show ugly errors and warnings (just the nature of clangd requiring all headers to be complete, intellisense should work fine).
And clang-tidy will complain about include being included multiple times (that's if you you include it multiple times in one file, if you ONLY need the enum in the header and enum-to-string function in the source file, you won't have that warning).
>>
>another day of no progress
>>
Fuck yes, thanks to having no stuck regions my new quad tree is 3.5 times faster than vectorized normal one (should be almost x6 improvement from the original quad tree) almost 2 times faster than vectorized RTree, though still 25% slower than the new fast large region grid.
Inserting and removing is way more expensive though and it's even more memory hungry than the grid. It kind of belongs in the trash and even tweaking parameters doesn't help it.
>>
File: screenshot.png (2.08 MB, 1700x900)
2.08 MB
2.08 MB PNG
Finally finished the full IBL pipeline. From turning an equirectangular texture into a cubemap all the way to this final image. It’s times like these where I think of the monolithic asset processors game engines have. For now I’m just going to shove everything into a separate file. My renderer cpp has reached 4k+ loc
>>
hey nerds. not necessarily relevant to this thread but what do you think of Godot's decision to abandon GLES 2.0? It basically means it will not run on older tablets now. It pisses me off that shitty 3D games made by Indians are running fine but my game runs like treacle because I chose Godot over Unity.
And how much work might it be (in $) to fund development of a Gles 2.0 renderer?
>>
>>107182799
If you’re expecting confirmation bias you’re not going to get it. GLES is ancient and no one cares about it anymore.
>>
>>107182819
I know it's ancient but there's a ton of old devices that are still perfectly usable and it depresses me that my game cannot run on them. Also my target audience is young kids who I assume are mostly going to have hand me down devices.
>>
>>107182840
That's the way the world works. If you want eternal compatibility write a cpu rendered game
>>
Do you know any DirectX debugger that would let me force wireframe rendering in commercial video games?
I want to see triangles to steal their techniques and algorithms.
>>
How do you manage scene/scenes in a video game engine like Unity or Unreal?
I mean in code, not in editor.
What are the use cases for multiple scenes? Are they a meme?
>>
What is the best source for video game music?
>free music
>paid music
>make your own
I will not learn to make music, it's too long process, too hard.
I could pay for music but I have to listen to music first if I like it, I do not want to hire artist to make music. I want music to be already made.
>>
>>107182958
try searching copyright free music on soundcloud or similar. There's lots of people that will let you use their music for only credit in return
>>
>>107182958
Depends on your requirements and how much time you have to dumpster dive. I had some luck with humble bundle dropping entire sets of music packs for decent price, but I still had to spend a LOT of time to sort through it and get a sizeable set of barely fitting tracks with a few bangers.
The more generic your game is the easier it will be to get fitting music.
>>
>>107164850
Not a dumb question
>>107164997
Haha I was thinking with a satisfiability solver like "wtf? how'd you do that?"
>>
File: 1753919779661133.png (303 KB, 736x511)
303 KB
303 KB PNG
>>107157363
>Northern Journey
God that guy's blueprint spaghetti in UE4 looks like a fucking nightmare. Idk how he managed that mess. But at least he released a game which is more than most people do I guess.
>>
File: billMaxwell.jpg (840 KB, 2371x1896)
840 KB
840 KB JPG
>>107166830 >>107166815

>Gamers and game developers use Windows, having a melty about Microsoft just outs you as a tech hobbyist and not a game dev

Have any commercially successful games been made on Linux?
>>
>>107183894
factorio
>>
>>107182840
>young kids who I assume are mostly going to have hand me down devices
your assumption is wrong
>>
>>107182990
>>107182997
But how to search songs there? I want to choose genre or something, then listen to 1000 songs and pick best. Then I want to buy a license for a game.
>>
>>107182951
>What are the use cases for multiple scenes?
You mean like multiple scenes where each is its own level, or having large levels made up of chunks of smaller scenes?

The former should be self explanatory, you'll need multiple scenes for multiple levels. For the latter, it really helps with keeping things organized, loading times/performance, and entering play mode.
I don't use UE, but for Unity, a very large scene can take a couple of minutes to go from the editor/scene view mode into the game/play view mode. So if I break up levels into chunks, I can test things only related to that chunk/area and it'll be way faster to go in and out of play mode.

for managing scenes, I have an enum of all the scene names. That's for editor purposes only, the enum gets converted to an integer value thats directly correlated with a scene's index number. So if I have a door that leads to "building interior 7" the door's interaction script will have a drop down that lets me select "building interior 7" and the scene manager will see it as "19" or whatever number it is in the index.

for chunks, when I get closer to where a new chunk will load, first it'll load it as inactive/disabled. if I get close enough to see what's in that scene, it'll start enabling objects from that scene
>>
>>107184716
I meant scene as some kind of group that groups actors/terrain/objects and camera.
I don't see any use of this and why to implement this in a game engine.
Except, if you had 3D racing game and you had mirrors it would be useful to have separate scene with low poly terrain, for the mirror view.
But for most games I don't see any use of "scenes".
>>
>>107184751
>Except, if you had 3D racing game and you had mirrors it would be useful to have separate scene with low poly terrain, for the mirror view.
you dont even need a separate scene for that. have the mirror view camera only render the higher LOD/less-detailed meshes.
>>
>>107184677
For humble bundle at best you will be able to tell from the pack's name and whatever preview is available. Some have the entire album uploaded to soundcloud.
>>
File: 1.jpg (112 KB, 916x630)
112 KB
112 KB JPG
>mfw I realize I dont need to use a custom matrix stack wrapper over std::stack to keep track of transformation hierarchy and instead can just use the call stack with a recursive function

holy shit
>>
>>107184129
That's it? How accurate is Proton for debugging?
>>
>>107185346
emulating recursion by using a stack is going to be faster, but if your recursion depth is like 1-10 things max don't bother, actual recursion is cleaner. I use recursion in my glTF parser as well to combine matrices

>>107167282
I've only made a basic renderer in SDL_GPU but I liked what i saw. I tried using slang with it but its fucking weird and buggy, they really want you to use shadercross and do everything with HLSL. And the rules about the binding and sets are annoying. I also didn't like that it was stuck on Vulkan 1.0. I tried to do a simple vertex pulling example with it and I got a million validation errors about "VK_KHR_shader_draw_parameters" not being requested. I'm used to Vulkan 1.3 so even basic shit that I assumed was core isn't.
>>
>>107185527
but wouldnt the use case for stack based recursion be exactly when the depth isn't too big?
>>
>>107185633
No, generally you want to use an algorithm that is tail-recursive or use std::stack. With regular recursion there is the overhead of the stack depth AND loss of speed from calling yourself repeatedly. The pro of regular recursion is you can express some algorithms very elegantly using it. If this is code in your hotpath and its running every frame I would keep the stack. If it only executes occasionally and your depth isn't too big then it doesn't matter if you use normal recursion vs tail recursion vs std::stack and emulate it with iteration.
>>
>>107185346
Why would this be better? For faster custom transforms like translation that only mutate a few values?
>>
>>107185697
less bug prone since you dont have to push/pop explicitly
>>
my engine is the best
no, you cant see it
>>
>>107185946
actually nvm, its not actually tail recursive because its inside a for loop
>>
File: rpg_s.mp4 (974 KB, 544x416)
974 KB
974 KB MP4
What does /gedg/ think? This is the event code for the hole in the wall to the left of the gate.
I need to do something about those indexes, either to compare item names or to have some kind of autocomplete system
local other_medal = find_event("right_medal")
local gate = find_event("gate")

if item and (item == 6 or item == 7) then
Inventory.remove(item)
if item == 6 then
-- blue medal
set_local(1)
else
-- purple medal
set_local(2)
end

if other_medal.v and other_medal.v > 0 then
-- open the gate
player:move_wait({
"move_down", "move_down", "move_right", "turn_up"
})
gate:slide_sprite("up", 120)
gate:set_local(1)
end
else
message("A small opening in the wall.")
end
>>
>>107185527
>VK_KHR_shader_draw_parameters
Again I think this is related to using slang since it can't target Vulkan 1.0. Vertex pulling definitely works fine when building HLSL with dxc or shadercross.
>Vulkan 1.3
Good news, this was just merged today
https://github.com/libsdl-org/SDL/pull/14204
You can request any Vulkan version now
>>
>>107186157
wtf that PR process looks effortless, maybe I should start contributing to SDL_GPU instead of bitching about features I wish it had. Cool thanks.
>>
>>107156433
Ive only built simple engines for web games but before chatGPT was invented. I can only say that you should only use LLM to help you understand small parts of your engine and help you fix small building blocks in your system. Dont make it write slop code for you to copy and paste. Thats how you reset months of work.
>>
>>107186118
>I need to do something about those indexes
What indexes, like the item id's (6 and 7)? Checking the items using string comparison would not be the right move, comparing id's is much faster. But having the numbers there is not very readable. Generally it's best to make your code readable by replacing magic numbers with identifiers, like using whatever the equivalent of #define or const is in that language, ideally it looks something like
if item and (item == BLUE_KEY_ID or item == PURPLE_KEY_ID)
...
>>
>>107166573
No. Wrong

>>107166333
You can literally just calculate vectors from Origin to each point, AND then scale each vector by the same factor to update the 2d position of each point. No need to move the triangle after that :)
>>
>>107166733
Red dead redemption 2, built with Vulkan, does not have RayTracing but the graphics look better then most games nowdays
>>
File: 1762975797831.png (128 KB, 1709x1019)
128 KB
128 KB PNG
>>107186549
Yes but then I would need to autogenerate those ids for every new item and have a completion system in the source view.
>>
>>107186583
what does that have to do with my post?
>>
>>107186633
Not a Lua expert but it seems like you would wanna put those item id's in a table, similar to how you would use enums in other languages
Key_Item {
...
BLUE_MEDAL = 6,
PURPLE_MEDAL= 7,
...
}

...

if item and (item == Key_Item.BLUE_KEY or item == Key_Item.PURPLE_KEY) then
...

Adding new key items just means adding it to the table and giving it a value, then in your code you can refer to the values in the table. Avoids doing string comparisons and makes the code more readable than just rawdogging id numbers everywhere. It also means if you ever need to change the id's in the table, you dont need to change it everywhere in your code since the identifier is the same
>>
>>107184129
The only way forward is weaponized autism.
>>
>>107186851
I can have the compiler autogenerate this pretty easily. Other than the IDs, what do you think of the api?
>>
>>107186633
>>107186851
eh more like
Key_Item = {
BLUE_MEDAL = 6,
PURPLE_MEDAL = 7,
... other key items
}

...
if item and (item == Key_Item.BLUE_MEDAL or item == Key_Item.PURPLE_MEDAL) then
...
end

hopefully you get the idea, just look up Lua tables
>>
>>107173149
>Not sure if the price is worth the upgrade
That's what libgen is for.
>>
>200 bucks on a book when you own a computer and a brain
>>
>>107179633
>So you could have an .inl file (it's a header file but without header guards / pragma once).
neat, I didn't know there was a cleaner variation of the X macros
>>
Why was he the best?
Also /g/entoomen how would you make a scientifically good porn game?
>inb4 zoomers here don't even know what pic related is.
>>
>>107188441
The hitboxes change size in "real time" as in when you pull out the options menu and everything is a puppet rigged animation with no loop, all manual.

People nowadays and engines nowadays are really handicapped when it comes to gameplay-stuff like collision boxes/damage boxes/locations in general. When was the last time you could pick up a box and throw it at an enemy or insert an item in a crate or be capable of stacking crates without it all toppling over?(inb4 all games where you stack boxes sucked ass)
>>
I don't understand how you can have bad physics in a game when you can just copy-paste that bitch. It's not like you don't have 40+ years of C++ code already written and up for grabs.
>>
>>107188994
Where do you think you can copy and paste physics from exactly
>>
>>107189005
https://github.com/jrouwe/JoltPhysics
>>
>>107188441
>>>/v/725712080
Is he right to cry over this code? or is he just being a little baby? How would you remake it?
>>
>>107190977
Code is supposed to accomplish a goal not look pretty
>>
>>107190997
Rate this code:
https://pastebin.com/cviGuABd

https://www.youtube.com/watch?v=5W_wd9Qf0IE&list=RD5W_wd9Qf0IE&start_radio=1
>>
>>107190997
TRVTH NVKE
>>
>>107191180
Looks fine
>>
>>107191197
Nigger did you even open that?
>>
>>107191401
Yes, what's wrong with it?
>>
>>107191456
Well I dunno what's wrong with it since you opened it and read it?
>>
>>107191464
I don't see anything wrong with it
Clear, no repetition
>>
>>107191470
So you didn't open it at all you little shit. Why are you even here? Are you a chatbot?
>>
>>107191503
I did open it
>>
General dead because barely anyone is using Vulkan with modern c++. Imagine how much progress we could make together.
>>
*SMACK SMACK SMACK*
Stop lying, bot.
>>
>>107191559
can you speak in coherent English?
>>
>>107191567
Can you?
>>
>>107191522

Why tho? This isn't a Vulkan thread.
>>
>>107190997
You can accomplish that goal using effective methods, not autistic caveman banging rocks together levels.
>>107191180
Absolute caveman tier.
>But just werks
It's why it eats up your CPU's resources
>>
>>107192226
The methods used are effective, that's the point
>>
>>107190977
I have better things to do than look through code of a porn game, but the only issues I see in the image is the use of pointless getters and setters that don't do anything but return the variable.
>>
>>107155727
/agdg/ is full of failed devs who stick around to crab newfags. Is this place like that too?
I have a project thats going well and it's just unpostable on /agdg/
>>
>>107192642
This place is mostly nodevs but you can post your game and nobody will seethe with jealousy
>>
>>107191522
im on my way there I'm just learning the fundamentals of 3d rendering in the kiddie pool first (OpenGL)
>>
>>107191180
I've seen one of those and it's more readable than most code. Could you refactor it? Sure, and it would be easy to do since it's all so verbose instead of using cryptic shortened names and layers of abstraction.
>>
>>107192653
It's made with an existing engine though (Godot), probably not gonna fit in here.
I wish aggydaggy wasnt such a crab shithole, it's cool to post progress regularly to a community, but not when the vast majority of responses is shit like:
>how do i do that
>that looks like shit
>im trying to do something like that, any advice
>looks gay as fuck lol
>tell me how to do that

And when I do answer the people seeking help, they dont respond back at all, it's like I'm talking to bots with automated responses to either shit on my work or waste my time.
>>
>>107193558
You can still post a Godot game here
>>
>>107193558
>It's made with an existing engine though (Godot), probably not gonna fit in here.
As long as you're doing interesting work, nobody cares, post it.
>>
>>107192653
>you can post your game and nobody will seethe with jealousy
What's more, nobody will reply at all.
>>107193558
Those replies are supposed to be bad? Compared to that I got lynched and chased out of there.
>>
>>107193772
>What's more, nobody will reply at all.
People will reply if you post 3D things. I once uploaded a 3D demo that I made in a week and it got a lot of replies. But my 2D engine that I am making for the last year is not that interesting. So do 3d
>>
>>107193813
3D is devil, soulless, invented by jews.
2D = art.
>>
How to make a texture repeat from a texture atlas, without shaders?
Impossible?
Then how did they make old games like GTA 3, VC, SA?
Imagine if you have a big building, skyscraper and it has hundreds of windows. What do you do?
>make quad for every window
wastes triangles
>make big texture that has hundreds of windows
wastes video memory
>>
Do you know any DirectX/GPU debugger that would let me force wireframe rendering in commercial video games?
I want to see triangles to steal their techniques and algorithms.
>>
>>107174241
>disallow inserting into stringset past the initial capacity because reallocation will invalidate string views to strings with small string optimization.
I checked, sets and maps on insert only invalidate iterator, the values always remain safe
>>107179228
my strings are defined by players, they don't exist in compile time so they can't be switch'd like that, I guess?
anyway, I just replaced string_view with ID number. Initially I just wanted to do test run with std::string and map but it gradually went "this is too much overhead" as I put more time into it
>>
>>107193957
quad for each window or no texture atlas
>>
do you actually need to know all the algebra/geometry to make computer graphics? I am reading foundations of computer graphics 4th edition, and there is sure a lot of shit to consider.
I guess it boils down to sin, cos, tan, cross product, dot product, linear equations, partial derivatives. I keep fucking up sin cos tan, but the other parts don't seem counter intuitive.
>>
>>107191522
Progress on an engine or a game?
>>
>>107193980
>I checked, sets and maps on insert only invalidate iterator, the values always remain safe
Sorry, you are actually right. Didn't expect the memory to never be reallocated.
>>
>>107194160
Because the buckets are preallocated and fixed size, while the elements inside the buckets are linked lists
>>
What is the best source for video game music?
>free music
>paid music
>make your own
I will not learn to make music, it's too long process, too hard.
I could pay for music but I have to listen to music first if I like it, I do not want to hire artist to make music. I want music to be already made.
>>
>>107191180
Better than 99% of porn games, worse than 60% of non-porn games.
>>
>>107194078
Yes you fucking faggot. Do you want your fighting game to be a turn based game playing FMVs?

Then learn math! Even this little Flash game is praised for its math after 20 years and drives nocoding niggers in a frenzy when they see actual math being used in a video game.
https://pastebin.com/cviGuABd
>>
File: cyberbullying.png (1.1 MB, 1440x1250)
1.1 MB
1.1 MB PNG
>>107194078
No, I did learn how to multiply vectors by matrices once, and also what each component of a perspective/view matrix does, but all I need to remember is that when you multiple the position vector by the view vector, you are transforming the world origin to the camera position and getting the position in "view space". Multiplying by the projection matrix then gets the position in "screen space". There are some other transforms which are kind of important (like the inverse transforms of skeletal animation), but knowing how to compute dot products, cross products, matrix multiplication, etc. is not super vital outside of knowing things like whether or not some operation is commutative, what the identity values are, etc.

i.e, you probably should know ABOUT linear transformations, but the ability to write them out and compute them on paper is not necessary
>>
File: evangelion_mapfile.jpg (839 KB, 891x902)
839 KB
839 KB JPG
>>107194519
I should add: the dot product and cross product are immensely useful in 3D graphics, so knowing WHAT they represent is more important than HOW they are calculated.
>>
>>107194319
I don't see anything that's very math heavy in there
Not that you shouldn't learn how to do math, but that seems like a poor example
>>
>>107193984
>quad for each window
Not possible, skyscrapers have thousands of windows.
>no texture atlas
Not possible, texture switching is too expensive.
>>
>>107194765
>texture switching is too expensive.
No it isnt.
>>
File: JgrSc.jpg (51 KB, 700x392)
51 KB
51 KB JPG
>>107194789
>Switching textures on a GPU can incur a performance cost, as it is one of the more expensive state changes in OpenGL. Frequent texture switches can lead to cache misses and may require data to be copied between video memory and system memory, impacting performance.
>>
>>107193957
From "OpenGL Programming Guide for OpenGL 1" (i.e, no shaders):

>Repeating and Clamping Textures
>You can assign texture coordinates outside the range [0,1] and have them either clamp or repeat in the texture map. With repeatiing textures, if you have a large plane with texture coordinates running from 0.0 to 10.0 in both directions, for example, you'll get 100 copies of the texture tiled together on the screen

In modern Graphics APIs, you create a sampler state object and set the border behavior. In DirectX 11:

D3D11_SAMPLER_DESC desc {
.AddressU = D3D11_TEXTURE_ADDRESS_WRAP,
.AddressV = D3D11_TEXTURE_ADDRESS_WRAP
};


In Vulkan
VkSamplerCreateInfo info {
.addressModeU = VK_SAMPLER_ADDRESS_MODE_REPEAT,
.addressModeV = VK_SAMPLER_ADDRESS_MODE_REPEAT
};


No shader logic required
>>
>>107193957
Texture arrays?
>>
>>107194959
What you describe doesn't work with texture atlases.
You need a separate texture that only contains one window, then you can repeat it using this technique.
I won't have a separate texture just for one window, texture switching is expensive.
>>
>>107195103
>Texture arrays?
Yes, they could work, however:
1. They require modern, expensive GPU. If such requirement is to be made, I could as well use shaders.
2. Texture arrays require all textures in them to be of same dimensions. Could be acceptable for terrain or buildings, but not for other things.
>>
>>107195162
Then either you can't without additional polycount, or you need run renderdoc or something on your game of choice to see how it's done.
>>
>>107193957
>Then how did they make old games like GTA 3, VC, SA?
>make quad for every window
>make big texture that has hundreds of windows
you listed the techniques yourself
stop being retarded about memory, those games made it work with very little, why cant you with way more memory?
>>
>>107193957
i'm think many older games would just use different textures instead of atlases and bind a new texture each draw call.
it's recommended against nowadays because of muh driver overhead and muh gpu starvation, but back then with slower gpu's, limited memory, and smaller resolutions, the tradeoffs were different, so maybe binding different textures wasn't a concern.
>>
>>107195300
I also wouldn't be surprised if there was just some platform-specific functionality for simple but (for the time) efficient texture repeating, even if it differs from how we do it today
>>
>>107157309
why are linux mesa larping about vulkan 1.0 when even old cheap cards like amd 6600 are on vulkan 1.4
it makes no sense to support something older than 6 years even when IGPU are like 50$ and support 1.4
>>
>>107195212
>Then either you can't without additional polycount, or you need run renderdoc or something on your game of choice to see how it's done.
What is renderdoc?
I am looking for directx debugger that can force wireframe rendering in old games to see how they made it.
Renderdoc is DX11+, old games use DX7/8/9.

>>107195228
>you listed the techniques yourself
There is one more technique that is better and I invented it, but I do not want to publicly disclose it because it is my discovery.
>stop being retarded about memory, those games made it work with very little, why cant you with way more memory?
No, I do not have more memory, I want the game to run on 25 year old computers. Poor kids in africa don't have new computers. Or people in Siberia.

>>107195300
I saw old NVIDIA documents from 2000s and they recommend using texture atlases for performance.
>>
>>107155972
Reminds me of some old N64 games for some reason, like Forsaken.
>>
>>107195548
I don't have a single gpu in my house that supports Vulkan, even 1.0.
>he thinks 6 year old gpu is old
>>
>>107195377
Well you have instancing, so if every window is a quad you can instance 1M of them with almost zero cost
>>
>>107195568
this is obscure and a pita but I've done it in the past successfully to capture old / drm laden products. You can use DGVoodo2 to translate old directx to modern directx, then launch the game with renderdoc. If that still fails due to DRM hooks, you can then use dxvk ontop of dgvoodo2 (dx7 -> dx11 -> vulkan), then use gfxreconstruct
to capture yourself playing the game, then use renderdoc on the replay program for gfxreconstruct. I used this to bypass drm protection when I wanted to capture some old games and it actually worked. You won't be looking at the original shaders anymore, everything is going to be translated, but you can still see the order the game constructs frames in / wireframes and stuff so its useful.

Don't ask for help about any of this on the renderdoc discord or you will get banned because baldurk is autistic and paranoid he'll get sued by game companies if he's seen promoting this as a piracy / hacking tool.
>>
File: Prison-Kid-meme-2.jpg (47 KB, 598x585)
47 KB
47 KB JPG
>>107191180
Autism/10
Autism/10
Autism/10

Why is it lacking any sort of system like an animation timeline? why is there no state machine?
Hey fat/g/entoomen take a look at this code.
>>
>>107195568
>Renderdoc is DX11+, old games use DX7/8/9.
Maybe you could try Nvidia Nsight then? With 2021 version and older you could run it with 32 bit applications and it can handle the messiest and most legacy mixes of openGL api usage. Maybe it can handle old directX too.
>>
>>107195959
State machines and animation timelines are for the feeble minded. The true way is making procedural animations overlapping and intermixing organically without discrete state limitations.
>>
>>107167282
>not many tutorials/examples so hard to recommend to beginners
I'm a complete noob to graphics programming and I've been using a C++ opengl tutorial while I'm coding in C with SDL_GPU and I still manage to make it works.
It's not that hard, the documentation is pretty good.
>>
>>107196049
The true sex simulator must recreate epithelial cell simulation in relation to pain/pleasure receptors to the brain.

Also anyone just looking through old Flash games' source code files? It's basically all open source now. Any Flash game you played as a child or your son played is now open source.
https://github.com/jindrapetrik/jpexs-decompiler
https://lewdzone.com/game/super-deepthroat/
>>
>>107196652
That would be hot. Overheating your pc kind of hot.
>>
>>107194765
Wrong on both counts
>>
why is he asking about this shit if he has a "technique that is better and I invented it, but I do not want to publicly disclose it because it is my discovery"?
>>
>>107193980
>my strings are defined by players
can you entertain the specific situation this happens?
the only thing I could think of is maybe the username? which makes sense, it probably appears in menus, in-game, and in kill feeds, enough bandwidth to be worth saving, if you make all the systems work with string ID's instead of raw strings.
BUT... If you used the enum, you could just add dynamic strings to the end of the compile time enum set (but for debugging you could make the index start at a fixed value, like 1000, or 4 million or whatever).
There is also another reason to use compile time enums, which is translation.
So you could store the translations inside of a json file or whatever, and the Xmacro would load it up XX(MY_STRING, "string").
So you might have static names attached to entities (npc/goblin), or it's a username player.
but this is assuming all your strings are actually in the enum, when you probably only need network strings to be in the enum, your main menu / debug menu / dialogs / logs don't need to store it's strings inside of a big enum that's used for networking, and it makes you question what needs to be translated or not, such as errors are quite subjective, and you might have printf formatted strings and if you mismatch the % specifiers you could easily crash or leak address info... AND it won't work with libfmt unless you use fmt::runtime, the solution could be to just never translate format strings + enable -Wformat-security, EX:
printf("%s%s\n", _T("The Value: "),Value);
, but personally I don't, BUT this is gettext/qt/icu i18n API's, you would swap _T("The Value: %s\n") with MY_ENUM_GET(MY_SHOW_VALUE), but the problem is that the way how gettext and other libraries work is by extracting the strings from your source code, which might not work with an xmacro if you choose to use gettext for private strings, and xmacro for network ones, so you need to manually type out the strings or generate it --print-po > my_strings.po.
>>
>>107198058
schizophrenia
>>
>>107194319
do I just make flash cards.
I have learned the power of sohcahtoa now.
>>
>>107198102
this place does give off vixra.org vibes
>>
>>107195824
What is instancing?

>>107195883
> You can use DGVoodo2 to translate old directx to modern directx, then launch the game with renderdoc.
ok
>you can then use dxvk ontop
My GPU does not have Vulkan.
>dx11
My GPU does not have DX11.
>Don't ask for help about any of this on the renderdoc discord or you will get banned because baldurk is autistic and paranoid he'll get sued by game companies if he's seen promoting this as a piracy / hacking tool.
I do not use discord, it's for niggers.

>>107196025
ok
>>
>>107196298
Why are you using C and not C++?
If you are using meme language, why not something interesting and quality, like Pascal or Object Pascal?

>>107198058
Because my technique still has some limitations and is not a perfect replacement to what shaders can do with texture atlas + repeat.
But maybe I will use my technique by default and optionally shaders on GPUs that have them.
>>
Is this the return of the African e-waste collector?
>>
File: 1738195011140516.png (281 KB, 384x435)
281 KB
281 KB PNG
Is there a point in clustered forward rendering over tiled unless you really want to crank the light count into the thousands? By tiled I mean you only cull lights based on flat squares of your screen, clustered is when you also add depth (so your entire frustum is sectioned into AABBs).
>>
>>107188441
I remember being in high school when I wrote a funny mod for it
that spiralled out of control quick
next thing I know it's a whole framework held together by sellotape and string
>>
>>107188441
Dicks out for Konashion
o7
>>
>>107199262
If you're already doing tile clustering it's very easy to extend it to full 3D tile clustering. You should do it.
>>
>>107199262
maybe just me, but clustered rendering makes a lot more sense conceptually than tiled. I have a 3d world, so the lights are partitioned into a 3d grid. fewer pathological cases when looking down a long path. with tiled, all lights along that path might fall into the same tile, but with clustered it just works.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.