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

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

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


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


[Advertise on 4chan]


File: 1761175941220472.png (335 KB, 1104x988)
335 KB
335 KB PNG
Inheritance 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:
>>106974912
>>
File: asdg.png (84 KB, 912x614)
84 KB
84 KB PNG
>>
>>107023076
>he thinks he can have bigger brain than Factorio devs
lol, lmao even
>>
>>107023251
Making a game is pretty small brain when you could IMAGINE and THINK about making a game.
>>
video game
>>
So how do people do lighting nowadays?
I've got my basic vulkan code rendering some 3d objects, but only flat shading with textures, so now I want to add some lights.
I recently learned about clustered shading and I think I'm gonna try that. It seems not too hard to implement (saw some code examples in d3d11 here https://www.humus.name/index.php?page=3D&ID=90 ). Essentially it just "clusters" lights into a grid and each fragment then looks up a subset of lights that affect it. Apparently you can have hundreds or a few thousands of dynamic lights that way.
>>
I like shaders, this is my take on kuwahara filtering done over 4 shader passes. left is w/ the filter, right is the scene w/o any post processing
>>
Why are /agdg/ and /v/ threads so bad?
>>
>>107024314
because they're full people that are analogous to webdevs of the game dev world
>>
>>107024314
what the fuck is /agdg/?
>>
>>107024598
a thread on /vg/ that people use to gossip about gamedev youtubers.
>>
>>107024272
i guess it's fun to be in a cezanne painting for a few minutes then you realize he painted like that because he was going blind
>>
>>107024272
Mmm, no. The original looks better even as a still picture, and I definitely don't think I'd like it if it were a game. Also maybe there's other post-processing effects going on but notice how the colors get messed up? Like the water hardly matches at all. That would probably be fixed by using one of those fancy new color spaces like OKLab. (Or you're just not taking sRGB into account idk.). Maybe it'd be okay if the strength were parameterized by distance from the window edges (as a vignette) and/or z-depth (as a fog).

Fuck, those colors are incredible; I can imagine all sorts of marvels with different times of day, seasons, and biomes.
>>
>>107025272
it downsamples to .25x resolution. its not something I'm putting into any game I'm making, it's a fun project I'm doing on the side

yeah color grading is messed up because this using the luminance value for everything instead of color, I need to add an additional pass that recalibrates it (right now greens get messed up a lot, its more accurate in pictures without much greenery).
basically the goal is to make an over the top kuwahara and get it fast as possible (this scene with all 4 passes is 2.4ms per frame so its pretty fast). then I can cut it back and dial it in to a more cohesive effect.
>>
File: smearedEdgePass.jpg (327 KB, 891x827)
327 KB
327 KB JPG
>>107025272
>>107025420
the water's also tough because on pass (pic) is an anti-edge detection pass (i made that up) that causes a stippling-like effect.
for any large blocks of color, it does practically nothing as seen on this pic rel
>>
>>107025272
It's not like you'd just slap a filter like that on the frame buffer and call it a day. He could use it as part of a sort of painterly depth-of-field shader or as a backdrop when the pause menu is open, there's plenty of reason's you'd want a pretty blur filter with decent performance
>>
>>107022982
>Inheritance edition

I'm ditching Windows because fuack M$... in order to use Godot with .NET.
>>
File: butterflies.webm (3.87 MB, 716x476)
3.87 MB
3.87 MB WEBM
Overengineered butterflies
>>
>>107025845
But just *what* is your project? It looks like a horror pokemon. I like the atmosphere
>>
>>107025932
It kind of is. I'm aiming for survival and biology research. Rather than combat, monster species design will be focused on overworld utility and niches.
Still not sure about the combat format, as managing a team of monsters following in the overworld is a challenge itself. I'd like something simple and focused around team building with gimmicky monsters that are hard to handle at first unless you are creative.
>>
File: 1730799459188916.jpg (8 KB, 229x250)
8 KB
8 KB JPG
Is the standard for Vulkan really to keep a CPU side staging buffer and then just copy it over to a GPU only buffer at the end of frame?
>>
>>107026810
You don’t have to use a staging buffer if rebar is enabled aka if you have any GPU made in the last 8 years. The ONLY time you truly need staging buffers is for images.
>>
>>107026902
Aren't rebar reads slower for the GPU though compared to GPU only memory? Or will writing to CPU memory and then copying them over to GPU memory negate that?
>>
>>107026995
Rebar memory IS your gpu only memory
>>
>>107026810
static geometry you only have to copy over once and yes that's typically done in a staging buffer.
But you don't necessarily have to. check how much memory you have that's both device_local and host_visible. this kind of memory you can write to directly without a staging buffer. You either flush explicitly or use the host_coherent _bit on memory properties. Then you don't flush. Just some gpu's don't have a lot of that memory type, so you then have to go the route with a staging buffer.
>>
File: feelsbadman.png (225 KB, 2400x2400)
225 KB
225 KB PNG
>>107026902
>aka if you have any GPU made in the last 8 years
me on my 1060
>>
>>107027175
>>107027233
Doesn't rebar use write combining which is considerably worse for scattered writes which is what most games do?

