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


[Advertise on 4chan]


File: 54.png (41 KB, 163x162)
41 KB PNG
DirectX on Windows 95 Edition

/gedg/ Wiki: https://igwiki.lyci.de/wiki//gedg/_-_Game_and_Engine_Dev_General
IRC: irc.rizon.net #/g/gedg
Progress Day: https://rentry.org/gedg-jams
/gedg/ Compendium: https://rentry.org/gedg
/agdg/: >>>/vg/agdg
Graphics Debugger: https://renderdoc.org/

Requesting Help
-Problem Description: Clearly explain your issue, providing context and relevant background information.
-Relevant Code or Content: If applicable, include relevant code, configuration, or content related to your question. Use code tags.

Previous: >>108641005
>>
Imagine deving using DirectX3, imagine the pain
>>
File: installvb4.jpg (43 KB, 564x451)
43 KB JPG
>>108676780
if you weren't deving back then don't call yourself a dev
>>
File: 1770973690343726.png (3 KB, 960x421)
3 KB PNG
so anyone try it yet? does it fix all the problems?
>>
>>108676949
what problems
>>
>>108676780
If it's a fixed function pipeline like 9 it's probably easier since you don't have to reinvent the wheel for each fucking shader.
>>
>>108676780
In many ways it was easier, you had no hardware T&L so you were doing all of your vertex transformations on the CPU and you would just be uploading clip coordinates to the GPU and letting it rasterize them. The real "pain" in those days was figuring out what capabilities were available since every graphics card had it's own set of implementation bugs and limitations (especially texture data) and performance budgets and RAM usage were extremly tight. That last part is not unique to DirectX. In short, stop thinking that old = bad.
>>
>>108676949
There's something in the notes about a new win32 backend so maybe it won't be a stuttering mess with glitchy fullscreen anymore
>>
>>108676971
>>108676964
got it I'm just a millenial who wasn't aware at that time of what is what
>>
>>108676949
I assume it's just an incremental update. Raylib is always fine for getting something going quickly but too high level for anything serious.
>>
>>108677112
It's fine for serious projects in 2D, it will never be fine for 3D
>>
>>108676988
couldn't get it to work, the flag listed to enable it in the notes throws a cmake error
>>
I am small brained can I still make engine?
>>
>>108677492
With AIs help sure
>>
>>108677492
no
>>
Winsock in my sock
>>
>>108677492
ye its just that you gotta start reading instead of gaming
>>
File: 1772839722562623.png (20 KB, 571x542)
20 KB PNG
exporting a minimal godot project that's just a single sprite, with every unused feature disabled, with the most optimal build configuration known to the docs and ai, results in a 106mb binary
>>
>>108680307
yeah you can get it down to a pretty small size, this article managed 16.7 MB uncompressed
https://popcar.bearblog.dev/how-to-minify-godots-build-size/
gotta enginedev if you want <1 MB
>>
>>108680373
I'll engine dev after I make $1 million USD and can quit my real job
>>
>>108680426
>$1 million USD
this isn't 1999 anymore grandpa, a million is like 6 months room & board
>>
Why is there no alternative to stbi? I swear 100% of the memory bugs in my engine are due to this piece of shit library.
>>
>>108680307
How?
>>
>>108680674
>How?
Code takes up space. Godot has a lot of code, both its own and all its dependencies. Any single project probably isn't using most of that, but it's still there. You can exclude some of it with a custom build template like in the link in
>>108680373
if you want to. Or not. Who cares about 100mb in 2026.
>>
>>108680768
>Code takes up space.
not really
>>
>>108680768
>Code takes up space.
Sure but even a 1 MB exe is big
>>
>>108680782
It's a general purpose game engine. It's not some hyper focused personal project that only implements specific features you need in very limited ways.

