[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / 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


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1794375700661505.jpg (23 KB, 370x370)
23 KB JPG
Blow job 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
/aigdg/: >>>/g/aigdg
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
>>110232778
>>
File: test.webm (2.88 MB, 1280x720)
2.88 MB
2.88 MB WEBM
Need to go to sleep soon.
Here is an example of interactive programming. Wireframe toggle.
>>
I gave up. I can't deal with C anymore, but there's no better language out there.
>>
File: file.png (11 KB, 927x130)
11 KB PNG
>>110312829
you can bind shortcuts in OBS to avoid having to click while something else has focus
>>
>>110314606
okay ....

>>110314248
Why can't you deal with it?
>>
>>110314248
odin
>>
File: file.png (86 KB, 381x1587)
86 KB PNG
>>110314248
>I can't deal with C anymore
why
>>
>>110317020
>.c
>.h
>.c
>.h
>...
>wild .cpp out of nowhere
what has happened there?
>>
>>110317020
>>110317206
y no folders? wtf how can you live like this?

imagine having to dodge the header files every time lol
>>
>>110317206
>what has happened there?
recast/detour is a C++ library, that cpp file is a shim to expose extern "C", engine-specific functions that use it
>>110317228
>y no folders? wtf how can you live like this?
the project is too small for it to matter
>>
File: bill.png (1.92 MB, 2286x2286)
1.92 MB PNG
>>110314248
Learn Odin NOW!
>>
File: file.png (114 KB, 1618x989)
114 KB PNG
>>110317370
>>
File: out_1.mp4 (3.94 MB, 674x720)
3.94 MB
3.94 MB MP4
Implemented all the ragdoll joints.
There is nothing to move the character yet so best I can do is princess carry her.
>>
Push a few small commits. Project is better organized now

https://codeberg.org/FroggyGreen/rooster

Putting a CMakeLists in every subdirectory is the right way. I realize that now.

>>110317996
Wow!
>>
>>110317020
Too much friction, some of it is in your screenshot.
>>
>>110318166
>Too much friction, some of it is in your screenshot.
if you mean headers and non-module translation units, well, it's a simple language and that's the point
>>
>>110318474
>it's a simple language and that's the point
That isn't valuable to anyone using the language. Single-pass compilation or whatever you want to call it is only useful for making the compiler itself easier to re-create.
>>
>>110318474
>it's a simple language
having to have a seperate declaration and implementation file is the opposite of simple
>>
Deepseek:
The Proof in the Market: The most popular graphics chip among gamers on Steam in mid-2026 was actually a laptop GPU (the RTX 4060 Laptop), not a desktop card . This shows how capable and common laptop graphics have become. The entire category has shifted from being a compromise to being a legitimate primary computer for most people, including gamers.

holy shit ne/g/ros, I am poorer than all you with my Dell Latitude Stinkpad and my AMD Radeon GayX 00000

We really are at the anyware anywhat anyhow era now
>>
>>110314248
learn verilog and get raped by Claude
>>
>>110319100

Summary
Under 32 MB (Voodoo 1 / GeForce 256): Instant load (<1 sec), retro/minimalist aesthetic.
256 MB – 512 MB (GeForce 8800 GT / Xbox 360+ tier): The "Sweet Spot." Takes 5–15 seconds to load, looks like a genuine console/PC game with real lighting and shadows, and runs smoothly in a browser tab on almost any computer.
2 GB – 4 GB (Biostar GTX 1050 4GB tier): Too heavy for casual browser delivery; better suited for a downloadable desktop executable.
>>
>>110319788
Here is the 2026 browser compute budget at a glance:
CPU Speed: 70%–85% of native speed via WebAssembly + 128-bit SIMD. Full multi-core threading works via Web Workers + SharedArrayBuffer (requires COOP/COEP headers).
System RAM (per tab): 4 GB standard WASM limit, expandable to 16 GB on desktop via Memory64. iOS Safari hard-caps total tab memory at ~5 GB.
GPU Compute (WebGPU): Direct compute shaders (WGSL) are supported across major browsers. Single storage buffers max out at 128 MB–512 MB on mobile, 256 MB–1 GB on integrated graphics, and 2 GB–4 GB on desktop GPUs.
Frame & Dispatch Taxes: You have 16.67 ms per frame for 60 fps. Pre-allocate GPU buffers at startup (creating one mid-frame costs up to 1.2 ms) and batch compute dispatches (each call costs ~33 µs in Chrome, up to 1 ms in Firefox).
Local Storage: Origin Private File System (OPFS) gives you several gigabytes of fast, near-native local disk caching for assets and compiled models.
>>
Another dead thread. Hobby engine sissies lost. Three.js won. Vibe Chads won.

YOU ALWAYS LOSE TRANNIES!!!
>>
>>110320433
indian still mad he got made fun of 2 months ago
>>
>>110320433
not so fast
>>
Where do I ask for help to start decomping?
Want to decomp a 3ds game.
>>
File: lel.jpg (228 KB, 1350x765)
228 KB JPG
>>110314248
>>110316839
>>110317378
I'm using odin, am I gonna make it?
>>
>>110320708
its better than C
>>
>>110320596
aigdg this thread is full of retards larping
>>
>>110320708
>using ripped of JAI
At least use Zig. It's a language made by someone who know what they are talking about unlike that Ginger fuck.
>>
>>110321187
>being a zigger
lol, lmao. That dude crashed out after Bun moved to Rust.
>>
>>110321187
nta but Odin is superior to Zig. Just compare the casting syntax, I ain't writing any of that shit, especially in gamedev where casts tend to be all over the place.
The problem that has plagued many programming languages and paradigms is a retarded blind faith in a principle of some kind, eg yesterday it was object oriented fanaticism. Zig's fanatical principle is explicitness, regardless if it's practical or useful at all.
Odin is one of the new languages that is designed purely by what's practical. It's just C but with every practice we've developed to cope with C made into a first-class language feature.
>>
File: heh.jpg (216 KB, 1115x942)
216 KB JPG
>>110320747
I was trying to use C but I really go against the grain with it and I got demotivated, then I was curious about arena allocators and that incidentally led me to Odin (and Zig) which has a lot of things like that set up in their core lib.

>>110321187
I tried Zig but I didn't get anywhere with it, I was expecting a "Better C" language but Zig is very alien, comptime filters me and I can't relate or solve things with it at all, and it was unpleasant to use sdl3 with it.

I liked using Go and Odin is sort of like go, and it's easy for me to come up with things like pic rel and not fuck it up or get lost or filtered by the language (Zig was filtering me constantly)
>>
>>110321282
Whatever man, I am not using a language made by a literal who. Ritchie, Bjarne, Andrew, and JBlow are all people that have done things hence know how to make language. Odin is just a language made by a dude who's following trends. Use one of the four.
>>
>>110322105
Both zig and odin are memes made my literally who.
>>
>>110322260
There is no reason a hobbyist shouldn't use C++ or Rust which have already established ecosystems. Unless your main goal is to explore the languages themselves, there is little point of reinventing all the wheels just to use zig or whatever for your non trivial project.
>>
File: 1790578964721658.jpg (58 KB, 1072x1072)
58 KB JPG
>>110322260
>Excuse you niggers the white men are talking. If you want employability the only option is C++ for old languages or Rust for new. Period. Anything else is a meme for hobbyists.
>>
>>110322451
>This entire thread is full of autists reinventing the wheel
There is a difference between writing your own program like a game engine and also writing all the libraries a game engine would use because you picked language that doesn't have any.
There are more interesting stuff to write in an engine than making your own PNG parser(or libpng wrapper) and so.

>They would literally be further using a javascript framework than picking a meme language to spend years of their lives rewriting things that have existed since the 90s.
I have used JavaScript to make games. There isn't that many stuff you need to write when using C++/Rust with libraries over using JavaScript. The major difference is really the language semantics and performance you are going to get out of it. Stuff like windowing, inputs, *GL initialization, filesystem etc can come from libraries.

>There's a reason you only see things like stupid little renderings of monkeys
Yeah because this thread is primarily about making engines not games. It's all about implementing renderers, entity lifecycles, asset managers and stuff like that. That's like saying that people who make browsers do not show off any beautiful websites.

>Everyone here is wasting their life and should feel like damn stupid niggers. They're like jeets posting their first cube spinning on LinkedIn thinking we should be impressed. Stupid fucking niggers.
You are obsessed with politics so much you look at software and see skin colors.
What people do here is far from wasting their time. A huge amount of people when they reach that 30+ age just give up on any self actualization and become mindless drones that go to work and then watch Netflix for the rest of the day. Having hobbies, especially creative ones that force you to use your brain makes you stay sharp. Whenever you like learning foreign languages, working on mathematical problems, or coming up with novel ways of solving the rendering equation, it's good for you.
>>
>>110322337
The big reason is compile time.

>>110322260
I am the one who suggest Zig and I agree with you. I would use C++ if I could tolerate it and Rust if it was not infested with trannies, which is why I just use C. I can generally pretend I know C++ as long as I keep up with its new abstraction of the year that will solve every problem with programming.

Swift is the only other language that I have liked desu mostly because of the syntax and the consistency of rules.
>>
>>110322793
Not enough people here are taking the lisp pill
>>
>>110322793
>The big reason is compile time.
It doesn't matter much if you are working if a language server. Compiling is just a small fraction of time you spent developing.
>>
>>110322814
>working if a language server
*working with a language server
>>
>>110322810
The only interesting lisp is Shen, and i've never seen a lisp LARPer use it
>>
>>110322814
DIGGER There is a reason why JBlow talks of clean build compile times of Jai. Fucking incremental builds are unreliable and you're talking of linting.
>>
>>110323456
I do not care who blowjob is. Also works on my machine.
>>
>>110323482
Yeah man try developing an actual game and not just a static asset show case.
>>
>>110324112
Good for him!
>>
>>110322757
No one reading your blogpost lil bro
>>
>>110321187
andrew kelly is a fucking idiot
>>
>>110322451
>This entire thread is full of autists reinventing the wheel.
I literally built a throbber in clojure cljfx and javafx to literally spin a wheel in OpenGL reinvented and I even hosted it on my own website (port 80 so just trust me bro until I get business class ISP privileges). I also made my own GUI in Maclisp. Single tenant supremacy lesson plan. That was a few threads ago though. I also raced the beam and did a Moire effect lab.
>>
File: maxresdefault (7).jpg (93 KB, 1280x720)
93 KB JPG
>>110324875
you either die a dlc modder or live long enough to see yourself become the bingchilling
>>
>>110322451
why are you so mad about people who make things? AI exists, surely you can use it and satisfy your jealousy instead of constantly seething at the people in this thread
>>
>>110322757
>There are more interesting stuff to write in an engine
this exactly, there's almost infinite game specific things you can and should do in an engine, cloning unity is a failure of skill and imagination, for example, you're making isometric RPG? great, there's a whole lot of optimizations you can do when camera looks at ground all the time - fix the shadow maps to the exact frustum intersection for maximal shadow fidelity, drop the occlusion culling, implement nice alpha blending of close parts of the building and tree kits so they don't obstruct view, write a whole lot of tools for kit placement on the map, write geometry fusing and blending for them, leverage the fact that camera only moves in 2D to write a specialized streaming system so there are no loading screens
>>
>>110324983
>why are you so mad about people who make things
stupid people are often jealous of others who can do thigs they can't, it causes them mental anguish, just look at vibe coding pajeets in other threads, they simply can't stand the thought of people producing better results with their skills and knowledge lol
>>
So did the AI weirdos fuck off to their own thread? Haven't been on here for over a week.

I say this as someone who does use AI daily, but there's a difference between AI assisted and just slopping out gunk.
>>110317378
Loved Odin honestly, if it weren't for Jai I'd still be using it.
>>
>>110325341
why is Jai better?
>>
>>110325353
Syntax isn't really better, it's also not finished yet so I'd say it's rougher around the edges, but the main thing is the metaprogramming completely doing away with build systems and making compile time code generation trivial.

The second subtler point is that it's out of your way. Most people when asked what they like about Jai can't name it because it's not something that gets any attention, but that's the good part. I haven't really ever felt like the language was getting in my way in any way and I've been using it for a little under a year. Odin was also pretty smooth, but not as smooth. C++ is by far the fucking worst (that I've tried, I imagine Rust's borrow checker is even worse).
>>
>>110325448
Post your game
>>
>>110325501
it's sobokan but with blowjobs
>>
>>110325536
Sounds good. Post it.
>>
>>110325501
He won't show you because it'll reveal he's a spawn dev here to shill his AI platform. Someone in the other general showed that spawn had free Fable 5.2 before spawn's twitter even announced it. Notice he's in an engine dev thread and not the agdg? He's a spawn dev.
>>
>>110325503
>The 3js poster is likely a dev
The 3js poster is an Indian who can't even manage to make a game with AI, all he does is post tweets
>>
>>110326223
Indians don't own cotton plantations
>>
File: file.png (985 KB, 1789x921)
985 KB PNG
From time to time I try a frontier model just to see how it would do on my codebase, this is the validation boilerplate Fable 5.2 xhigh shat out, this is despite using ponytail and specific instructions not to do it in AGENTS.md
>>
>>110327158
Yeah I don't let it code unsupervised. Tools and stuff yeah, fuck tool development, but for actual game/engine code I always review everything it writes to avoid shit like this. Nice for refactors and stuff though, when it already has a spec to work off of.

Never let it design new systems on its own, it always misses something, even the best "frontier" models on max effort do.
>>
enginedev is the only sane thing to do as a programmer. what is the point of using a game engine as a programmer? engines are made for artists and scripters, programmers literally have nothing to do in game engines. it's like using an aimbot to play a shooter, it makes everything easier but also makes it completely pointless to even play.
>>
>>110327462
I don't have time to learn all the state of the art rendering techniques, I want to make a game before I run out of savings and go homeless.
>>
I told Claude to make games and it failed
>>
>>110327479
yeah that's why i said "as a programmer", because a programmer is not a game designer, not a writer, not an artist, not a sound designer, not a musician, not a creative director, not a marketing guy, not a lawyer, not a business man, not a team manager, not a hiring department etc.

somehow this current generation is too retarded to detect the pattern that all their favorite games had teams working on them and programmers focused on programming and not on 20 other jobs.
>>
>>110327479
>I don't have time to learn all the state of the art rendering techniques
AI has made this obselete
>>
>>110327506
Well my goal is to make a game, not to make an engine that nobody will use since I don't have a team nor money to hire a team.
>>
>>110327519
making a video game costs a lot of money and takes a lot of specialized people working on it. sorry that you are so low iq that you cannot detect this pattern. actually its such an obvious fact that i consider you are mentally handicapped.
>>
>>110327370
I have no idea how can anyone who's serious about this just let those things work unattended, this right here is why I know they are just fucking lying or are simply too incompetent to know why it's bad
>>
>>110327462
>>110327479
there are programmer-oriented engines, where you can set up everything from C++ or Lua like WickedEngine, or Stingray when it was still available, that area also lightweight enough so you can modify them if you need to
>>
>>110321187
odin and jai arent similar outside of surface level syntax details.
>>
>>110323097
>shen
wow, a dogshit prolog wannabe. so interesting.
>>
File: 1764275054482587.png (148 KB, 370x370)
148 KB PNG
>>110327919
Because pic related was right and programming is about understanding and managing complexity. People who are shit programmers think a small mistake in Claude's code is just a minor thing, but they don't understand that since Claude will roll with it that mistake becomes a huge cascading issue down the line.

That's why all the vibeslopper games are the equivalent of the mid-2010s Unity asset store shovelware. Complexity explodes as no human was telling the AI no, and then the AI starts going in circles, fixing one problem but causing two others. At that point the codebase is a massive pile of slop that nobody would want to refactor, and the vibesloppers don't have the understanding to refactor it to begin with. After all you'd think they'd have made a lot of quality games by now, considering how fast they shit out LoC, right?

Nothing wrong with letting AI write some of your code, programming was never about writing actual code once you get past junior level, but you gotta watch it like a hawk and you will need to step in quite often. Also never let AI design new systems entirely, it's an absolute slopfest.
>>
>>110327527
queen's domain was made by 2 people
>>
>>110328329
Buy an ad
>>
I think I found a way to make a game that can't be played on Linux no matter how you try to Wine it. I tried to move some files from my old Windows PC and kept getting errors. It turned out to be because a file name was too long, even though Windows had no problem with it.
>>
>>110327527
nethack? Linley's Dungeon Crawl? one person.
>>
>>110328875
I would be surprised if linux was more restrictive than windows
maybe if you put your wine prefix on / if you have a really long path prefix for it
>>
>>110328941
I was surprised by that too, I couldn't even move it from my USB stick to the desktop even though the path it was originally in was much longer. The filename had a very long text in Japanese, maybe Linux encodes it less efficiently somehow, I believe Windows uses UTF-16 internally.
>>
>>110328329
>Complexity explodes
this is basically the crux of the problem, statistical inference can't fake the heuristics we use for complexity reduction and this has to be done iteratively, at all levels of the system and with the holistic view of it, or the system just turns into a dump
>>
>>110328608
another tired nostalgia game. no shit, the hard part was done by other people.
>>
>>110330304
I want to make a nostalgia clone game too, good thing you're also thinking that it's possible.
>>
>>110330304
>nostalgia game
Nobody has nostalgia for Kings Field people only care about it because it was make by the creators of Dark Souls
>>
Sigh...my game engine made with a cheap AI wasn't 100% efficient and now it has to be human coded.
>>
>>110330390
making a game to ride on the coattails of a game that is riding on the coattails of another game is some pretty funny stuff
>>
added console panel, command parsing, fixed a bug with normal vectors this week, added a material system, GPU buffer fuckery, ported shaders to spirv
>>
File: 1794412957060135.jpg (72 KB, 716x1126)
72 KB JPG
>>110322793
C is a language for the 70s and 80s. It is a language made for the compiler, on computers with literally no RAM. It was quickly made, quickly shipped with the wires and tooling in separate boxes. The reason C became so dominant, was because you could compile it using only 16k of ram, and it was the fastest language. C is good for device drivers that needs a lot of comptibility, but is an annoyance when making larger systems. Modern C libraries have files with 20_000 lines of code, written in the order the micro-compiler wants to read them(completely backwards). It is a unflexible language. C is awsome, but not for gamedev in 2026
>>
>>110331529
Hi Bjarne.
>>
Queen's Domain has sold twice as much as Order of The Sinking Star lmao. AI bros, we win again.
>>
Everyone's slopping out stuff that looks sort of, kind of cool and I'm getting demoralized. I don't know what/how I want to proceed. Even as a hobby, I'm getting extremely demotivated these days.
Number uno: I don't have an awesome idea that could be shown off.
Number duo: I switch languages every 2 months. I need to stick to one thing.
>>
>>110327527
even dwarf fortress was made by one person
>>
>>110332068
His bro helps out though
>>
>>110328329
>Because pic related was right and programming is about understanding and managing complexity

yes and no.

yes: he was right
no: his edgey take on well established principles (OOP concepts, SOLID, etc.) and general cynical attitude towards all things good, make him a retard. there can be academic retards.. there can be somewhat intellectual retards. he is a retard.
why? he rejects the actual solutions for these things with his false takes.

he always sighs whenever he deals with anything. he is begrudgingly dealing with complexity, not taming it.

the OOP concepts and SOLID principles have their place. of course everything has its bad sides, nothing is perfect and the bad things can be exaggerated, for example as it has been done with perverse inheritance hierarchies (java - greatest offender). but you would be throwing the baby out with the bathwater and be a RETARD for doing so.

modularization, encapsulation, each and every single principle in the SOLID serves the purpose of taming the beast that is complexity.
the human mental working capacity is limited, at some point, you will stop having an all encompassing overview of a huge system which is evergrowing.
with a limited scope and sight, you can only deal with a handful of "things", if these things are designed in manner that they can be viewed and reasoned about in isolation, it becomes workable.

fuck it, im not gonna try to explain it. he is wrong. he is an idiot. and anyone who believes him, has been gated by complexity and does not know better, just wants a social partner to lament together how bad they are.

PS: his games also suck.
PPS: these people reject OOP, just to then start doing shit like~

MyThing = struct {}

void MyThingDoX(myThing *MyThing, ...)
void MyThingDoY(myThing *MyThing, ...)

you see them implement encapsulation and all the other stuff, they were poo-pooing.
idiots. i really can't stand it.
>>
>>110333072
SOLD sucks, completely worthless
Look at this article:
https://www.geeksforgeeks.org/system-design/solid-principle-in-programming-understand-with-real-life-examples/

If you search for the word "class", the article contains the word 82, times. Jai is made for data-orianted design. It does not have the possibility to create classes.
>>
File: arne no jikenbo.jpg (284 KB, 1920x1080)
284 KB JPG
Its time to start the ui.
Fuck me I'm going to fucking do it.
>>
>>110333072
OOP is much more than just encapsulation retard. Most OOP critics have nothing against structs with methods except the problems with cache locality.
Both Rust and Jai allow you to do what you are saying. The big problem is inheritance, and in particular, runtime polymorphism.
If you want to see the problems with OOP, just use Qt. Cocoa is the only case I have seen of runtime polymorphism done right, and it's precisely because they reject the standard runtime inheritance stuff instead using protocols and delegates.
>>
>>110333730
OOP, especially how with C++ object model is an insane destruction of performance too, people just got used to repeating goycattle shit like "the compiler will optimize it" no it wont. you get .rodata entry for vtable per class and then additional typeinfo structure if RTTI is enabled. a regular non-polymorphic method call compiles to:

mov rax,[rdi];
call [rax+slot*8]

so off the bat you get a likely cache miss on one of the two dependent loads (why? look closely at the arithmetic in this assembly) and you pay this price on *every call* then you also pay the price at construction: when Base::Base() is called it sets the vtable offset and then the base is re-set by every constructor called downstream. Again this can't be optimized away because the standard says verbatim that in particular type's constructor the dispatch must go to that type's methods, it's also why calling a virtual method in a constructor is illegal and raises __cxa_pure_virtual abort. Then you need a virtual destructor because it's an UB if you have at least one virtual method and non-virtual destructor and if you do. Then the most damaging case for performance: multiple inheritance, here the compiler inserts thunks so that when you convert the pointer to one of the Bases, the vtable pointer offset is adjusted and the thunk is used to adjust it back. The indirect branches are only cheap if they are predicted which they almost never are because OOP sloppers just call shit at random (this is why Mike Acton recommended to at least sort by type if you must use the dynamic dispatch in C++). It's literally a death by thousand cuts for performance.
>>
>>110334101
Finally there's a problem of aliasing - the compiler must assume the implicit this pointer can alias any other object of the same class or a different class with the same underlying size, so you are forced to do the entire chain of indirect calls *always*. And on top of that you pollute the data cache with the this pointers. The rules around de-virtualization are so stringent due to correctness you almost never get it, essentially it only happens on virtual methods of leaf classes marked as final. Inlining can't be performed on virtual methods, so the same condition blocks inlining. OOP in C++ can simply not be made performant even in principle. a BTB-predicted indirect jump (15-20 cycles on a mispredict) is the minimum cost you pay for every single simple non-virtual call, so much for "you don't pay for what you don't use" lol
>>
Is there any reason at all to learn coding or do it manually, or should devs focus on the parts that AI can't do? I started making a 2d games with Godot and it's doing all the coding but is horrendous with pixel art.
>>
>>110334101
>OOP, especially how with C++ object model is an insane destruction of performance
its not, this is a performance larper myth
>>
>>110334871
Yes it is.
Try to write a cheat for an OOP game and you'll be disgusted by how many pointers you have to walk to get the simplest information.
In UE5, to obtain the player's yaw/pitch, you need to walk 9 pointers. Information that in procedual C games is in a static address behind ZERO pointers.
No wonder you need crazy X3D nasa processors to play any UE5/Unity game. They spend thousands of cycles just trying to access yaw/pitch.
>>
>>110335005
>Try to write a cheat
I take it you've never actually worked on a game
>>
>>110335035
I have and do, though most usage my game engine sees these days is as a DMA ESP overlay.
>>
>>110335055
Then you'd know that they're all bottlenecked by the GPU so none of this shit actually matters
Your entire rant on virtual functions is based on the predicate that they're using them for everything when 95% of calls in a typical program aren't virtual
>>
>>110334567
99% of devs in the workforce havent written a single line of code in months
>>
>>110335071
All UE5/Unity games I play are always hard-bottlenecked by CPU. Why do you think X3D is basically a necessity if you want to play Tarkov or Squad these days? Hell even fucking My Summer Car is severly CPU-bound. I remember back in the day it ran at like 40fps on a Ryzen 1600.
Though UE5 is also atrociously poor with GPU, but my 3060 would still manage if my 5800X wasn't chocking on the pointer rat nest.
>when 95% of calls in a typical program aren't virtual
I think in UE5 it might be literally the other way around ...
But I wasn't even talking about virtual calls, your CPU is constantly starved of data, traversing your retarded object trees
>>
>>110335112
You're a cheat developer with dunning-kruger who doesn't know how games are actually structured
>>
>>110335123
I'd assume developing cheats requires you to understand how your target game is structured ...
>>
>>110335147
How but not why
You don't actually understand performance at all
You're parroting what Mike Acton said, which might have been true for PS3 games but definitely isn't true today, no game running in C++ is bottlenecked by virtual calls
>>
>>110335176
Then why are X3D processors basically necessary to play engine games these days?
>>
>>110335197
Games made with public engines typically have poor performance because the developers do not know how to use the engine, anyone can use these engines
I've played Unity games with good performance
>>
>>110335231
>Unity game with good performance
I've yet to ever see such a thing
>>
>>110335237
city skylines
>>
>>110335231
>poor performance because the developers do not know how to use the engine
Also wrong, basic UE5 wallhacks work with minimal changes accross virtually all UE5 games. It wasn't the developers who put the yaw/pitch values behind 9 pointers, it's how the game engine works inherently.
>>
>>110335264
Is this a joke
>>
>>110335266
You're making the assumption here that being being 9 pointers is bad for performance

>>110335279
No? It's like a 10 year old game, it runs and entire city sim and it ran well even when it came out
Ran better than Sim City 5 which was on its own custom engine
>>
>>110335300
I remember playing Cities skyline on that aforamentioned ryzen 1600 and it struggled to keep decent FPS with basically a blank map. Sure it wasn't a crazy performance disaster and maintains playability to a fair degree, but compare what Factorio can do with far lesser resources and CS1 too starts to seem like the slow bloated engine slop it is.
>>
>>110335338
Factorio is a 2D game, Skylines is a 3D game
>>
>>110335347
Makes no difference to simulation
>>
>>110335350
You're not measuring the simulation in isolation
>>
>>110335369
The slightly more complex graphics don't justify the simulations performing at several orders of magnitude apart.
>>
>>110335424
They do, because 3D is an order of magnitude more complex than 2D
>>
>>110335264
That game required the developers to take the engine apart and rewrite half of it in order to get the game to run at a reasonable framerate.
>>
>>110335637
They didn't rewrite half of Unity
>>
>>110335637
Got any technical blog posts or something about this?
I made some Unity game but I didn't knew you can actually rewrite parts of the engine itself. I wonder what kind of challenges they encountered.
>>
>>110335659
I just recall long time ago that they had to modify or replace some parts of Unity for performance reasons, I don't actually know the extent to which they did so or what parts.
>>
>>110335784
>I don't actually know the extent
You literally just claimed they "took the engine apart and rewrote half of it"
>>
>>110335784
>>110335637
>>110335648
>>110335659
My hunch is that they just didn't use Unity's systems and structures, and wrote their simulation like a program-inside-a-program. That's the only way to can make anything run somewhat decent in engines, one way or another you just don't use them.
>>
>>110335811
Yeah, I was exaggerating because I didn't think I would be having a real discussion about it.
>>
>>110334871
I literally explained in detail why it is you retard
>>
>>110335811
It's not even possible to rewrite half of Unity, it's not open source
>>
>>110335827
Their sim is written in C++ IIRC
>That's the only way to can make anything run somewhat decent in engines
Every game made in the past 20 years or so uses an "engine", engine doesnt just refer to Unity and Unreal
>>
>>110335035
>I take it you've never actually worked on a game
he is right and you can verify it by either compiling UE5 yourself or stepping through any UE5 game in a debugger lmao
>>
>>110335837
Your explanation assumes virtual function calls are used for everything which isn't close to true
>>
>>110335835
>go to engine development general
>make a extraordinary claim about engine development
>didn't expect people will actually want to discuss engine development in an engine development thread
>>
>>110335854
even non-virtual calls carry unnecessary cost due to aliasing on this pointer dingdong, the only way to avoid OOP induced slowdowns is to not write OOP code in the first place
>>
>>110335871
>even non-virtual calls carry unnecessary cost due to aliasing on this pointer dingdong
True but that's trival
Might aswell tell people to stop using C because of the function call overhead
>>
>>110335887
>True but that's trival
it's not trivial, it's just not a "hot spot" in a profiler because the slowdown is diffuse across the entire codebase, it affects everything, including TLB, all of the caches, the prefetcher and the branch predictor, you literally fight against every single part of the CPU architecture for no benefit whatsoever lol
>Might aswell tell people to stop using C because of the function call overhead
false equivalency
>>
>>110317996
just port mocumocudance with physics (or waifusexsimulator)
>>
>>110335901
You know people pass pointers into functions without using OOP right? C has abstractions, it has pointer aliasing, it has function calls, these also cost something, performance larpers have just arbitrarily decided these costs are acceptable while OOP ones aren't
>>
>>110335084
>99% of devs in the workforce havent written a single line of code in months
this is not even remotely close to the truth, rajesh
>>
>>110335907
>You know people pass pointers into functions without using OOP right? C has abstractions, it has pointer aliasing
obviously it's as bad I never said it isn't
>performance larpers have just arbitrarily decided these costs are acceptable while OOP ones aren't
you are retarded and never worked on production code in your life, and people like you are why the industry gets away with ever shittier running software. the only non-damaging way of using class abstraction and dynamic dispatch in is to make the virtual functions perform significantly more work than the dispatch cost itself, for example instead of making those retarded childish "shape -> circle" with "draw()" method you get something like "renderer -> circlerenderer" that has "virtual draw(const vector<Circle>&)" where you draw a batch, it's essentially the same architectural transformation as AoS to SoA. anyone advocating doing the 2000s style "OOP" is just fucked in the head in the year of our lord
>>
>>110335946
>obviously it's as bad I never said it isn't
You said OOP was bad and then you gave a reason which applies literally just as much to non-OOP code as OOP code
>you are retarded and never worked on production code in your life
I'm sure you have right? I'm sure you handroll assembly for your companies games, unlike everyone else using C++
>>
>>110335871
not anon, but can you explain what you are trying to say?
because aliasing is a problem when you have multiple pointers with the same type carried into a function, but the this pointer is a pointer of this, the only time you have more than 1 this pointer is if you have a compare or assign operator, and I don't see how this doesn't apply to C code that also has a this pointer (I don't write C but I've seen it used in SDL's codebase).
>>
>>110335968
>I don't see how this doesn't apply to C code that also has a this pointer
It does, he's a retard who performance larped himself into a corner
>>
>>110335954
>I'm sure you handroll assembly for your companies games, unlike everyone else using C++
I literally worked on two commercial game engines where I wrote SSE intrinsic based code AND had to inspect assembly all the time and now I work at a HFT firm you fucking retard. how do you think I know how C++ object model is constructed by heart?
>>
>>110335968
>not anon, but can you explain what you are trying to say?
this pointer prevents the function that references class fields through it from keeping them in registers, they have to be written back and then read back from the object memory offsets because this is not and can't be declared as __restrict, this is the primary reason why aliasing deteriorates performance even in non-virtual accesses
>>
>>110336025
>I literally worked on two commercial game engines
Then you'd know that 95% of game code isn't "high performance" code like you'd write in HFT
What parts of a game do you think you need that level of efficiency for?
>>
>>110335975
>It does, he's a retard who performance larped himself into a corner
all of the things I said about pointer accesses in C++ apply to C dipshit, it's just in C you are not FORCED by the language semantics into it like you are when you use C++ classes
>>
>>110336050
C++ doesn't force you to use OOP and passing around pointers in C is very idiomatic
>>
>>110336040
>Then you'd know that 95% of game code isn't "high performance"
this is patently not true, and if you don't believe me you should go through this: https://deplinenoise.wordpress.com/2017/09/01/slides-cedec-2017/
>>
File: file.png (36 KB, 1679x116)
36 KB PNG
>>110336058
this is what I was responding to originally
>>
>>110336061
>this is patently not true
then tell me why I'm wrong in your own words mr "I worked on 2 commerical engines"
In my experience handrolled assembly hasn't really been neccessary anywhere for like 20 years, maybe if you're trying to squeeze max performance out of a console
>>
>>110336076
>In my experience handrolled assembly hasn't really been neccessary anywhere for like 20 years
the entire SPU part of Resistance 2 water sim was hand written assembly
https://github.com/nocturnal/R2O/blob/master/SPU/igR2OAsmComplexSpu.spa
Naughty Dog's entire animation blending and IK pipeline was about 150k LOC of hand written assembly language, you have fuckton of assemly written even in open source projects like ffmpeg, but most importantly what I'm telling you is not that you have to write in assembly but that you don't need to be a retard when you write C++, and assertion that "you can just slop out gameplay code not caring about performance" is literally why we don't have games with interesting gameplay systems anymore
>>
>>110336143
Ok we've got the aforementioned squeezing max performance out of a console, what about the rest of the game, the other 99%?
>assertion that "you can just slop out gameplay code not caring about performance"
who said this? You need to strike the right balance, what you're advocating for is literally handwritten assembly, you're going even further than the regular OOP haters
> literally why we don't have games with interesting gameplay systems anymore
I work on interesting gameplay systems and I'm not writing code that gives a shit about pointer aliasing I can tell you that much
Interesting gameplay systems are not built by writing rigid, 100% efficient code. Interesting gameplay systems tend to be full of things that reference each other in complex ways
>>
>>110336143
Oh yeah, and Resistance 2 is 18 years old, lol
>>
>>110336180
>Ok we've got the aforementioned squeezing max performance out of a console, what about the rest of the game, the other 99%?
even if you make simpler games you should still care about performance because a lot of people play them on laptops, phones and things like steam deck where you burn battery time by wasting hardware capacity
>you're advocating for is literally handwritten assembly
I don't, I advocate writing C++ that doesn't result in retarded assembly and then using intrinsic for select algorithms on the hot paths
>Interesting gameplay systems are not built by writing rigid, 100% efficient code.
interesting gameplay systems come from being able to do lots of spatial queries, pulling data from physics and animation systems efficiently, so you can implement features that complement core gameplay systems, for example doing things like climbing a large skinned model or having large crowds actually react to what the player is doing, all of which require good performance across both the engine and gameplay code. it's a fucking cuck attitude to give a pass for sloppy programming to the games companies
>>
>>110336265
>I don't
You do. Complaining about pointer aliasing is fucking ridiculous, at that point you aren't even writing functions anymore
>interesting gameplay systems come from being able to do lots of spatial queries, pulling data from physics and animation systems efficiently
Yeah you're right
And you might be able to build the bottom 1% with handrolled assembly, but for all the stuff that sits ontop of it you go back to regular optimization rules like, not doing stuff you don't need, caching things, not doing O(n^2) operations, etc. to keep things sane and maintainable
>>
>>110335902
I am not making porn game and I think glorified animation players but VR are not fun.
My renderer does try to imitate mikumikudance rendering. I am also using collider and joint data from the model, at least for the details like hair and skirt. The ragdoll joints are defined in my program and there is quite some modifications done to the model because MMD models are not meant for physical simulations, just fixed animations.
>>
>>110336308
>Complaining about pointer aliasing is fucking ridiculous, at that point you aren't even writing functions anymore
pointer aliasing is the single most important obstacle in C and C++ compiler optimization, literally everything else is downstream from the fact the compiler can't do loop-invariant code motion, so every time you access anything via this pointer or any other pointer in an inner loop the compiler can't fix it for you. it's impossible to fix automatically due to Rice's theorem, it's literally undecidable so you are forced to hit memory for things that almost certainly could have been held in registers. how does that ties to my criticism of C++? again, if you ever use a class abstraction you introduce pointer accesses that can't be hoisted out of the loop or reordered by the compiler. there's only one way to fix this - before you enter the loop you cache the values you use *by value* in local variables which are legal to be held in registers at all times and then you write the result to memory by hand. you can't prevent it and it does have noticeable effect and it's the biggest flaw of C++ object model
>>
>>110336461
Literally the same thing applies to C using pointers, or every programming language that uses pointers really
You're doing the typical nerd shit where you laser-focus on your specific field if expertise and ignore the bigger picture
>>
>>110336461
I remember when I first learned of this, I was doing voxel meshing and just caching an u32 value that was behind a pointer made that mesher run like 15% faster. I was assuming back then the compiler would optimize it for me ... Learning about aliasing kind of shattered my naive world view.
>>
>>110336480
>Literally the same thing applies to C using pointers, or every programming language that uses pointers really
yes, again, I said multiple times it's all pointers, we'd be better off if another language won
>You're doing the typical nerd shit where you laser-focus on your specific field if expertise and ignore the bigger picture
depending on the paper and measurements they did, the usual figure is at least 40% of all CPU time is wasted due to optimizations that are prevented due to aliasing, this is not some theoretical nerd shit it directly affects user experience and battery life
>>
>>110336516
>compiler would optimize it for me
it literally can't because it's undecidable, I'm not even going to defend C or C++ here, we would be better off if a language without pointers won
>>
>>110336571
You're saying aliasing is a flaw of OOP when it has nothing to do with OOP and it's just about pointers in general
>40% of all CPU time is wasted due to optimizations that are prevented due to aliasing
this sounds incredibly theoretical
>>
>>110336581
>You're saying aliasing is a flaw of OOP when it has nothing to do with OOP and it's just about pointers in general
again, what I said is that the object model in C++ forces you into a situation where the compiler has to generate implicit pointer accesses that can't be shed which in turn introduce aliasing that prevents the compiler from optimizing the code properly, learn to fucking read
>>
>>110336594
Nobody is forcing you to use member functions in C++
>>
How have you integrated AI into your workflow? Most devs today have automated 90% of their programming?
>>
>>110336598
>Nobody is forcing you to use member functions in C++
obviously, and I dont
>>110336581
>this sounds incredibly theoretical
https://developer.nvidia.com/blog/cuda-pro-tip-optimize-pointer-aliasing/
https://beza1e1.tuxen.de/articles/faster_than_C.html
>>
>>110336602
most of my code is written by AI but I still tell it what to write
>>
File: chatgpt_turdworlders.jpg (103 KB, 640x759)
103 KB JPG
>>110336602
go back to eating shit and raping children, saar
>>
>>110336610
Your links dont have a 40% figure anywhere and are just basic introductions to the concept
You sound like a larper
>>
>>110336598
oop decided to base their entire operating model on something that can't be optimized. pretty retarded move
>>
>>110336602
I ask it to debug an issue if I run out of ideas myself. That's about it.
Every time I tried to use AI to actually generate code any more complex than eg just inlining a function, I ended up rewriting it all manually anyway because of just how much overengineering and slop it produces. AI can't write clean, robust code.
>>
>>110336639
pointers are not exclusive to OOP you fucking idiot
>>
>>110336653
>AI can't write clean, robust code.
it can if it has previous conventions you've established to work off
>>
>>110336655
>pointers are not exclusive to OOP you fucking idiot
they are not, but if you do OOP in C++ you have no choice
>>
>>110336663
Nobody is forcing you to use member functions
>>
>>110336602
I’ve been copy pasting code for a while now but with the release of cmake 4.5 the general ecosystem has matured enough that I’m ready to start the automation transition. However C++ is a delicate language so I need to establish a thorough rules docs. Right now I just tell it to stick to the core guidelines and avoid shared_ptr which has produced pleasing results.
>>
File: durr.png (14 KB, 112x112)
14 KB PNG
>>110336671
>Nobody is forcing you to use member functions
"just do OOP without member functions bro"
>>
>>110336671
co-locating behavior and data is what oop is, anon. if you don't do that, you are doing procedural programming, i.e. separating procedures from data
>>
>>110336677
>>110336687
If you want to write a function in C++ that doesn't take pointers, you can do so
Complaining that member functions take pointers when that's literally what they're supposed to do is retarded
>>
>>110336698
i agree, member functions suck, oop uses member function, therefore oop sucks
>>
>>110336718
Yes I'm sure you don't pass pointers into any functions
>>
>>110336661
Software development is more than just following conventions. You can write code that fully adheres to any rules you set and still end up with 3x more LoC, with abstractions done in places that do not need it and lacking in places where it would be useful in the future. The more creative freedom you give to an AI the more places it can fuck up. I found this true in all kinds of projects I done, vibe coded, legacy or even in my attempt at work to create a boilerplate with thousands of lines of documentation, skills and rules that tried to encompass all written and non written rules that we do to develop software. AI still manages to regularly write code that is clearly badly designed from the architectural and future-proof standpoint.
In practice the only use I found of AI that does not need extensive reviews, many iterations and constant babysitting is diagnostics, writing docs, explaining and making one shot modifications/scripts like "generate me 100 fake users in database" or "do a fuzzy test on this interface to look for unexpected edge cases". That's where it is genuinely useful and significantly faster than manual work.
>>
>>110336733
please write some oop code that doesn't use member functions
>>
>>110336778
This complaint only makes sense from the perspective that you're forced to use OOP, but you aren't
>>
>>110336776
>The more creative freedom you give to an AI the more places it can fuck up.
I agree
I just write function headers and tell it to fill out the rest and it writes exactly what I would have written based on current conventions and logical deduction
but im 80% of the way through my project at this point
>>
File: 1733759465287225.png (173 KB, 430x523)
173 KB PNG
STOP ARGUING ABOUT OOP FOR ONE FUCKING DAY
>>
File: foop.png (14 KB, 324x295)
14 KB PNG
FOOP is the future.
* foop = Functional Object-Oriented Programming
>>
>>110336795
>This complaint only makes sense from the perspective that you're forced to use OOP, but you aren't
this entire discussion and my initial comments were strictly about OOP in C++, you are literally deflecting right now
>>
File: bugs_no.jpg (33 KB, 508x903)
33 KB JPG
>>110336802
>STOP ARGUING ABOUT OOP FOR ONE FUCKING DAY
>>
>>110336938
You are not forced to use member functions in C++, it's not Java
>>
>>110336802
If everyone stopped using OOP, we wouldn't have to argue about it.
>>
File: 1785242952344582.png (46 KB, 184x184)
46 KB PNG
>>110330304
woah would you look at that
the goalpost is way over there now
>>
>>110336950
>You are not forced to use member functions in C++, it's not Java
it's not OOP then is it?
>>110337109
pretty much everyone did at this point, modern C++ code is mostly procedural/generic/functional
>>
>>110337259
Nowhere does anyone say you have to use OOP for everything
Most if not all serious C++ game codebases are OOP
>>
Work on the ui is going okay so far. I'll post some progress late tonight ideally.

What do you lads think of Box3D?
https://youtu.be/jr_Fzl2XwKU
>>
>>110338811
>What do you lads think of Box3D?
I already integrated it in my engine, it's excellent so far, I didn't even encounter any serious bugs which I fully expected to
>>
>>110338811
Kind of a meme. 3D physics has been a solved problem in video games since 2004ish until Kerbal Space Program and then since then there is like nothing. Unity after all theses years still never added conservation of angular momentum back in to their engine, it's never been there and there are only like 3 posts in all of the history of Unity Forums where people even wondered why that is.
>>
>>110338911
>3D physics has been a solved problem in video games since 2004ish
it was, with ivp/havana being probably the best, most stable iteration at the time, then it just deteriorated like everything in software. PhysX existed only so NVDA could strongarm companies into underperforming on AMD systems
>>
>>110338911
>3D physics has been a solved problem in video games
3D physics libraries dont exist to break new ground and solve new problems
>>
>>110339113
Sure but my main point is that spending more than 2 seconds thinking about your physics engine is a waste of time unless your game is specifically physics based like Angry Birds or Kerbal Space Program.
>>
>>110339190
Not really, some of them are better than others, I've used some ones that are shit to work with
>>
>>110339193
I really ReALLY dont care
>>
>>110338811
box3d is amazing
>>
>>110336516
>>110336571
>>110336577
Just write restrict nigga.
>>
>>110339202
You're a close minded fool
>>
File: lenton_top_0.jpg (231 KB, 625x413)
231 KB JPG
>my boss asked me to write an ERP from scratch
>Oh Claude help me
Im gonna become Lua himself bros
>>
i loathe ai with every fiber of my being but i hate cmake so fucking much that i genuinely think i might just use ai to handle it
>>
>>110339534
valid, every build system is a huge pain in the ass
>>
>>110339534
why don't you just write a metaprogram that compiles your program as a build step
>>
File: malfoid_george_floyd.png (1.12 MB, 1080x1336)
1.12 MB PNG
>>110339216
I can't restrict this pointer
>>
File: modern_tools.png (51 KB, 237x446)
51 KB PNG
>>110339534
>>
>>110339534
You're a retard if you haven't already been using AI for that kind of thing for the last two years. Yeah enjoy wasting weeks/months of your dev cycle fucking around with Cmake instead of letting the AI do it in a few hours.

Same with tooling, haven't made a tool myself in over a year and I'm not going to, the code doesn't ship to anyone so I don't give a shit if it's a little bit less performant or has a few bugs, dealing with those will still cost me 1/100th of the time it would have taken me to write them myself.
>>
>>110340929
If it takes you weeks/months to maintain a basic CMakeLists.txt, then there's something really wrong with you.
>>
>>110341290
Hyperbole, but it's still orders of magnitude more time than it takes me to tell Claude to do it and have it done in 60 seconds.
>>
engines are cool and all but I've lost interest okay? I feel like making some money online by doing freelance work and moving out of my parents house
>>
>>110342257
ok
>>
>>110342257
[unsubscribe]
>>
>>110341717
Dude, you copy-paste a template from github and add a single line each time you create a new .cpp.
>>
i'm gonna take the bevy pill and script everything from lua with bevy_mod_scripting to cope with the horrendous iteration cycle time
>>
>>110342257
off topic bro
>>
>>110342948
that's why rust sucks for game development dude, the compile times make it so painful to work with
>>
JAI release date dropped on jon blowjob's secret club discord. Public beta on December 17th.
>>
>>110345468
the rust troon foundation thought compile time was meaningless compared to "safety", and they thought language complexity was a non-issue.

But here we are in the LLM future and they missed us with that shit being wrong on both assertions.
>>
>>110345468
>the compile times make it so painful to work with
>t. never used Rust
That's not why Rust is not suitable for game development. When working with Rust, you rarely compile your code. You usually just work with a language server and get most of the problems caught statically. You only really compile your code once you are doing implementing whatever you needed and just want to test it out.

The reason why Rust is not well suitable for games is because it strongly encourages waterfall approach. It requires you to be rigid about the types, access patterns, synchronization, etc which makes it harder to rapidly prototype ideas. If you do not have clear idea of what you want to accomplish(like when making an engine for example), having to refactor code over and over again to test new stuff just wastes your time.

This also is not an issue specific to Rust. Some game companies like Valve use premade engines like Unity to quickly create prototypes for their games before they invest time and resources into rewriting that in C++ for Source. There is just no reason to use a slow, time consuming language if all you want to do is just try out ideas.
>>
>>110331529
Nah it's shit but it's still somehow the best of the worst. Someday I will finish my language project and then I will have a systems programming language that's actually an improvement on C.
>>
AI really has made Rust obselete, a language designed to stop as much human error as possible when AI can just do it for you with none of the BDSM borrow checker shit
>>
>>110336039
can you prove it? I told you that you need to have 2 pointers with the same type for aliasing to matter. The "this" pointer is a type, and there is only 1, so it should essentially be restricted, unless your members are pointers (in that case, you can just copy the pointer into a restricted pointer).
Maybe you are mistaking something else causing an issue with optimizations, not aliasing, since most of us mortals don't actually understand how optimizations work, unless you have a PHD.
For example, maybe you are calling a function that isn't attribute(pure/const) in-between accessing the variables AND the object is passed into a external function as a reference or something, so it's possible the object can be modified inside of any external non-pure/const function. And link time optimizations/unity builds may reduce the number of external functions.
>>
ugh this didn't work >>110342948
you can do some stuff but any moderately complicated system scheduling has to be done on the rust side still.

>>110345468
yeah i don't know if it's ever gonna pan out but aspects of rust are so much better than anything else out there i just keep trying to make it work. maybe when the bevy guys get hotpatching fully integrated it won't be so bad.
>>
>>110345801
>stop as much human error as possible
>obselete
>>
>>110345815
It you want to use Rust for your project you need to have a really good idea of what you want to accomplish.
>>
>>110345809
>most of us mortals don't actually understand how optimizations work
are you for real lmao? C++ standard, §3.10/10, the only strict exception is during the object construction (while constructors are being executed)
>For example, maybe you are calling a function that isn't attribute(pure/const) in-between accessing the variables AND the object is passed into a external function as a reference or something, so it's possible the object can be modified inside of any external non-pure/const function.
const qualifier doesn't imply restrict, you are completely missing the point here, outside of the exception I mentioned members accessed via gvalue have to be treated as potentially aliased and have to be loaded/stored from the memory

here's the proof: compile this on gcc with -O2:

struct Acc {
long sum_ = 0;
void add(const long* src, std::size_t n) {
for (std::size_t i = 0; i < n; ++i) sum_ += src[i];
}
};

every single loop iteration there's a store to flush the value: movq %rax, (%rdi) because this is a regular pointer from the perspective of the optimizer. if it wasn't at risk of being aliased the loop-invariant code motion would simply pull it out of the loop and kept in a %rax
>>
>>110345994
You are correct about the spec will alias member values, so the memory values can technically be treated as overlapping.
But with inlining, the optimizer should be smart enough to just take the most optimal path if it just knows it's fine to assume it's not overlapping.
GCC doesn't do it for your example, (you need to copy the sum to a temporary).
It won't even fix the issue if you change the type to something like int or unsigned.
Clang will. But it won't if you enable -fno-strict-aliasing, and __attribute__((noinline)) will create multiple branches to select the fastest path (such as the slow path when you decide to overlap the memory of Acc and the long* which is insane).
I do think we need to take a step back into practicality instead of assembly purity, since technically the assembly gives us no insight into actual performance since the bytecode gets transformed into Micro-op's. I don't actually know anything about Micro-op's but I think it's possible that storing the memory to the same address over and over again could potentially be just as fast as a register. It might not even touch L1 memory (I don't know, this is just a guess).
>>
>>110346511
*actually nevermind, GCC's optimizer is smart enough, I don't know what I did previously to cause it to be messed up. I guess I was not reading the assembly correctly or I left no-inline on.
this was my code I was working with.
https://godbolt.org/z/njTPM94Wo
(yes I know casting argv char** to long* is stupid but it works).
>>
>>110336516
>>110339216
Optimization isn't my forte. But I do know const pointers can also help, when appropriate.

You'll find identical assembly for f1 and f3
https://godbolt.org/z/zMGexj9jE

f2 uses neither and has more instructions
>>
File: anime girl formulas.gif (1.64 MB, 550x508)
1.64 MB GIF
>>110346918
>const pointers
I meant pointer to const. Forgive me /gedg/ ...
>>
>>110346918
But then something happens if you add an -O2 flag. f2 and f3 the functions that use neither restrict nor const are identical now.
f1, which uses restrict has a few more instructions (which to a naive person would imply less optimized) but they are very different. f1 uses SIMD.

So I guess this is a good example on how const can help if you aren't running optimization flags, but it ultimately didn't do anything once the flag was turned on.

That's why I said "when appropriate" in my post. But obviously you are going to run some optimization flags when you build your engine for release. I probably should have used better words there, it seems like I'm implying that const can act as a replacement for restrict.

I just thought this would be an interesting thing to look at. Like I said, optimization isn't my thing, but it is one of the few things I know about.
>>
>>110336461
Rust solves this.
>>
>>110347328
It actually doesn't
>>
>>110347341
It does. Mutable references are guaranteed to hold exclusive access to the referee.
>>
>>110346511
>But with inlining, the optimizer should be smart enough to just take the most optimal path if it just knows it's fine to assume it's not overlapping.
inclining doesn't solve the problem because the code still references the members through a gvalue, and the compiler can't be "smart" here because standard doesn't let it, specifically it prevents vectorizing the loop, this is the full output:

movq (%rdi), %rax ; load sum_ ONCE, before the loop
.L3:
addq (%rsi), %rax ; rax += src[i]
addq $8, %rsi
movq %rax, (%rdi) ; store sum_ EVERY iteration
cmpq %rdx, %rsi
jne .L3

>GCC doesn't do it for your example, (you need to copy the sum to a temporary).
no compiler is allowed to optimize it away because that would be ILLEGAL and result in invalid machine code
>Clang will
no it won't, clang inserts additional branch that checks if the addresses really overlapped and takes a safe branch, but that increases pressue on instruction cache so the heuristic enables it only for small loop bodies, you can verify that in godbolt

the actual solution to this problem was already taught by Chister Ericson in 2003 in his GDC talk, and subsequently by Mice Acton in his talks, you can cache the values in local variables. there is no automatic way of doing it, except for enabling strict aliasing globally which is impossible in most programs, recall linus' rant when gcc enabled it and broke kernel completely back in 2003
>>
>>110347328
>Rust solves this.
yes for safe references, for *mut T it's the same behavior as C++ compilers
>>
>>110347413
Vast majority of Rust code uses references, not raw pointers.
>>
>>110347424
>Vast majority of Rust code uses references, not raw pointers.
I know some rust but it's not used in my industry seriously so I don't have a reason to use it and any benefits from strict aliasing it has are not worth the problems plus like I said majority of the problems I discussed here can be solved by localising the values (which is usually done anyway in non-trivial code). in other words - troon harder
>>
>>110347446
Who asked?
>>
File: file.png (59 KB, 305x473)
59 KB PNG
>>110347557
>Who asked?
>>
>>110347557
>Who asked?
no one asked about the shitpile rust is, if I ever need some parts of anything written in rust I will simply ask claude to rewrite it in C
>>
>>110347407
imagine needing some talk from industry leaders to tell you that locals are faster than pointer accesses
>>
File: file.png (778 KB, 800x450)
778 KB PNG
I was playing Fire Emblem earlier today and realized I wouldn't even know where to start when it comes to working with environments.
All the games I’ve made so far have been 2D platformers or block-based games like Minecraft, where you can manually place every single block. The thing is, the approach used for a game like Fire Emblem isn't entirely clear to me.
I mean, you have the whole map built—likely created separately, perhaps in Blender or similar software, which is then imported into the game, where developers handle things like collisions, masks, and so on. But what about interactive objects? For instance, sometimes you might be able to break down a door or a bridge, burn a bush, etc., these actions change the environment; essentially, the gameplay affects the setting. I don’t imagine this is handled directly within a .obj file exported from Blender. As I understand it, 3D artists create a "stripped-down" version of the map, and then developers layer interactive objects on top of that base. This way, the devs retain control over the objects that players can interact with.
Apologies for the retarded question, I’m just a hobbyist and have never worked with 3D before.
>>
>>110347820
It's really no different in 2D or 3D, you create a bunch of tiles and they can be used by the game however you want, you don't export the whole map as one 3D file
>>
File: file.png (1.12 MB, 1920x1031)
1.12 MB PNG
>>110347840
Well, basically what I did was put everything into Blender, leaving an area in the middle, which is where the actual battlefield takes place. This brown section in the center is manipulated manually. Afterward, I export the object and load it into the stage. The question that remains is: doing everything manually in the code doesn't seem very productive. For instance, if I wanted to add a door in the middle (on the battlefield) that opens and closes, how would I go about that? Should I add the door in Blender and then somehow manipulate it directly via code? Or perhaps it would be better not to include the door in the Blender .obj file, but rather load it dynamically when building the map in-game? I mean, I would need certain animations, like opening/closing, destruction, etc. All these animations would be in Blender; I have no idea how you all would handle this.
By the way, I’m using Raylib. I know it’s a bit "hardcore" for someone without game development experience (especially in 3D—but) my potato PC can’t handle something like Unity or Godot.
>>
>>110347407
> there is no automatic way of doing it, except for enabling strict aliasing globally
strict aliasing might help, but if the function gets fully inlined, it will have more opportunities to get optimized.
https://godbolt.org/z/jWd1j5r17
When you inline, using a local sum generates the same code.
When you uncomment ((noinline)), the local sum is much better. This is with -fno-strict-aliasing.
Without -fno-strict-aliasing, it's the same.
Of course using a local sum is better than explicitly setting __restrict to src. But this seems like it's only relevant for people using -fno-strict-aliasing (which might be better? but I have never hit this bug myself).
Also for some reason gcc does not vectorize int64, only uint32/int32, unlike clang (obviously, I should be aligning the values or something, but I feel like that's not going to change the code at all, and the only consistent way is to manually write simd / use a math library).
So basically, there is no point to copy every single member value to locals.
>>
>>110347916
>Without -fno-strict-aliasing, it's the same.
OH I left __restrict in the *src. SO you do need to care, in this non-inlined situation.
>>
>>110347915
You can load a blender file if that file is divided into subobjects, then you can iterate through the objects and use them to spawn "real" game objects with your blender model as part of them
Or you can make a tile-based map editor where you build levels with 3D objects exported from blender
>>
>void*
this triggers the cRusty wounds
>>
>>110347820
>>110347915
>—
>>
>>110347599
>no one asked about the shitpile rust is
You claimed:
>it's impossible to fix automatically due to Rice's theorem, it's literally undecidable
And I have shows you example of how this can actually be practically solved, which is what Rust does.

>I will simply ask claude
Like pottery
>>
>>110347674
>imagine needing some talk from industry leaders to tell you that locals are faster than pointer accesses
lmao, I mentioned it because they explain in detail why and why it has impact in real code
>if the function gets fully inlined, it will have more opportunities to get optimized.
when you inline functions referencing via implicit gvalue you are pulling more instructions into the callsite increasing i$ pressure, the compiler still has to do those writes (gcc, vc) or checks (clang), this has to be a reading comprehension issue at this point, because you are literally arguing with C++ standard
>When you uncomment ((noinline)), the local sum is much better. This is with -fno-strict-aliasing.
>Without -fno-strict-aliasing, it's the same.
both time

>OH I left __restrict in the *src. SO you do need to care, in this non-inlined situation.
I know, that's what I'm trying to say
>>110350131
>Like pottery
I use LLMs exclusively to disempower trannies by rewriting rust code to C
>>
>>110351085
I was meaning to respond to >>110347916
>>
>>110347820
these are usually made by kitbashing, then the engine does collider generation (or they are recalculated per mesh in the kit) and then watershed navmesh generation for the whole map after it's ready to bake
>>
>>110351085
this guy is mentally ill
>>
>>110350115
Sorry I am japanese
english not too good then I use ai translation
i am sorry for ai
>>
>>110336594
>again, what I said is that the object model in C++ forces you into a situation where the compiler has to generate implicit pointer accesses that can't be shed which in turn introduce aliasing that prevents the compiler from optimizing the code properly
works on my machine
>>
>>110351494
t. school shooter troon
>>
>>110347820
They have a level editor, they don't use a "generic 3D modelling tool without support for entities and without other level-editing tools" like Blender.
See for example Liminal, the level editor plugin for Blender that lets you edit the levels of Godot games. Or Valve's "Hammer".
>>
>>110351808
t. guy larping as an expert working in HFT
>>
>>110345815 here
after switching to linux so i could use bevy_dynamic (could never get it working on windows), switching to cranelift codegen for my crate while keeping dependencies in llvm, and integrating https://docs.rs/bevy/latest/bevy/app/hotpatch/index.html my small program compiles in around a second and can be hotpatched in about half a second making this much more pleasant to work in
gonna make a pong
>>
>>110351550
You should probably preface your first post with that, otherwise you can look like one of the llm bots that plague this website.

To answer your question, you should probably separate model and gameplay data. You can use blender for everything if you write plugins, but if you do not know what you are doing you should keep it simple. For a game like Fire Emblem, instead of model being the root of your map data, consider writing a file like this (TOML):
map_name = "Final Plains"
model_file = "./map.obj"
map_size = [10, 5]
tiles = """
----------
-OO----OO-
-OOOOOOOO-
--OWWWOO--
----------"""

[[entities]]
type = "player_spawn"
x = 1
y = 1

[[entities]]
type = "door_vertical"
x = 5
y = 2

[[entities]]
type = "goblin"
x = 8
y = 1
lvl = 30

[[entities]]
type = "tresure"
x = 9
y = 1
contents = ["amulet_yendor"]


You read that file and then load appropriate 3d model and initialize the playable grid and entities based on data in config file. You do not need to place everything in blender, your game can just instantiate the entities on map load. For smaller maps this should be more than enough, but if you feel ambitious you could write some plugin for blender to generate file like this alongside the model or make your own editor. But it really is an overkill for simpler games.
>>
>>110351911
you will never be a real woman just like rust will never be a widely used programming language
>>
>>110352567
I've never used Rust
>>
>>110352567
With so much of the typescript ecosystem migrating to it, it seems to already be widely used. I will never understand why, though... Why would they rewrite everything in fucking rust? How did this shit happen?
>>
>>110354797
It's the psychology of webdevs, they spent their careers working in JavaScript so now they're going to the opposite extreme
>>
>>110354797
>>110352611
>6 hours between posts
Three.js won, Vibe Chads won. YOU LOST TRANNIES
>>
>>110354877
https://youtu.be/FdJpweIPbWw?si=EpVrg4ofZbWTMsbp&t=108
>>
>>110354877
lost what? honestly leaving 4chan is like curing a mental illness for some of us.
>>
File: 1788856472735690.png (62 KB, 290x225)
62 KB PNG
>>
/v/ is about to become unusable for the next 2 weeks or so, I guess I'll have to work on my game in the meantime.
>>
When will the come up with the new graphics API that will ACTUALLY be like consoles?
>>
>>110356114
why do you want that?
>>
>>110356133
Jonathan Blow want that.
>>
>>110352088
>amulet_yendor
>>
>>110354993
what are you waiting for? go, shoo
>>
>>110356364
It's the final kind of plains after all.
>>
whats the thing stopping you guys from making a real game/engine? Lack of ideas or not wanting to put in the work?
>>
>>110358103
My engine is real
>>
>>110352086
but does that actually scale? what happens if you have 100,000 meshes in a scene and you modify 30,000 of them?
>>
>>110358133
The only way to scale is to stream raw bytes from ring 0
>>
>>110358103
Making a renderer is kryptonite to me. I've been stuck trying to make one that I'm happy with for 5+ years.
>>
>>110356114
vulkan + a few extensions is basically that already. hardware support is bad tho
>>
>>110358133
no using that method for a big scene would be dumb but you wouldn't be specifying it in code like that anyway and the more conventional bevy asset hot reloading would be handling it.
that hotpatch shown there is more for adjusting system behavior but things like making new structs and adding systems to the schedule still need a recompile since you can't tear down your App and rerun main (i think).
>>
>>110356339
No one cares about your fav e-celeb.
>>
>>110358377
Look at the picture of the opening post.
>>
File: 05829-1704190611.png (1.15 MB, 896x1152)
1.15 MB PNG
Claude oneshotted my game
>>
So, where do I learn about what GPUs actually are? When I program in C, I translate it to assembly in my head and if it's a really important loop, to some model of a pipelined processor. I have no idea what the fuck am I doing when writing shader code? What's the cache? Branches? Pipeline? NOTHING. It's just declarative webslop programming in my head.
>>
>>110358477
Like wtf are locations, bindings, components, sets? Are they on the same cache line or not? SoA or AoS? Nothing makes sense.
>>
>>110358465
Just because you sniped OP to post him doesn't mean people here care about him.
>>
>>110358477
>>110358488
You can read the official Vulkan guide, it should answer all your questions:
https://docs.vulkan.org/guide/latest/index.html
>>
>>110312744
where the fuck is jai
release the language, NOW
>>
>>110358627
>he doesn't know
>>
>>110358477
>So, where do I learn about what GPUs actually are?
None of the graphics APIs are "low level" in that they're actually exposing the internals of real GPUs to you. You're working from an abstract model of a distributed hierarchical cluster of compute nodes with heavy multilevel caching. The hardware moves too quickly for it to be otherwise, no one would want to learn a new API for every generation of GPU that comes out.

AMD cards are pretty open as internals go (officially documented ISA and architecture) and you can see and make sense of what shaders actually compile to (beyond SPIR-V which is just an interchange format and not hardware related) but AMD's driver quality in general is not great https://www.youtube.com/watch?v=nJNo1y9N6Fk
>>
File: xna.jpg (82 KB, 802x1000)
82 KB JPG
your honest opinion about XNA and Monogame?
>>
>>110358477
>When I program in C, I translate it to assembly in my head and if it's a really important loop, to some model of a pipelined processor.
lmao
>>
File: 1766862319890741.jpg (86 KB, 943x1024)
86 KB JPG
>>110358627
Order is out, so presumably work has started on the language properly now. There's a leak out there for the compiler, mine's from 07/02/2025 so I'd appreciate anyone posting a link to a more up to date one too.
>>110359530
Just make your own engine, stop fucking around with this shit that just ends up kneecapping you or making you waste time trying to find out how todo something in it instead of just doing it.
>>
>>110359890
>Order is out, so presumably work has started on the language properly now
the fuck that's supposed to mean? He made an entire game with it, the language's been working for over a decade, he just doesn't release it because it's an elitist nerd
>>
>>110359921
>the fuck that's supposed to mean?
It means he said he's start working fulltime on the compiler once Order of the Sinking Star was out and it would likely release a few months to a year later.

What's so hard to get, retard?
>>
>>110359951
The compiler has been in a releasable state for a long time
>>
>>110359530
I used it in 2010-12. It's fun if making a game is the most important thing for you. I had a lot of fun making simple 2D games (like retro arcade style) and also made a crude 3D single player FPS with it. It seems like Unity slowly took over as the C# and cross platform game dev engine of choice in this niche because perhaps because it has things that come with it like the visual level editor and so on. When I used XNA/monogame I just defined my own level formats.

XNA/monogame is an option if you want to prototype something. I found the way it did things sensible enough. Even now when I do my own engines I still like borrowing parts of how it managed things, the API was nice to use and didn't get in your way. The best way to see if it's for you is to just try making a simple game with it. I never found the learning curve steep or anything, very often even just looking at the samples you could infer a lot and get to work.
>>
>>110359977
But yeah, he is secretly making Odin with Ginger Bill, and jai is just some really old version of his language, without the qof-features.
>>
>>110354877
>Three.js won, Vibe Chads won. YOU LOST TRANNIES
Fuck off back to -> /aigdg/ jeet faggot

>>110358627
>where the fuck is jai
>release the language, NOW
I saw someone post a release date for it, I can't remember what it was though
>>
Is everyone just using Claude and AI for game development nowadays? I feel like there's still a big community of people that hate any AI in games and spaz out about that.

How much skill and knowledge do I need to make a game?
>>
>>110361746
You can't get into it if you have to ask.
And trannies are mad about plenty of things, AI will blow over when the next fad comes.
>>
>>110361746
you dont have to disclose AI usage for programming
>>
>>110361822
Why are you guys so mean and discouraging?
>>
>>110361932
Because of all the people who have never put any effort into anything in their lives asking if they can make a game
>>
>>110361958
I want to put effort in I want to learn. Where do I start?
>>
File: ffvi-suplex.gif (1.62 MB, 256x222)
1.62 MB GIF
Here's a design problem I'm trying to solve as a thought experiment.
In RPGs, whether CRPG or JRPG, especially the latter, you typically control your character in the field outside of battle. But when you enter battle, you usually control a CURSOR picking what actions the character does. I find this sudden change in what you control jarring.
I want to control the character DIRECTLY in battle or make the field-battle control more consistent and unified, at least have the seam be invisible, but without it being an action RPG.
One solution would be to map each action your avatar can do to a button or input, but again, that'd just be an action RPG with extra steps. Another could be to map the menus to different buttons (like Super Mario RPG), but then each submenu would still present the cursor problem (unless you map every submenu and action to a button recursively which lol).
One solution I'm thinking of is to control the cursor in the field, so the universal control scheme of the game would be RTS-style cursor controls, but I'm hesitant on that. Other than that, I've got nothing.
>>
>>110362234
You're too brainrotted by genre convention
You want direct control but because this is an "action RPG" in your head you won't do it
Genre names don't actually mean anything, do whatever you want
>>
File: 1724031593621568.png (163 KB, 399x498)
163 KB PNG
>>110358357
this made me realize pong is just air hockey
I never made that connection before



[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.