What is the advantage of rebar other than avoiding copying staging buffers over to GPU only buffers?
>>
>>107027399
Loading a lot of data into GPU memory quickly, such as open world AAA games that need to dump a bunch of 4k textures into VRAM without a loading screen.

Rebar is probably not relevant for anyone in these threads.
>>
>>107027333
That pepe reaction is exactly what Intels marketing team and retarded zoomies repeating techslop videos stretched out to 25 minutes want you to feel.

Quickie reality check, the initial address written into the PCIe config space by your kernel has exactly sweet fuck all to do with your GPUs ability to read from sysram, in both bandwidth and latency. If anything, the entire PC architecture is built around having everything unsecured and high bandwidth from the get go.

What really happened was the Intel deadbeats with a new GPU generation needed a new excuse to push people onto a new chipset and block VM passthrough, and so they decided to exploit what was usually a write-once PCIe io configuration register write, with a new spec that just said "actually, you can replace this configuration register pointing to sysram again if the device supports it", resulting in the "time to buy a new motherboard, cucko", "you must update, cucko", "your vm doesn't support it? too bad" cope.

Henceforth, you see these shit munching zoomers applying arbitrary madeup timelines and dates as a form of status signaling, like niggers and white trash with iPhones, as though there's a clear delineation between "haha im so great, my $3000 birthday gift from my mother is so great. this gaming pc i hired uncle john to setup last year btfos all the thirdies" and "eww, ur just a poor slob with <gross brand> from <gross year>, get with the times".

Your GPU isn't defective nor inferior; nuffin to sadge over.

>>107027175 >>107026902
What's the psychological mechanism behind your shiteaching zoomie brain that cant help but barge in with retard babble? "<undefined mechanism> is faster than usual DMA. muh gpu memory", "except for images", the dodging of any technical details. Anybody who isn't a grifter or zoomer ought to immediately identify their shortcomings and shut the fuck up, but for some reason, these 2 groups can't stop running their mouths. Nothing u said is remotely true.
>>
File: 1737591473946204.png (756 KB, 2788x1568)
756 KB
756 KB PNG
Has anyone tried Clay (C Layout)?
>single file C UI layout engine
>supposedly performance focused
>4k LoC
>arena-based, no malloc/free
>zero dependencies
Sounds good, a bit too good even.
>>
>>107027601
>What's the psychological mechanism behind your shiteethin zoomie brain

cont: I really don't get how anybody can be retarded enough to think, "hm, GPUs were always able to stream girthy textures from sysram with no issue before, but something something something, GPU memory, this is clearly a new mechanism that BTFOs DMA and the usual understood limitations of the PCIe bus. how was i ever able to push a few kbs of scene info per frame to a gpu before this?!!?"
>>
>>107027640
"muh 4k lines of code", "so very small", "no alloc" is buzzword slop for "my weekend project shilled into a hivemind of drones".

Every game or other 3D application ends up rolling its own mini-toolkit or other boilerplate for rendering widgets. Why would anyone care or need this?

Maybe this is a hot take, but, nobody gives a shit about some students weekend project that at most is going to serve as some poor fuckers debug menu. Stop obsessing over retarded techbro influencers and their weekend projects, and focus on writing your game. At the very least focus on writing your text shaper so you can get text onto the screen. If most aaa slop titles are anything to go by, youre then just a DrawRect away from an entire hud.
>>
I'm going to architect my entire engine from top down, full idea guy mode. Everything needs to make sense before I implement it. No more code hammering.
>>
>>107027699
How does properly managing memory instead of lazily using malloc make it more of a "weekend project"? Also it's a layout engine, nothing more, it doesn't draw any widgets for you, let alone handle text.
>focus on writing your game
UI is part of my game.
>>
What are good specs for a computer to use stuff like Unity, Blender, Photoshop, all together? I have an old computer that is just not handling it and I think I need to replace it.
>>
>>107027777
"properly managing your memory" get the fuck off youtube and start working on your game, holy shit. How much of a larper are you for buzzword slop advertising a LOC anyone could shit out in a working week to be your fixation? Last time I checked, serious projects and other such sellable resources/services/titles don't go around advertising them as "very very good code yes", followed by a herd of nigger cattle arguing "hmm, sweetie, very very good code is a good thing. what are you, somebody against very good code?"