Go look at a naive build from Unity or UE5, they're just as bloated. Also remember that games are usually compiled for speed over size, so you get extra bloat.
>>
>>108680886
100mb of code is a very large amount
there's probably some assets in there too
>>
>>108680896
You can inspect the resources. It's just code, anon. You need to stop thinking in terms of hello worlds and try compiling some real projects off github or something.
>>
>>108680911
Why would I compile someone elses bloated project
>>
just statically linking the mscrt gives you like a 16mb exe lmao
>>
>>108680896
>100mb of code is a very large amount
Do you know how big these engines are? UE5 is in the neighbourhood of 30-50 million lines of code, and that excludes third party stuff. Godot is nowhere near that but it's still millions of lines of code.
>>
>>108681035
>UE5 is in the neighbourhood of 30-50 million lines of code,
Wonder what most of that is
>>
I could implement UE5 in under 500 loc
>>
>>108681109
UE does so much shit in so many different fields, it's no surprise it's absolutely gigantic.
>>
I may be a retard, but I am one of God's beloved retards
>>
I can't do it, I'm too fat to make video games
>>
>>108680946
The UCRT is large but the dynamic version is perfectly portable across older versions of windows (and for windows 7 support, I think you can set the minimum windows version using the macro?).
I imagine the only reason to statically link the UCRT is for XP support. But I bet real XP users already have workarounds (and technically you can just target the older msvcrt instead of the ucrt, but there are quirks with how snprintf handles null terminators, and maybe other quirks).
If you are using C++, you can get the portability of the UCRT + statically link the C++ runtime to avoid the missing redistributable C++ runtime, you just need to set the runtime to static, then set the linker flags: /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib
https://github.com/microsoft/WindowsAppSDK/blob/main/docs/Coding-Guidelines/HybridCRT.md
>>
>>108681416
nta but if you don't statically link the c runtime then you technically need an installer to ensure that the correct redistributable is present on the system, so statically linking it is mostly just so you have a single executable you can distribute that just werkz
>>
No one cares about 100mb you turbo virgins.
Why don't you make a damn game.
>>
>>108676746
software programmer here. As a side project I have been thinking about making a balatro clone just for fun, and depending on how that goes either it pivot it into something different but balatro inspired. Any tips, resources, or things I should consider? I have already done a little digging and apparently balatro was made using a free software that uses lua called "love2d" so maybe I will download that I try that out.
>>
>>108681458
No the ucrt is fully portable across all windows PC's, at least if you use the API that is supported in older versions (the macro _MSC_VER or _MSC_FULL_VER will prevent the headers from exposing API's that are too new)
There is a hybrid version of C where you can use SEH exceptions like __try __except __finally which uses vcruntime which is shared with C++, and in that case you would need to bundle the runtime.
C++ has msvcp140.dll (+ some others) which has the C++ library.
The visual C++ DLL's are located here (YOU need to change the version number). Note it's called the UCRT but it does not contain any C library functions (I don't know why it's called the ucrt, for me, CRT = C runtime).
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Redist\MSVC\14.44.35112\x64\Microsoft.VC143.CRT
But this issue can be solved for both C++ and vcruntime if you use the dynamic ucrt, which stores printf, and assert, the C library, and use the static Visual C++ library (this is identical to mingw doing -static-libstdc++
The ucrt DLL is here (change the version number to whatever is newest):
C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\ucrt
but note that your DLL will not link directly to it, it will link to a bunch of tiny empty intermediate DLL's (I forgot what it's called exactly) which then link to the libucrtbase dll (and yes, you need to copy those DLL's if you want things to work), if you get a stacktrace inside of the ucrt the intermediate DLL's will not exist (for example, if you view the stacktrace in abort() it's just the libucrt DLL). You can use a tool like detect-it-easy or dependancy walker to see how your executable links up.
Also from my testing, a dynamic build is 500kb (my 50k LOC project, not hello world). Static is 1.5mb, Hybrid is 1mb.
I don't know why your code is 15mb, but I assume you are doing a reldebwithdebinfo or full debug build or something, you need to add in /OPT:REF to reduce the size to be equal to Release Build.
>>
>>108681728
Oh my bad, I got the wrong ucrt folder, If you want to see the intermediate DLL's I was talking about, they are located here:
C:\Program Files (x86)\Windows Kits\10\Redist\10.0.22621.0\ucrt\DLLs\x64
>>
>>108681728
>No the ucrt is fully portable across all windows PC's
Tell that to the 15 million copies of slightly different versions of msvcrt.dll in your system32, retard.
>>
>>108681458
>>108681728
>Also from my testing, a dynamic build is 500kb (my 50k LOC project, not hello world). Static is 1.5mb, Hybrid is 1mb.
*Ohhh... but my code has 15mb of debug info....
It's reduced to 10mb of debug info with the hybrid solution.
Then it turns to 3mb of debug info with the debug runtime.
>>108681791
you didn't actually read my post, but I get it, it's a long post.
>>
>>108681795
>debug runtime.
*dynamic runtime
>>
File: 1749777567014549.png (439 KB, 1000x1000)
439 KB PNG
what am I in for?
>>
>>108680490
https://www.youtube.com/playlist?list=PLRwVmtr-pp04XomGtm-abzb-2M1xszjFx
https://www.youtube.com/playlist?list=PLRwVmtr-pp06qT6ckboaOhnm9FxmzHpbY
This guy's vids were pretty helpful to me in understanding actually wtf is going on.
>>
>>108682102
Meant to reply to
>>108681808
>>
best distro for engine dev?
>>
>>108682303
Windows 11
>>
>>108682303
FreeBSD
>>
i tried to export the elements for every shape key so i could only move the vertices using glBufferSubData.
didn't work i wish it would, the implementation was super clean
>>
>>108681728
Do you actually program anything?
>>
how's wayland now, lads?
>>
>>108683880
i drank 2 bottles of wine while writing this i might be wrong
>>
>>108681597
actually if you make your game below 64kb you'll get a bunch of +rep from some of the most forgotten corners of the internet
>>
Hmm.... reading this post has made it obvious that just knowing the time when a frame finished being shown on the screen isn't enough for getting rid of stutter in VRR.
You also need to tell the driver the time when you want your frame to be shown on the screen, because I was only thinking about the stutter caused on the CPU waiting end, but there is also a stutter while you give the GPU a frame to draw (but my assumption was that the GPU will finish the frames at almost the same time if you don't change anything).
https://www.khronos.org/blog/vk-ext-present-timing-the-journey-to-state-of-the-art-frame-pacing-in-vulkan
I can't tell from my brief overview, but it seems like you still need to guess the FPS you want to target, and it's just a moving target that can't be predicted for all scenarios, and the notes don't offer any suggested algorithm or what to avoid for this math.
But if I use dxgi, I am only able to support windows 11 based on this:
https://github.com/gfx-rs/wgpu/issues/2869
So if I really wanted this, I could use Angle with Vulkan without a window -> Draw into a EGLImage (I don't know what this is, I use SDL) -> convert to VkImage and draw with vulkan + maybe DXGI interop.
I would prefer using vulkan with dxgi interop on windows, mainly because vulkan/opengl won't smoothly switch to fullscreen / show overlays in fullscreen unless you use an nvidia hack (and dxgi interop should work on AMD gpu's as well).
But with a primitive API's mentioned on that github issue, you can measure the max refreshrate, and then use the CPU to measure how long your frames are taking (if FIFO), and then you can just use a margin of error to just keep all your frames running the same delta. But I don't know if this is exactly what games using this timing info do, if anyone knows, I would like to know what they actually do.
>>
>>108684459
>it seems like you still need to guess the FPS you want to target, and it's just a moving target that can't be predicted for all scenarios
Can't you just get the FPS of the monitor?
>>
>>108684459
*This is scrambled up so badly, sorry for that.
>>108684470
This is for VRR, so if the game is not able to hit the monitor's fps, and you just use the same delta, the physics and maybe animations will go in slow motion, when the CPU is actually sleeping because of a GPU bottleneck. It's just an artificial bottleneck if you don't adapt your FPS (aka this might be worse than the original naive solution, unless you are 100% certain you will hit the max fps).
If you had a in-game frame limiter, you now have an issue that you might send a frame, but it has an unreliable time to show itself on the screen, so you will still get the same stutter you expect from CPU based deltas (maybe?) and I assume this feature of telling the driver when to show a frame, is how to fancy RTSS and etc frame limiters are implemented (I assume).
>>
>>108676988
Not being a stuttery mess is the #1 job of a game engine. How fail
>>
I just want a place to post my game without faggots. But it isnt a game engine I made.
>>
>>108685063
let's see it then, big boy~
>>
>>108685063
Even if you find the most obscure imageboard with gamedev threads such as trashchan, you'll find faggots there. There's no escape.
>>
File: 077-BossDialogue-Spawn.webm (2.79 MB, 1278x720)
2.79 MB WEBM
>>108685097
>>108685100
Fine, but I accept the hate. I just like solving puzzles in the engine.
>>
File: 1546556401350.jpg (20 KB, 471x396)
20 KB JPG
>>108685400
I must say this looks quite derivative
>>
>>108685429
Opinion respected, thank you.
>>
>>108685400
Is that AI generated
>>
File: 052-armor-swap.webm (3.71 MB, 1278x720)
3.71 MB WEBM
>>108685489
Yes and after working in blender for 2 years with them and learning how to build a leaderpose component i can probably start my own models now. I rig the skeleton by hand, cut the model up and remesh the model while transferring the uv maps, so I can swap skeletal meshes to simulate armor swapping. This is an older video but focuses on the equipment side of it.
The skeletons will eventually wear different random armor meshes drawn from a data table pool.
>>
File: 1726496714242834.gif (2.37 MB, 293x162)
2.37 MB GIF
>>108681808
a waste o time
>>
>>108685400
wow the guy who didn't make his own engine is clearly someone who has been gaslit by an ai into thinking his ai slop indian dark souls is worth putting time into
>>
>>108681808
Why bother? Just make game.
>>
>grok is kill
it's so over
>>
>>108686610
this isnt the AI thread
>>
>>108686613
yes it is
>>
>>108686080
>indian is the new meme phrase.
I have been here too long boys.
>>
>it's another "dickhead makes a Youtube video with some retarded opinion like he's some sort of authority when all his work are Flappy Birds-looking shitty 2D games" episode
>>
>>108686817
game developer youtube is for retards
>>
File: 1758991177465868.png (2.5 MB, 2346x1513)
2.5 MB PNG
>>108686817
>>108686821
I like Randy though, there's no doubt in anyone's mind he's no authority on anything but you'd swear he's a /gedg/ regular by his trajectory:
>started making a 2D sidescroller in Unreal
>making actual progress with Youtube devlogs for it
>about a year later snaps and decides to make his own engine
>flails around for several years
>tries Jai
>ends up doing webshit
>changes his mind, tries Odin
>every time his simple 2D games (plural now, project hopping) look less like games than his first UE4 devlog
>goes bald
>ends up releasing a highschool gamejam tier game after several years
>clearly still has no idea what he's talking about
>just parroting whatever Blow, Fleury, and GingerBill have said
>it's been almost 9 years since his first video
The only problem is he did eventually release something, so that' rules him out as a /gedg/ anon.
>>
>>108686890
He's just another guy making boring pixelslop
>>
>>108686890
I think I stumbled across this guy once, he has a community forum that only allows people who are actively working on 2d topdown crafting and gathering games, if you're actually doing anything cool you're not allowed in only stardew valley clones
>>
>>108677815
>JUST BE DEPENDENT BRO
Fuck off, Indian shill.
>>
another baby step
>>
>>108686890
If you make 2D low res shit in 2000+ you need to die
>>
File: 1754229624462559.jpg (113 KB, 1024x576)
113 KB JPG
Can I create a game while being absolute shit at graphic design? I just know the programming
>>
>>108687505
You probably aren't even good enough at programming for this. You need both.
>>
>>108687505
You could in theory find assets on the internet, but you'll often need to clean them up manually for your engine.
>>
>>108687505
you can have AI help you model simple stuff, it taught me how to use blender for really simple stuff
>>
File: 1746298407685549.png (300 KB, 600x471)
300 KB PNG
Why is it that only Unreal Engine gets the coordinates right? glTF also uses fucked up coordinates so I'm using them in my engine to keep things smooth and it's a pain in the ass.
>everyone agrees that a 3D vector's elements are X Y Z in that order
>ask anyone "what is the first direction/axis you think about?" or "what is the main direction/axis to you?"
>they will almost always answer forward because our eyes look forward, 99% of our time moving is spent moving forward, everything happens "forward"
>so X+ being forward makes the most sense
>ask people for a second direction/axis and they will say laterally, and 95% of humans will say right since most people are right handed
>so Y+ is the clear winner for right
>you're only left with the vertical axis and Z, and obviously nobody except absolute schizos would argue up should be anything but Z+
X+ forward, Y+ right, Z+ up simply makes sense, why is this so hard?
>>
>>108687611
>what is the first direction/axis you think about?
An x in a 2D graph representing time, then comes y, and finally the third dimension going forward. Everyone knows this from math class.
>>
>>108687611
if you asked me what makes sense its +x right, +y as depth going forward and +z as height because its just the flat cartesian plane with z added, but I can also see the argument for +z as depth going forward, its just a matter of is your plane on the floor or on the wall before you add the 3rd axis. X going forward makes no sense
>>
>>108687670
>>108687694
X usually representing time in a graph just makes X+ forward make even more sense, since it is the one dimension where we, by the laws of the universe, always move forward in.
>>
>>108687719
idk why that dude defaulted to x reprenting time in a math class, thats in physics class, in math classes x was just x
>>
>>108687745
He's not wrong though, in the majority of graphs time will be X, if charted.
>>108687694
Also the argument about graphs is true, but at the same time whenever you make a 2D game, X is (almost) always forward unless it's top down in which case there's usually no forward (well, shmups and such defy that). Generally speaking going right (X+ in 2D) is also nearly always seen as advancing forward by default.
>>
>>108687719
X has come to be synonymous with "horizontal" to me. It's not just games, drawing programs, the camera space, etc. Same with Y being "vertical".
>>
File: horeyshet.webm (3.63 MB, 1280x720)
3.63 MB WEBM
>>108687059
>>
>>108686533
Literally how? Literally how do you start? There's not a single person alive on earth that would naturally know how to "make" a videogame.
>>
>>108687609
What AI did you use? How would you learn to use Blender?
>>
>>108687888
I never read a single book or tutorial to get started, what are you talking about?
>boot up Unity
>find out how to put down a cube and a platform
>find out how to make the cube not fall through the platform
>find out how to make the cube move left and right
>find out how to make the cube jump
>so on and so forth
You've played games yeah? You know what a game looks like. Now go and try to replicate that in Unity or Unreal or Godot. If you want to be more hardcore, do it without a premade engine, which is similar to the above just with a few more steps like:
>find out how to create a window on your screen
>find out how to draw a cube in that window
>>
>>108687919
And before you say "BUT THEN YOU LOOKED UP HOW TO PUT DOWN A CUBE": yeah but that's already past the point of getting started.

The point is I didn't waste time reading stupid shit instead of doing, and then reading shit as needed to keep doing.
>>
>>108687906
any of the popular models work, they're just teaching you the hello world equivalent of blender, supplement it with youtube guides if you need visual aid, there are thousands of guides for all sorts of simple model on youtube, i.e "how to make a moon in blender"
>>
>>108687919
>If you want to be more hardcore, do it without a premade engine, which is similar to the above just with a few more steps like:
Like right here what are you actually saying???You mean I don't have to write the actual code to make my game run If I use premade engine? I have no idea.
>>
File: 1746011621638356.jpg (122 KB, 482x427)
122 KB JPG
>figure I'll give this AI stuff a shot
>download forge and some model and shit
>every time I generate an image my os drive loses like 5gb of free space
>it keeps happening
>doesn't come back even after a restart
well, time to reinstall windows I guess
>>
>>108687959
If you don't understand what I'm saying there, then that's a sign to NOT be hardcore. Download Unity and get working, the rest will come naturally.
>>
>>108688033
How do I know what engine to use for my fps? The only thing i associate with Unity is Slenderman game from 2012
>>
When did you start learning gamedev? When is it too late to start?
>>
Best blender tutotial?
>>
>>108687986
Usually it's just pagefile stuff that goes away when you close whatever backend you're running. Anyways, if you want to local gen assets I'd recommend building a dedicated rig for it and not using your main dev rig.
>>
File: 1776624563431709.jpg (1.54 MB, 1546x1894)
1.54 MB JPG
>>108687595
>>108687558
How could I get better at graphic design then? Need help. I cant draw
>>
>>108688114
Just fucking pick one. Or don't, you seem addicted to procrastinating actual work.

You realize it will take at least 3 years before you have even a basic 2D platformer right? There's no quick fix for this.
>>
does /gedg/ know who gogem.pro is? does he ever come here?
>>
>>108688485
I don't think so and thank god for that.
>>
my game is carried by its gameplay, graphics, and music
>>
>>108688397
>You realize it will take at least 3 years before you have even a basic 2D platformer right?
Uh... no it wouldn't?
>>
>>108688780
Yeah it would and that's being very optimistic. I said basic 2D platformer in the context of a game, not a prototype or some alpha or some bullshit. For someone who evidently has never made a game, 3 years is very optimistic for releasing anything unless it's a Pong clone.
>>
>>108688685
How do I learn music?
>>
>>108688895
you don't learn it, you have to feel it, in your soul
>>
>>108688900
My soul is malding and seething because I feel like musicians are gatekeeping me from making jawdropping masterpieces. Just tell me the secret.
>>
File: 1746215945134667.png (290 KB, 785x335)
290 KB PNG
>>108688916
>>
Do you guys count frameworks like MonoGame as game engine development or am I not cool enough unless I go lower level?
>>
>>108688948
Nobody minds what you use as long as your posts are more interesting than
>look I made a cube jump in Unity
>>
File: 1771036121256434.png (483 KB, 1451x779)
483 KB PNG
>>108688960
the fuck you say about my game m8?
>>
>>108688384
Just use AI bro.
>>
>>108688990
Do you have a kickstarter?
>>
grok plz i need u
>>
Is your gamedev hobby related to your actual job in any way?
>>
>>108689928
I'm a software developer by trade. I think my project has been a cool footnote on my resume that has helped get me my most recent regular corpo swe job. People can look at my actual code and see I'm the real deal without needing to do any gay leetcode nonsense.
>>
>>108689928
Nah but the engine can be put on the CV
>>
>>108689928
I work professionally as a game programmer in C++, yes.
>>
>>108690035
>game programmer
Which part do you work on?
>>
>>108690143
Whatever's needed. Could be server backend, could be gameplay programming.
>>
>>108690035
Can you at least tell what genre?
>>
>>108690212
I'll say it's a first person shooter, and >>108690167 it has a server component, that's about as far as I'll go.

I don't do rendering, and I try to stay away from UI programming. I've done some tooling but I'm not specializing in that.
>>
>>108690237
Neat. Is it fun to code stuff professionally? Seems like you're doing some of the most important parts.
>>
File: 1724767797674.jpg (432 KB, 959x1253)
432 KB JPG
>can't use C++ in Godot without some fuckass 3rd party extension
C# and GDScript are garbage. I am absolutely not fucking learning nor using them.
>>
>>108690281
What's this obsession people have with non-native languages for games?
It's just easier to have everything in one language.
>>
>>108690271
It's pretty good. It's a job so being interested in the thing you're working on (or at least not hating it, like I would some slop mobile app) is a big plus that many don't get. Not that it matters much most of the time, you're neck-deep in the giant codebase chasing some bug for a week and the fact you're working on a game isn't really relevant.
>>
>>108690281
Maybe don't use godot lol
>>
>>108690316
>neck-deep in the giant codebase chasing some bug for a week
Ah, understandable. It's hard enough to keep the code compact and free of nasty bugs even as a solo dev.
>>
>>108690281
uhm yeah that's why we dont' use premade game engines
>>
>>108690281
anon they're fucking scripting languages jesus christ how retarded are you to get filtered by gdscript
>I-I need faster scripting!
no you don't, the entire point of a scripting language is to call on native functionality, if your scripts are bottlenecking performance then you're either a retard who doesn't know the engine and is trying to implement in a script something that already exists in native, or you legitimately need functionality that doesn't exist natively and you're a retard trying to implement it in a script rather than as an extension
>>
>>108690548
C# isnt a scripting language its a real language
>>
>>108690571
save it for you therapist, loser
>>
File: 1759968946244102.jpg (35 KB, 372x372)
35 KB JPG
Paperman, the sequel to Paperboy
>>
>>108690688
Is that what the MC of Papers Please is called
>>
>>108690688
>45 years old
>still working his paperboy route for $2.50 a day
>finds out the newspaper is being cancelled because who the fuck buys newspapers anymore
>now the real game begins
>>
should spaceships have "realistic" physics, or should you add stuff like friction just to make make things feel less floaty
>>
>>108690828
Weird thing to ask, sounds like you don't have much of a vision for your game
>>
>>108690828
depends on the game
>>
>>108690035
you're not getting burned out by working on slop?
>>
>>108691035
He will. Everyone in the games industry gets chewed up hard.
>>
>>108691035
>>108691262
I have only 2 days in office a week, 6 weeks of vacation a year, and I'm pretty autonomous in what work I do and how I do it.

So no, not really. Been doing it for 4 years, no issues so far.
>>
Alright, time to port my toolkit to Android. I haven't touched Android development since ~2013, so it's going to be interesting.
>>
File: Bevy.jpg (11 KB, 588x285)
11 KB JPG
>>108676746
Do the bevyanons in the thread recommend bevy? Why or why not?

Anyway, according to a fan, this is how one writes pong:
- Write a system to consume the current ball velocity and produce a transform for the ball (which you then update)
- Write a system for collision detection between the ball and an AABB
- Write a system for changing the velocity for hitting the wall (and paddles)
- Write a system for consuming user input and translating the paddles
- Write a system for updating the score
- Somehow tie them all together with rust

Looks convoluted but at it looks like the advantage is be being able to scale this all up by a gazillion. Though, I hear features like events are there to make things more manageable.
>>
>>108693289
Writing code like that is actually garbage for 90% of game scenarios
>>
>>108693289
its not bad you grow used to it however you better have a good pc because compile times suck ass. Also need lots of memory basic hello world is like 2gb build artifacts last time I checked. Since I only make small things odin+hotreload template works perfectly fine.
Also never understood how nearest neighbor search works in ecs...
>>
>>108693480
>Also never understood how nearest neighbor search works in ecs
It doesn't
>>
>>108693480
>Also never understood how nearest neighbor search works in ecs...
What does this mean? Nearest other entity in storage? Nearest in space?
>>
>>108693492
in space of course. Like how would you do a falling sand game in ecs? Or some rts. Just save the ecs id or so I guess but that kinda defeats the point of all the table stuff no?
>>
>>108693526
You can't, that's one of the reasons ECS is retarded
>>
What's the main reason to do ECS?
>>
>>108693571
You don't understand game architecture and were cargo culted into doing it, or you have performance anxiety and you think it's going to make your game run really fast
>>
>>108693526
The same way you'd do it without an ECS? Use whatever spatial structure is best for your use case and fetch entities via that.
>>108693571
Best way to organize your logic if you're working on something that isn't just a retro 2D platformer without the bloat of OOP.
>>
>>108693594
>Best way to organize your logic
No hierarchies are the best way to organize your logic not a gigantic spaghetti of systems
>>
>>108693571
Being misguided.
>>
>>108693289
what if you just made whatever system you actually need for your game rather than figuring out how to use someone elses
>>
>>108693579
What if I'm not working on a Pong clone and genuinely have tens of thousands of entities?
>>
>>108693832
You don't understand where the performance bottlenecks actually are.
>>
>>108693832
Depends what those tens of thousands of objects are actually doing. Iterating over stuff via arrays is faster, but game objects tend to have complex behaviours that involve touching other game objects in their proximity so this whole idea that you can have complete cache efficiency by using ECS is wrong, the false assumption with ECS is that your game world is a particle simulator with a large amount of objects with very simple behaviours which is rarely true
>>
>>108693594
>The same way you'd do it without an ECS? Use whatever spatial structure is best for your use case and fetch entities via that.
but isn't the whole point of ECS having the database queries?
>>
>>108694177
>isn't the whole point of ECS having the database queries?
Originally yes but there's a second wave of ECS advocates who don't even care about the performance characteristics and claim that it's just a better way to program
>>
everyone focuses on the programming but art and music are the real cock blockers
>>
>>108693605
Basically every language you'd use is at least modular with some kind of hierarchy as modules will inevitably depend on other modules
>>
>>108693992
You don't understand that ECS isn't supposed to fix every single bottleneck. You don't use an ECS then utterly refuse to ever work outside of it. ECS just takes care of the vast majority of cases, but there's no reason to be an autist about it and try to cram cases that don't work well with ECS into your ECS.
>>108694024
I wouldn't advocate for ECS *for performance* (some might still prefer that way of structuring logic) for everything either, but I am working on a strategy game that will have a lot of entities running very similar logic. There's this idea here though that if you use an ECS, you obviously just got duped by the Youtubers and "the herd" and you don't actually need it. There are plenty of people who are not large teams of professionals working on projects that do benefit from an ECS.
>>108694177
See above, you don't have to constrain yourself to only ever using ECS.
>>
>>108694439
i think everyone knows that, i can do music but learning to draw and make assets is way more of a learning curve. art assets is the biggest issue so long as you know how music works you can get functional stuff pretty well but actual art assets is just a ton of fucking work
>>
>>108694517
The language is modular, ECS is not

>>108694520
Yes for a strategy game you have lots of objects, you can benefit from fast iteration, in those cases I just use regular arrays, ECS is just an overengineered and restrictive way of doing things
Factorio doesn't use ECS
>>
>>108694553
That's cool for Factorio, but I have a lot of entities that are both numerous and are multifunctional. Aside from ECS letting me only iterate over the actual data they need instead of everything, it lets me structure the system sensibly without losing my mind over special cases.

I know what functionality something has just by looking at the components, and if I add a set of components that need some logic, I know my existing queries will take care of it instead of having to add another else if in one or multiple places.
>>
>>108694599
What kind of game are you making?
Because I make strategy and simluation games and I've never had a case where I have a large amount of an object yet that object isn't simple enough that I can reduce it to a single struct
Like a unit in an RTS game or a province in a grand strategy game
>>
>>108694611
This is more of a architecture thing than performance, but lets take a missile as an example: it moves, it has thrust, it detects targets, it steers towards them, it explodes. ECS just means all those behaviours are modular and defined by the component composition.

Sure it could be a struct, which you can easily turn into a struct of arrays and then you have all or most of the performance gain of an ECS, but then you're almost at an ECS, no? You define a set of data that will be iterated over by some logic, the only difference aside from naming here is that in the case of ECS, that set of data is composed modularly by components instead of being encased in a struct.

I think the issue here is we're thinking about two completely different magnitudes of complexity: my ECS is fully static, compile time known (you can't add or remove components or tags at runtime for example, so no archetype migration), and effectively just a bunch of SoAs with infrastructure built around them. You still need infrastructure if you just use regular arrays: you probably want entity IDs that aren't duplicated, probably tags too, and a way to check what's alive or dead/pending deletion, so on.

Sure if we're talking about a full fledged ECS like Flecs, Bevy, or whatever else that's way overkill, but it doesn't have to be like that just like your own custom engine does not need to be Unreal or Unity. The core of my ECS is 667 lines including empty lines and comments.
>>
>>108694677
It depends how deep down the performance rabbithole you want to go
The fastest way to do things is SoA with SIMD but that's also very cumbersome. But if you aren't using SIMD you don't really gain anything from SoA
I haven't made anything where I needed to do that, simply having a regular array of structs and multithreading was enough performance for any sim with a large amount of objects
>>
File: 1767634509610689.png (313 KB, 620x564)
313 KB PNG
do you think he was influenced by violent video games?
>>
File: 1775452759217067.png (571 KB, 2379x1324)
571 KB PNG
>>108676949
C niggas are so impoverished
>>
>>108695219
>internal static buffer
so it's not even thread safe
>>
typedef struct { ssize_t length; char* data } String;
#define S(s) ((String){sizeof("" s "")-1,s})
#define SS(s) ((String){strlen(s),s})

Please never use C strings again.
>>
another codelet filtered by cstrings
just wait until they find out that sentinels are a whole programming thing and not limited to cstrings
>>
>>108695454
why
>>
>>108695454
Most strings are really short, so a null terminator takes no time to find.
And when parsing it's much easier to add '\0' to the switch case, than littering the code with bounds checks on every lookup.
>>
>>108695554
You can do a lot of things much easier when you already know the length, especially if you want to create substrings and modify strings. The only downside to having a length is that printf isn't designed to print such a string, it's basically nothing but upsides from there.
>>
>>108695718
>You can do a lot of things much easier when you already know the length
The only thing easier is to concatenate
>>
>>108695718
you are technically right because you are using C.
I forgot that C users try to store all their dynamic strings in fixed sized buffers whenever they can.
So yes, your code is likely doing a lot of bound checking anyways, so having a size would be helpful for you, since you can do a memcpy I guess (If you don't mind null being stored in your string, which is fine?).
In C++ you would just use a std::string and not worry about bounds, and it's always null terminated, and it has small string optimization so strings wont call malloc unless the string is longer than 15 letters on 64bit.
by the way ssize_t is pointless and it is not available in msvc. the only time it exists is for the FILE* results, because it uses -1 for error results.
You are probably using it because you getting a sign conversion comparison warnings, like an int for loop + size_t, but because you are implicitly casting the size due to mismatched sizes, you are technically making things more confusing than it should be, especially since -1 should never exist in your size.
My solution is to use clang's -fsanitize=implicit-conversion and use clang-tidy for showing narrowing conversion warnings, and manually suppressing each linter warning with //NOLINTNEXTLINE(*-narrowing-conversion)
Because otherwise #pragma diagnostic push / pop is too verbose. And explicitly casting the narrowing conversion warning will remove the -fsanitize=implicit-conversion check.
All that work just to get C / C++ to show an error for overflowing a number... By the way -ftrapv and -fsanitize=undefined (a sub feature) is only for calculation, so A+B = overflow, not implicit conversion from passing into parameters or initializing variables.
Also it's very common to overflow an unsigned number from implicit-conversion, it should print to stderr and recover and it only prints once, but printing a stacktrace is usually very slow & requires llvm-symbolizer unless you use address sanitizer's runtime for reporting I believe.
>>
>>108696381
*oh I just learned that comparison always promotes the type to the larger number if it's the same sign, it does not change the fact that overflow is still possible, but not during the comparison, and that it would be better to compare numbers of the same type and size.
>>
>>108677246
What do I use for 3D? Assuming I just want textured cubes and sprites? Just go directly to opengl I guess?
>>
>>108696536
unironically spend a couple years making 2d games and learn to fail instead of the other people here that are still working on their 1st or 2nd project.
You will learn a lot about performance essentials if you are able to stress your machine (basically, your game might stutter from dumb stuff, it's should be easier to reason about in 2D because less code = easier).
If you can't make it in 2d just move to unity or godot for 3D.
raylib is fine for 3d, the best thing going for it is that it has a lot of examples, if that's all that you need, then it's basically fine.
But the examples are very primitive in my opinion, it's still a very large jump away from a real game.
I wouldn't suggest opengl unless you are 100% sure you want to get deep into shaders. Not because opengl is more simple, but because there are many extensions (very deep subject), and maybe you find a use for a compute shaders (compute shaders will not work on the web), and SDL3 / etc is less helpful than raylib since it lacks font rendering that raylib has, and not as many cool examples (but it has a ton of other stuff, like a portable filesystem API if you were using C, and good mobile support which is a lot of trouble to get working). Oh The desktop version of opengl is hard to predict when you start doing undefined stuff, raylib should make it harder to do undefined stuff. So on your PC it's perfect, but on another PC it shows a black box or something because your driver is allowing strange stuff to work, and you really need to understand how GPU's work and how to debug it using GPU tools and features (GL debug callbacks). And opengl has spotty support for GPU tools, it will work for inspecting all the variables, but the newest features probably wont (such as shader debugging, take a snapshot of a frame, click a pixel, and step through the shader line by line like a debugger, Technically RenderDoc supports opengl it but it does not work for me). So, maybe Vulkan or NVRHI has it's benefits.
>>
>>108696842
Just to give a hint to how much you can do with shaders, this left 4 dead 2 talk is very interesting:
https://www.youtube.com/watch?v=zdbmn--7fY0
The xbox 360 only had 500 megabytes of unified gddr ram (shared between the cpu and gpu).
I feel like nowadays, we can just recreate left 4 dead 2 by just creating 1000 different 3D models manually and the engine would just figure it out (the engine / plugin should expand the 1000 models into like 5000 models with level of detail to make it run smoothly with different graphics settings).
But all of this level of optimization is unrealistic, this is not something that a single programmer can really do on their own (and it's very tightly connected to doing custom stuff in the 3d modeling software / custom asset pipeline), and left 4 dead 2 just runs really well on the worst hardware that you could imagine.
>>
jesus christ get a blog or something nobody's reading all that slop
>>
File: file.png (1010 KB, 1280x670)
1010 KB PNG
>>108676780
The source for Interstate '76 was used as the basis of Pandemic's Zero Engine, which was used for Dark Reign, BattleZone, and the Star Wars BattleFront games. Though I believe they replaced the renderer entirely between Dark Reign and BattleZone. Amazing how much they were able to get out of it.
>>
i can't believe there's someone defending C strings lol
>>
with cpu caches, not using c-strings can slow down processing by multiple orders of magnitude
>>
>>108698668
What's the real impact of that? 1us of extra time taken?
>>
>>108698727
>cache miss
>1us
oh, you poor naive fool
>>
>>108698750
throw me some numbers
>>
>>108698753
you can either pay me my consultation fee or ask grok to teach you
>>
File: part101_infographics_v08.png (119 KB, 2400x2000)
119 KB PNG
>>108698753
Okay, give me your password.
>>
>>108698727
hes bullshitting
>>
>>108698773
Are you retarded? In your little string struct, the size is stored in one place and the string somewhere entirely else. You're going to cache miss every time. Meanwhile with cstrings you're just processing characters as fast the cache can feed them into the CPU.
>>
>>108698791
>n your little string struct, the size is stored in one place and the string somewhere entirely else.
that's a really dumb way to store a string, store the length and then store the string directly after it
>>
>>108698791
I bet you believe every for loop is cache misses because of the i variable. You're a fucking retard. Go learn some assembly before spouting this retardation.
>>
It's so fucking /g/ that some guy is talking about nanosecond timings and cache misses when he doesn't even know how to store a string in memory lmao
>>
holy shit so many retarded people in this thread

sentinel values are used all over the place for a reason

storing length alongside arrays is only used in abstract languages where performance isn't the primary concern for a reason

use your fucking brains

gamedev really attracts the biggest morons who can't stop giving opinions on shit they know nothing about
>>
File: 1775177826050471.gif (529 KB, 625x626)
529 KB GIF
>>108698900
>cache miss
>nanoseconds
>>
>>108699059
>storing length alongside arrays is only used in abstract languages where performance isn't the primary concern
its done in literally every language except C
>>
>>108699059
Post a benchmark of null terminated strings being faster or shut the fuck up, nigger.
>>
I will never get a job as a graphics programmer.
>>
>>108700325
probably not, not too many of them are needed. but I managed to jam my graphics programming experience into other domains at various companies. stuff like video processing, physics solvers, even databases (but this one was a bit of a stretch). people are always impressed when you find a way to offload some work to a GPU.
>>
>>108699059
>gamedev really attracts the biggest morons who can't stop giving opinions on shit they know nothing about
projection
>>
File: capitalism.png (24 KB, 590x227)
24 KB PNG
are you guys excited to finally start making games now that you don't need skills because of AI?
your brilliant ideas will finally be recognized and all the people who do not have ideas will give you a lot of money to play your games
>>
>>108700667
I am in gamedev only for the technical part of the process. I don't have any game ideas.
>>
>cache misses don't matter
t.nu/gedg/
>>
>>108700792
same. Also from my observation most people dont have any ideas either and just produce very derivative work
>>
>>108701264
Let's see your benchmarks showing us that cache misses affecting your project
>>
If I use classes as structs, is it likely they get converted into structs? I mostly use C++ as syntactic sugar for C. I guess Obj-C would be better for this but that's deprecated.
>>
>>108701625
there is literally no difference between a struct and a class in C++
>>
>>108701632
Isn't there some vtable constructor reference slop in C++? (I don't know what it all means)
>>
>>108701644
structs or classes will have vtables if they have virtual functions
only think class does is make it private by default instead of public
>>
>>108701644
there's no vtables in c++ unless you're using virtual functions
>>
>>108701632
classes are jeetware, structs are not
>>
>>108701771
Classes predate whites sharing their technology with demihumans entirely.
>>
>>108701632
In a class everything is private by default, in a struct everything is public by default. That's about it though.
>>
I love OOP and I hate racists
>>
>2 publications in SIGGRAPH yet no job offer
>>
>>108702506
100% of non-whites are racist therefore hating racists is itself racist



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