>>107027777
>>focus on writing your game
>UI is part of my game.
You're a 2IQ faggot, who couldn't even finish reading a small 4 sentence paragraph, obsessing over a tech jews weekend project, justify as but "4k lines of code" and "no malloc". You have no game.
>>
>>107027790
Any hardware made in the past 10 years that isn't a netbook.
>>
>>107027864
Netbooks havent been a thing since the death of pdas, what are you talking about nigger? Besides, 10 years is plenty of time to include the most piece of shit unworkable intel igpus and APooU silicon going.
>>
>>107027857
You seem to be irrationally angry at the mere concept of well written software and doing things right. I assume you're some jeet from the slums of Mumbai who ponders suicide every time some shitty badly made game like Lethal Company hits big because
>ugh that could have been ME shitting out that awful slop!
Not everyone is into game development as a way to escape some hellish thirdworld shithole. I get paid more than enough at my job. I'd rather have no game than make some rushed buggy mess because "gotta get it out there and market it bro gotta get that hustle going saar!".
>>
>>107027934
As I said, >You're a 2IQ faggot, who couldn't even finish reading a small 4 sentence paragraph, obsessing over a tech jews weekend project, justified as but "4k lines of code" and "no malloc". You have no game.

Seething about jeets and thinking 4KLOC is this stunning achievement says a lot about the game you're totally working on. Why are you even here? Just to sperge about jeets or are you that much in need of validation over the libraries you wanna use? Talk about stunning and brave nigger cattle.

Bonus points for still dodging everything I said about rolling your own code and focusing merely getting text onto the screen.
>>
>>107027957
Take your meds kek
>rolling your own code
Why do you think I'm weighing using a library? To save time that would be spent writing my own code.
>focusing merely getting text onto the screen
What does this have to do with a library that purely handles layout?
>>
>>107027969
>cant get text onto the screen by himself
>needs to weigh importing a measly 4k to ~~draw a button or two~~
>...layout a button or two*
>...still hasn't so much as drawn "hello world" yet
>"aaahhh use case for rolling your own code"
>gets uppity over "no malloc" as if its this a stunning achievement
Might I recommend webshit for you? Y'know, since all this is over your sad desperate need for validation over importing a fucking weekend project single header file, I cant imagine you're getting anything of any higher caliber done.
>>
>>107023076
>the virgin factorio developer
>the chad /gedg/ poster
>>
File: quadtree.png (469 KB, 1610x762)
469 KB
469 KB PNG
>>
>>107027957
>>107027857
>>107027699
>>107027654
>>107027601
lots of words with nothing valuable to say
>>
I finished cascaded shadow mapping. There’s still some tiny quirks but small enough for me to move onto the next thing which is point light shadows for which I plan to use a cube map array.
>>
>>107027640
I don't need a layout engine, I need a text shaper/renderer with decent text input for localisation
Clay sidestepped every real problem, solving only the simplest out of the bunch, with a very straight forward solution too.
So how do you solve layout calculation? you defer the render commands and process them at least twice to resolve any dependencies, yeah, that's literally it.
>>
>>107028408
If you're making a game all you need are bitmap fonts
>>
>>107028435
lol no, if you don't support a large section of unicode, and can render your game in multiple languages, you're a sad excuse of an enginedev
>>
>>107028457
my game is English only. in the settings you can select a language other than English, and whenever dialogue text appears, a clickable hyperlink will show up on the screen that links to google translate of whatever the text is from English to the chosen language.
>>
>>107028435
Nooo, you dont get it. I need 14 dependencies, corporate attribution free font #47, an SDF effect stack, and 2MB TTFs to make my game look nice.

On a serious note, I love how all these faggots are pretending like Clay solved all of their issues, and they go on to say "yea, I still haven't figured out text rendering. I can't figure out localization. Rolling a UI toolkit by hand would be a buggy mess. I have no stylized fonts of my own. But Clay, there's whats holding my entire experience together. I couldn't live without it." Raylib shitters are pretty much the same.
>>
File: 1752884980219110.jpg (523 KB, 2559x1439)
523 KB
523 KB JPG
How do I make a game that looks this good
>>
>>107028519
Case in point, some faggot just responded, >>107028457, conflating expanded codepage awareness with text shaping and rasterization, over locales he'll never actually support. I think pretending to have a greater audience than Bethesda, Activision, and EA combined is more of a sad larp desu. But, hey, I wont take your 2MB CorporateSanzFree.TTF away from you.
>>
>>107028554
>over locales he'll never actually support.
i'm making a language learning game you stupid fuck
>>
>>107028535
That rock looks like its rocking 512x textures. Those stone models look like they have less tris than a troonslop doom mod. The sand looks like plastic and mud combined. And I think you've found the one screenshot of a recent halo title where dynamic objects don't look like they're lit uniformly with a single color across all viewing directions. The only thing that looks good about this is their copy/pasted water shader.
>>
File: file.png (48 KB, 348x192)
48 KB
48 KB PNG
>>
>>107028457
You can support all the languages that matter including chinese with bitmap fonts
Enginedevs who make things way more complicated for themselves are embarassing
>>
>>107028626
bitmap fonts are retarded, you're not targeting a snes anymore
i'd rather do offline text rendering on the fly with cairo or whatever svg drawing backend
>>
>>107028683
>bitmap fonts are retarded
Why? Easier to use, faster
>>
>>107028683
>filtered by harfbuzz
>filtered by bitmap fonts
>filtered by real time rendering
>calls other people retarded because they don't overengineer their game for the sake of GloboHomoAttribFreeSans47.TTF containing glyphs he'll never use and over kerning that looks like aids
>...a task he hasn't mastered himself
desu
>>
>>107028694
arbitrary UI size
arbitrary DPI support
>>107028700
>>filtered by harfbuzz
>bloatbuzz
educate yourself
https://github.com/JimmyLefevre/kb
>>filtered by real time rendering
the most useful method is patented
>desu
kek
>>
>>107028717
>arbitrary UI size
>arbitrary DPI support
SDF takes care of this
>>
>>107028717
>i-im not filtered, i swear
>desperately posts the first library he finds on google
>"EDUCATE YOURSELF"
>still can't render ttf fonts in real time without baking them into bitmaps
>still bitches about DPI
>still bitches about scaling as though this is a separate issue to DPI
>still thinks he's above bitmap fonts
this is pretty sad, desu
>>
>>107028736
>the first library he finds on google
>kb
lol, lmao even
>>
>>107028745
i accept your concession. consider suicide
>>
>>107028535
For the most part that’s a standard PBR scene with ray tracing giving a little oomph to the reflections and global illumination. Not difficult to achieve, the art is doing the heavy lifting.
>>
top kek. i am playing this old japanese game from 2001 https://en.wikipedia.org/wiki/Zwei:_The_Arges_Adventure
the devs ciphered the stats to prevent the use of CheatEngine or an action replay.
every time a stats is modified, the integer bytes are shuffled randomly. the shuffling key is then stored in memory right after the integer.

something like this

typedef struct 
{
u8 bytes[4];
u8 key;
} shuffled;

void set_shuffled(shuffled *s, int val)
{
s->key = rand() & 0xFF;

val <<= 2;

s->bytes[ emoney.key - 1 % 4 ] = val & 0xFF;
s->bytes[ emoney.key - 2 % 4 ] = (val >> 8) & 0xFF;
s->bytes[ emoney.key % 4 ] = (val >> 16) & 0xFF;
s->bytes[ emoney.key + 1 % 4 ] = (val >> 24) & 0xFF;
}

int get_shuffled(shuffled *s)
{
int val = 0;

val = s->bytes[ emoney.key - 1 % 4 ];
val |= s->bytes[ emoney.key - 2 % 4 ] << 8;
val |= s->bytes[ emoney.key % 4 ] << 16;
val |= s->bytes[ emoney.key + 1 % 4 ] << 24;

val >>= 2;

return val;
}


To increase money, for example, you would do
set_shuffled(money, get_shuffled(money) + 100);


please don't do this.
>>
>>107029298
I've cheated in some RPGmaker shit back in the day (back before it was electron/JS which makes it even easier) and they used to store numbers in-memory as n*2+1.
As much as these kinds of things are trivially easy to defeat once you know, I guess it stops the most basic/casual forms of cheating. I don't really understand the logic of trying to stop people cheating in a single player game.
>>
>>107027601
Interesting. Wasn't aware that Intel pushed this initially, but of course it made sense for them to market it as a reason to sell a hardware upgrade.
>>
>>107025845
Sweep and sort for collision?
>>
>>107030872
I'm using continuous swept collisions.
I need to finally put it to rest since it has a lot of inherent problems especially when tens of circles are colliding with each other. At least there's never a case where something phases through another object no matter the size and speed, so it's still pretty good for collisions with static objects.
>>
File: 1760337369804489.jpg (31 KB, 456x320)
31 KB
31 KB JPG
How dumb am I for trying to make my own 3D engine?
>>
File: helloworld.webm (96 KB, 1036x824)
96 KB
96 KB WEBM
First attempt at pixel shaders
>>
>>107032464
yes
>>
I'm making the game without graphics and then making renderer.
basically the game is going to be 'revealed' by the renderer.

what do you guys think?
>>
File: neatShaderThing.png (2.68 MB, 1341x751)
2.68 MB
2.68 MB PNG
>>107024272
changed to gaussian blur instead of box blur, then changed the edges flow texture thats made to also change the colors a bit in addition to directing the kuwahara kernel

its annoying while moving but there's a shortfall... on a past shader effect I made, it took the UVs from the objects on the screen and cast them with triplanar samples in order to make a cross-hatching style that was stable while moving around the camera. problem in this scene is that 90% of the objects are quads (grass, tree leafs, bushes) and it doesn't work well on quads... Just has to be meshes.

could do motion vectors but I did a different implementation the other day and the motion vectors got too blurred (some reason, stacking on top of each other not clearing despite me saying to the render "clear this please")
>>
>>107033213
>the game is going to be 'revealed' by the renderer.
Sounds like the kind of pretentious bullshit Kojima would say, but you haven't built an audience of brainlets that will eat whatever you say up and praise you for it.
>>
>>107033213
It's like the parable about blind men and an elephant, but this particular man is standing under the elephant's asshole as he's about to shit.
>>
>>107033213
Will we be ashamed of our words and deeds?
>>
>>107033794
There's a lot there. And just going to have to see it to believe it at this point. It's a lot to explain.

The Game is basically going to change the gaming landscape forever.
>>
>>107033794
Depends on what you do in the game of course.
It is a game with high freedom.
>>
>>107033453
It looks better
>>
>>107027857
are you retarded?
do you have any diagnosed learning disabilities?
you need to take a break, maybe come back later, re-read your own posts, and reflect a little
>>
>>107022982
>>107023076
>>107023251
>vehicles have no force
I guess W=F*D is wrong lol
>>
>>107033453
Maybe you will find this post useful: https://forums.tigsource.com/index.php?topic=40832.msg1363742#msg1363742
>>
>>107028535
>rockslop
>waterslop
>cloudslop
looks gay and retarded, soulless even
>>
>>107033213
>separation of game logic and visuals
This is good and something you should strive for
>not knowing this is basic engine development
You're a spastic
>>
>>107034967
Force = team
>>
>>107035303
super cool, thanks anon. this whole time I thought obra dinn was surface dithering. this will probably help me a lot
>>
how do I into modern graphics dev
I did learnopengl site as a kid and drew some boxes in unit using directx
I know of the vertex shaders, buffers and shit
What I'm seeking is the higher-level knowledge and also more modernized stuff like vulkan
>>
>>107035809
Vkguide, it's not great but it's the best you get.

Also look at https://github.com/fknfilewalker/vulkan-triangle-modern
>>
>>107035809
vkguide, book of shaders (somewhat old), shadertoy
and most importantly: mental preparation because you're going to start hating your life
>>
>>107036054
>and most importantly: mental preparation because you're going to start hating your life
why
>>
>>107036364
I suck at math so that's probably why, it took me almost a year to understand the basics of linear algebra
>>
>>107027640
what in god's unholy hellish domains is this fucking IDE
>>
File: engine.png (27 KB, 829x469)
27 KB
27 KB PNG
Is this how modern engines work?
>>
>>107036554
no, they use a job model where jobs get distrubuted amongst any number of threads
>>
>>107036554
>>107036655
I will try doing https://www.rfleury.com/p/multi-core-by-default
>>
>>107036655
IIRC Unreal 5 still has dedicated threads but do some sharing with a job system
>>
>>107036692
unreal engine's multihreading system is a legacy system from the old days
>>
>>107036554
idk
>>
>>107036709
So? It's modern and the most widely used. Thus it perfectly answers the question about what modern engines do.
>>
>>107036801
it's not modern, that's the point
>>
>>107036825
Unreal 5 IS modern and some anon on the internet doesn't get to change definitions
>>
File: 1735636981973475.png (182 KB, 668x674)
182 KB
182 KB PNG
>>107036655
>no, they use a job model where jobs get distrubuted amongst any number of threads
why the fuck would you distribute input reading among many threads?
and how does that even make sense for graphics since those are done on the gpu?
are you talking about the physics engine exclusively? or asset loading?
>>
>>107036884
It's a modern engine using an aniquated threading system because it's descended from the original Unreal engines
A modern engine uses a job system, there's a talk from Naugthy Dog on Youtube about it
>>
>>107036898
Input reading would be one job
We're talking about CPU threading, GPU is a different thing
>>
>>107036910
so the physics engine and asset loading
>>
>>107036900
But Unreal also has a job using, for which it uses Intel TBB
>>
>>107036939
Yes but there's way more things in a game engine than that
>>
File: engine.png (39 KB, 829x469)
39 KB
39 KB PNG
>>107036959
>>
>>107036554
>copying data
>not swapping two buffers and running at double timestep to save performance
>>
>>107036976
no, having a dedicated thread per task sucks
you X number of open threads and you have a job system that can distribute jobs between them
>>
Architecture A:
You have a scene graph, and each node is responsible for rendering itself.
It does this by providing a render() method which makes calls like renderer.drawMesh(buffer, material, transform).

Architecture B:
You have a scene graph. Each node contains buffer, material, transform, etc information but no render() method.
Instead the renderer traverses the graph and decides by itself how to draw everything.

Which do you prefer?
>>
>>107036984
>swapping doesnt copy the pointer
>>
>>107037016
B is better because there's lots of ways you can render something depending on the context
>>
>>107037018
this is an ancient /g/ meme about swapping to numbers without a copy
if your lang cant do this
x, y = y, x

then it is shit
>>
>>107036690
Neat... So, rather than having a jobs system,
>fork 1 thread per core at the beginning of the program
>all threads are homogeneously executing the same code
>everything is duplicated by default
>use thread_id to actually parallelize
>no "callback-hell"-style backtraces
>>
>>107036554
I'm sticking to one main thread except where:
>another thread is absolutely necessary (background loading)
>there's another thread but it's created and managed by a library (audio)
Modern cores are fast and I'm not writing The Last of Us. Putting everything in separate threads and/or using an elaborate job system sounds like a recipe for unnecessary complexity and bugs. (And potentially input latency/bad frame pacing depending on how it's handled.)
>>
>>107035809
Vulkan 1.4, C++23, a decent amount of RAII but not totalitarian
>>
>>107037175
It's a cool idea, but I get the feeling it will be harder than it seems.

Still, when going narrow is as easy as blocking the rest until the "main" is done, it should be easy to do so when needed or when I'm too much of a brainlet to properly split up a task.
>>
>>107036801
UE5 is known for having great rendering not being really performant on the CPU side.
>>
I'm not quite convinced by quad trees, even though they are measurably the best tool at hand for the task. 80% of processing time goes to quads stuck between nodes.
If most objects are uniform sized I should theoretically be able to supplement it with grid buckets, right? Or am I too optimistic about this?
>>
>>107038568
That probably is simple to fix, make the quadrants overlap each other
30% is the figure I use
>>
I'm sitting waiting for TLOU1 to "build shaders" (create and cache pipelines), and I noticed the game ships with dxcompiler.dll.
A quick search of my drive suggests Death Stranding ships it too.
Is this just a holdover from dev builds with hot shader reload? The actual released games surely aren't building from HLSL, right?
>>
>>107038581
Oh shit, that's actually clever. Thanks, will try it.
>>
>>107035809
you say you know buffers / shaders, but you don't actually know, because if using opengl was so easy, you would already have an engine right now.
opengl isn't different from vulkan if you actually understood the problems that vulkan tries to solve. Most people can't actually explain why vulkan is better than opengl other than a missing feature like Raytracing or spirv or mesh shaders (these technically exist on opengl, but only in extensions, some are nvidia only).
There is even more than just that, but I have never seen any benchmarks on real world examples showing a massive difference on the GPU side (for example, there's some nvidia specific stuff related to uber shaders and sub groups being connected to warps, and essentially if all the threads in the warp use the same branch in the uber shader, the warp optimizes the branch away, but what's the fps difference?).
Vulkan is more ergonomic if you immediately start writing zero CPU overhead style code (AZDO), but opengl basically comes out of the box with the bare minimum you need for it to work.
And opengl works on the web with Emscripten (probably one of the few usecases for writing zero bloat game engines because self-hosting is required for multi-thread and precise timer support due to security spectre/meltdown stuff, unless you use webworkers, however you should prioritize a native build because it's hard to make it run well on every browser, and my point is that almost every host will charge you for bandwidth, and on AWS it's like $50 for every tb uploaded, but it is free 100gb per month, soo... if you made the game+assets small, you could probably handle an almost free web game, or just stick to no threads/webworkers and use free hosts like github pages or itch.io)
>>
>>107038977
Why the fuck do people talk about making game engines on web tech
>>
>>107039106
why would anyone want to download an .exe in a so called zip file when everything that isn't downloaded by 1000+ users is considered a potential virus to windows defender?
sure, bypassing windows defender only requires 2 clicks, and steam bypasses windows defender's checks.
but let's be honest, your game is gonna be free if it had a chance to get 1000+ downloads (not players), and you ain't gonna pay the $100 steam tax (refunded after a certain number of sales, I think?).
>>
>>107039192
If you want to make webslop just use Unity
>>
>>107039200
if you want to make a game in general, why not use unity?
why does it have to be for the web?
>>
>>107039208
I figure engine devs take some pride in their work, so if you do why are you targetting the fucking web
>>
>>107039212
You could always use electron and release it for desktop / steam
>>
>>107039238
Or you could not use any web technologies and make a real game like a real man
>>
>>107039212
because users don't need to download the game in a zip file (some users don't know what that is), and the game also works on every platform, even phones, and school computers (nevermind... computer labs don't exist anymore, it's all on the cloud now... windows 365 / google...)
Steam is pretty nice. I think it's where everyone wants to put their games, but it would be nice to put your game on steam, and also run on popular web game sites, like itch.io.
It doesn't need to be a full game, you could make it a demo, and as a demo, you could share the demo as viral marketing.
>>
>>107039243
Okay, post yours then so I can see a good example of a real game
>>
>>107029426
i am looking at the inventory management code right now; they wrote a specific DLL to hash and check if an array has been modified or not.

//Check if the current hash is still the same has the stored one
if (!Check_hash(array))
exit();

//modification of the array
array[..] = ...;

//generate and store new hash
Check_commit(array);


To defeat this protection, you simply have to put a breakpoint and modify the memory before Check_commit is called.
>>
>>107038977
what are you yapping about, you have no clue what I have or what I am aiming for
>>
>>107039919
No reason there shouldnt an animated donkey kong in these threads.
This is thread number 300 i think
>>
>>107036554
No, modern engines are just job systems, however sometimes theres 2/3 "threads" of execution as the rendering of frame N-1 happens while updating frame N. but its all just jobs pushed across multiple cores.
>>107037016
B is a lot better but requires more abstraction and infrastructure upfront to handle the ways you want to draw things. the advantage is the renderer can then do sorting/batching and multiple passes and stuff.
>>
>>107037016
B is better. The more plain data and plain functions that operate on that data you have in your program, the better it is.
>>
>"progress"
I've determined that I'm going to have to delete my existing AABB collision code; not trying to stuff OB collisions into my existing funky algorithm makes everything way more tractable. But it is upsetting to lose polished code. Also the fully optimized code from the dude's paper isn't working, there's some transpose/row-major nonsense going on but it is not being consistent... I should just use the full dot products... "make it run; make it right; make it fast".
>>
>>107024098
The 2016 doom had it seems pretty good. Not sure about the more recent ones.
>>
>>107041392
Trying to write the optimized nontrivial version of something first is a mistake I make way too often. You need the simple version that you can trust as a starting point and ground truth to compare with.
>>
>>107038581
>>107038656
Just got around it. That's a 30% performance boost at 0.6 node size. Thanks pal.
>>
>>107036690
>I will try doing https://www.rfleury.com/p/multi-core-by-default
this is way too long why can't he just give me a tldr
>>
>>107024098
How people do it I don't know, but I was planning on a clustered forward renderer (so you don't just cluster on the width and breadth, but also depth).
>>
>>107040730
>No, modern engines are just job systems,
how would I go about implementing this?
>>
If I have an arbitrary 3D triangle, how can I find the length of question mark from p2 to the point on the line p1->p3 where the line becomes perpendicular or whatever to p1->p3? given that I only know the vertex coordinates and could get the length of each side.
>>
>>107041942
Just get the point on P3P1 by dotting P3P2 onto P3P1 then do P2 minus the point you get out of that and get the length.
>>
>>107041968
got it thanks
>>
>>107041865
Nice yes I'm also going to do that.
The only part i'm concerned about is shadows. The light assignment and shading part seems rather straight forward (haven't implemented it yet, but it just seems there's not that much to it).
But creating shadow maps seems to be more work. the paper/presentation of the guy who invented clustered shading also shows that drawing the shadows takes up the most time and requires some more none-trivial algorithms.
>>
>>107041942
https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line#Vector_formulation
>>
>>107039258
If the player gets filtered by installing software they don't deserve to play my masterpiece
>>
>>107043490
everyone here has the best magnus opum
>>
>>107043490
just say you are gonna release your game on steam under a paywall.
if your game was free, I don't see why you would want your game to be native only, the first people to try your game out are gonna complain about a virus popup, or just hesitant to download any exe since plenty of discord hacking viruses have been on the news.
Releasing for the web is painful, but for free games, it's the perfect platform, because your game is a giga flop if you are not able to get users to play the game and talk to someone about it (AKA, self marketing game), at least if you made a paywall, you could argue that you at least made $5 from one person who was willing to pay (-$95 since you didn't reach the steam refund threshold).
And then there is the part of steam where, if you don't get enough people to add the game to a wishlist, your game will be buried under the 10000 other shovel ware releases and the game will never be recommended while browsing the store (limited games, AKA, "Steam is learning about this game").
>>
incredibly mad at microsoft that they still haven't made a good system for creating sandboxed programs that can assure users that they're not going to get a trojan or something.
a game needs to open a window, display some graphics, connect to some port if it does multiplayer multiplayer, and read/write files in its own directory. why the fuck can't Microsoft come up with some sort of sandboxing mechanism that when implemented gives you some sort of checkmark that says "this app is safe" and allows people to run it without windows defender popups?
>>
>>107044320
>why the fuck can't Microsoft come up with some sort of sandboxing mechanism that when implemented gives you some sort of checkmark that says "this app is safe" and allows people to run it without windows defender popups?
they have, you can pay to get a certificate
but nobody really cares about this, you're making an issue about nothing
>>
>>107044568
Signed code still gets windows defender popups.
But you will see the name of your organization instead of some unknown source.
The defender popup is purely calculated based on the number of users running the application.
And that's not a sandbox / safety system, anon wants windows UWP but without the windows app store, maybe something like linux's appimage.
>>
>>107044645
>linux's appimage
*I know it's not a sandbox, but it would be nice if steam could host some sort of sandboxed blob, where on the first time you run it, it would tell you what type of access it needs, such as filesystem / networking / camera / etc.
>>
>>107044695
Yeah I really wish my programs were bound to Steam as an operating system
>>
>>107044712
My point is that if windows didn't make UWP exclusive to the windows store (because they have their own in-app monetization + hosting costs for stuff like bandwidth, error reporting with stack trace info, reviews / etc).
Steam should also support games that are sandboxed, because there is nothing stopping steam from hosting viruses (for example the cancer streamer that lost $50k in crypto or something due to someone uploading a game that steals crypto wallets).
And if steam had access to UWP, that means everyone has UWP, so you could just store your games as appimages like zip files (These are just zip files on linux, you can view the files using a archive viewer, but you don't need to decompress them, you just double click on the appimage and it works, but it has access to everything so it's not a sandbox).
>>
>>107044786
nobody wants to live in a world where we're dependent on external services to do anything on our computer
>>
>>107044695
Programs should have permissions granted via a patch cables metaphor, and it should be easy to give fake permissions. Parent processes should be responsible for the system calls of their child processes, usually just costlessly forwarding them to the grandparent, but namespacing & isolation should not require root. Prompting for a password should be a syscall that shows the user exactly who they're talking to.
>>
>>107044835
I'm pretty happy that steam is a monopoly, I don't like the idea of needing to install epic games + EA + blizzard stores.
I consider the package manager on linux to also be a external service, and downloading exe's from a website is just another annoying external service because it's going to have it's own account system, and it's going to be mandatory for any online game (for a single player game, sure, it's not depending on anything, but you are not gonna make any money unless you go with the patreon or whatever crowdfunding system).
One account, one library, save files are backed up onto the cloud, that's pretty good, it's like netflix before things got shitted up.
But you clearly didn't even read my post because I said:
>And if steam had access to UWP, that means everyone has UWP, so you could just store your games as appimages like zip files
All steam does to launch programs is using system("C:/path/to/exe"), that bypasses windows defender. So if steam had sandboxing, that means there is a self-contained offline version of the game, which is file that you could execute.
>>
>>107044990
So you want Steam to be able to bypass Windows Defender but it can already bypass Windows Defender? idgi
>>
>>107022982
this shit is getting way too complex for me, I regret not just pursuing this straight out of college when I still tapped in into all the linear algebra and instead getting in a rush to go webdev wage
>>
>>107045055
sandboxing is different than Windows Defender, and sandboxed applications don't exist on windows, all .exe programs have access to steal your discord login token.
steam already bypasses Windows Defender, but sandboxing would help allow steam to block games from changing the game into a virus after being approved, by either by explicitly asking for new permissions with a scary popup, or just blocking it entirely (this is how linux sandboxing works, and why people hate linux sandboxes and always install applications like vscode / discord / steam directly because they have bugs due to lack of permissions).
>>
>>107045182
i dont remember of the top of my head, but if this is yaw/pitch/roll rotation, then you should look how rotation matrix looks like for each axis separately
it makes way more sense, at least for me
>>
>>107045182
You don't really need to understand how various transform matrices are constructed yet (or honestly ever).
You're hopefully using an existing vector/matrix library, so just use the functions it provides and focus on getting comfortable with the general ideas of composing matrices by multiplying them and transforming vectors by multiplying them with matrices.
>>
>>107045268
This
These "learn the math from scratch" guys are wasting their time
>>
>>107045268
yeah, i think it was the shadertoy guy who said it, but if youre using explicit angles with cos/sin, you are maybe doing stuff the wrong way. you can get most of what you want done with just vector dot/cross product and matrices.
its still useful to know some of the math though
>>
how much nonstop work are you able to do before you turn into a complete retard?
I'm going on ~9 hours and I'm fucking up left and right. Need to take a break but I don't want to
>>
Using Godot 4.6 is like waiting for Godot. All I can think of is "So when does it get good?"
>>
>>107045740
>how much nonstop work are you able to do before you turn into a complete retard?
30 seconds or so.
>>
>>107045742
Godot 4.7 will fix that



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