[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 / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


Mode 13h edition
/gedg/ Wiki: wiki.installgentoo.com/wiki/Gedg
IRC: irc.rizon.net #/g/gedg
Progress Day: rentry.org/gedg-jams
/gedg/ Compendium: rentry.org/gedg
/agdg/: >>>/vg/agdg

Requesting Help
-Problem Description: Clearly explain the issue you're facing, 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: >>101359693
>>
first for manual memory managment
>>
anyone in here tried making a game in C++ with strongly asynchronous architecture? I mean ASIO kind of asynchronicity, with coroutines and stuff. it would seem that games, with everything revolving around the main loop, should be a pretty good fit to this kind of architecture.
>>
>>101391857
Games aren't actually a good fit for asynchronous , it makes your logic way more complicated, if game developers didn't need the performance nobody would bother
>>
>>101391857
>should be a pretty good fit to this kind of architecture
Eh, not really. A game is just a loop of drawing frames, and there isn't a whole lot asynchronous going on (excluding anything about talking to a GPU).
>>
>>101391463
Make it short, and immediately get to the point.
As in, just show the aspects of the game that would be interesting/appealing to the broad demographic for that type of game. In your case it's roguelike, strategy and puzzle gaming crowd.
No need for cinematic shots, intros, logos or any of that crap, just show me the goods. What is cool about your game? Deep stat system? Huge variety of items and monsters? Cool proc-gen algorithms? Complex system interactions?
You have approx 5 seconds to catch the attention of someone before they scroll past, mute or pause your video as they scroll around bored and half paying attention.

At least that's how I'd go about it.
>>
>>101391937
I guess async could also be useful for loading assets. Loading screens are usually pretty static because everything is blocked by disk I/O. Async disk access would allow to make them more interesting. I know it's possible without async, but it seems more natural in terms of design.
>>
>>101392009
I don't think it would really be worth the effort of doing "proper" async file I/O vs just throwing a couple of threads at it in that situation.
>>
nth for 32 bits lights, see the pic in the OP? I suspect if all those lights would have use 32 bits somehow tehy'd look way better and more realistic, a nice trick is to use along add/multiply/linear light layer blending modes for max effect
just cut the crap am I saying retarded shit? cause I know this indeed applies to the VFX realm but I don't know if this translates to videogame engines
>>
File: Mindustry on Steam.png (619 KB, 940x459)
619 KB
619 KB PNG
>>101391576
>mainly avoiding datamining the game mechanics and secrets
Protecting secrets it's probably the best justification. There are instances of snes/n64 games who managed to hide things for decades. A mechanic however is not something you will be able to hide for a long time, specially it if comes to a mathematical formula.
>Also a valid concern, especially for those shitty cheat outsourced companies, the problem is that they never try to surpass the original, they only bloat the market by millions of mobile tier asset flips. At least make them actually work for it.
I can't think of many instances of this.

On the other hand, there are some successful open source games, and it looks like none took advantage of it to build a shameless clone.
>>
>>101392211
>32 bits lights
what's that? honest question.
>>
>>101392211
you have autism
>>
>>101392292
no, I just want to see 32 bit lights in action on a game engine, simple as
>>101392269
well blending modes and all those kind of tricks used to produce light effects behave in a way better way under a 32 bits color space, which produce realisitc light effects
>>
>>101392324
you wouldn't even know if it had 32 bit lights because your screen only displays 8 bit colors
>>
>>101392324
>a 32 bits color space
You definitely don't know what a colour space is.
>>
hi all, just wanted to share my propotype game, here is the code (python):

>print("welcome to... WAR OF THE WORLDS")
>print("select your PLAYER:")

>print("CHUD ULTIMUS")
>print("STACY GIGAMUS")
>print("NEGROS FURIUS")
>print("BASEDIUS HYDRUS")

i wanted to get some early promotion going to get people hyped for the release, could someone suggest where i can get concept art? thanks!
>>
>>101392404
>open sourced
Thanks for beta testing faggot, my much improved "WAR OF THE WORLDS REDUX" will feature `print("JEET SHITTER")`
>>
>>101392442
first GTA VI, and now this...
>>
>>101392327
top lmao, you have 0 clue of what you're talking about, good job
>>
>>101392498
If I show you a screenshot of a game, can you tell me if it has 32 bit lights or not?
>>
>>101392337
color space might not be the technical word for it, but I couldn't care less I've worked with it in VFX , so explain, why so self deffensive?
>>
>>101392506
it would be hard to guess, but I could try, I'm no expert though, just a dude that went a bit in that rabbit hole and liked what he saw
>>
>>101392522
Yeah so you don't fucking know
The end result is 8 bit, the only way you can tell is by playing a game and seeing if it has HDR or not
>>
>>101392535
you're based, but of the retard kind, read some theory, and practice it and maybe then you won't be saying retarded shit
>>
>>101392547
Do you know how HDR is implemented in games?
>>
File: output.png (1.14 MB, 1024x1024)
1.14 MB
1.14 MB PNG
>>101392404
its ok guys i got some from ai
just need to write a few lines of backstory/lore and then ill be in business
>>
>>101392625
and by "write" you mean prompt, right?
>>
>>101392794
cant draw to save my life, but i can write a few lines
>>
>>101392569
look I don't feel like explaining VFX theory to retards, I'm sorry, just as a clue, this is way older than HDR monitors
>>
>>101392834
LLM will do it better. don't get in the way.
>>
>>101392882
NTA but artists are fucked, writers are not
seethe
>>
>>101392890
you just know LLM will come up with a better story than you
cope
>>
>>101392922
seethe, draw fag
>>
>>101392936
I don't even draw, retard. you are still obsolete.
>>
>>101392879
I'm not talking about HDR monitors, retard
>>
>>101393019
then what are you talking about? I'm all ears
>>
>>101393037
HDR is 32 bit lighting in games, that's what you're asking for
Valve did a demo of it called Lost Coast
>>
>>101393046
funny to see such good lighting with such poor geometries and textures
>>
>>101392978
>can't draw
>can't write
what a fucking loser. get some soul
>>
>>101393089
its 20 years old
>>
>>101393090
>soul
obsolete. seethe faggot.
>>
>>101393095
makes sense, well in the VFX world it's called "32 bits float" cause that's what after effect calls the project you work on when you enable it, otherwise you're not getting the full juice
>>
guys, stop arguing. ive done some writing.

>>101392834
bios:

CHUD ULTIMUS:
>"Billions must die."
Peace is a disease, and War is the cure - so is the wisdom of CHUD ULTIMUS. to awaken The European Spirit is his goal, except when his dear mother distracts him by taking the dirty dishes from his bedroom.

STACY GIGAMUS:
>"Eww."
Surrounded by losers, STACY can hardly withhold her disgust at the "men" she suffers around her. Easing up the corporate ladder, her army of HR personnel lay the red carpet before her everywhere she goes.

NEGROS FURIUS:
>"WAKANDA"
Measuring 8'2, NEGROS FURIUS is the most peaceful member of his tribe. Physically incapable of not being angry, woe be to the self-checkout machine that meets his gaze.

BASEDIUS HYDRUS:
>"Let's unpack this."
The subject of a black budget DoD Onions experiment, BASEDIUS HYDRUS has attained telekinetic abilities, manifesting his own perception of the world into reality. Around him, homeless men *are* programmers, and newly-arrived migrants demonstrate amazing mathematical abilities - but only in his radius of influence.
>>
>>101393127
Of all the things you choose to use your writing ability on, you choose /pol/ fan-fiction
>>
>>101393157
the idea i have is, they will have their 'extreme' dual-identities. so normally theyre just kinda tame, but when the power meter fills up, CHUD transforms into CHUD ULTIMUS, a pan-european Fuhrer, and can land howitzer shells wherever he points on-demand. STACY becomes STACY GIGAMUS, who is this world-wide corporate CEO and basically destroys you with lawsuits, or instagrams you to death... idk about this one yet, haven't fleshed it out. NEGROS becomes NEGROS FURIUS, which is pretty self-explanatory. and BASEDIUS becomes BASEDIUS HYDRUS and can throw objects into the opponents character, summon onions rain, etc.
>>
>>101393102
i'll be selling hand written and "organic" words on physical paper for obscene prices while you strap on your headset and chip away at a digital rock all day for 4 ounces of cricket protein powder a week
>>
>>101393225
sure you will, buddy. you can open shop together with all the drawfags living off furry porn commissions. I hear the business is booming.
>>
>>101393254
fuck you man
>>
>>101393293
must have struck a nerve lmao
>>
Noob here who doesn't know about low lvl stuff:
Why does vulkan need you to manually compile the shaders? Why can't it do like opengl and compile them at runtime?
I saw it has something to do with drivers but I still don't get why the app can't compile it.

And then, is it the same for other modern APIs? (vulkan, metal, DX12)? Do they need you to "manually" (I do it with automatically with cmake) compile them in spir-v?
Finally how does webgpu do this: I heard that webgpu is just a layer that relies on a modern api installed on your OS. Yet webgpu doesn't require you to precompile your shaders.
>>
>>101393526
>Why does vulkan need you to manually compile the shaders?
Vulkan likes to waste your time because it doesn't make any assumptions about anything
>>
>>101393539
>Did you just assume my render?
>>
>>101392404
STACY GIGAMUS
>>
>>101393317
just thought it would be a kek response
also don't want to have to take refuge with the furries just to survive
>>
>>101393526
dx12 dev here, what do you mean, you can either precompile or compile from source at runtime
>>
for those curious about 32 bits in digital imagery this kinda gives you some info:
https://youtu.be/xqXwgqGRi7Y?feature=shared&t=876
14:36 in case the timetag doesn't get through
>>
>>101393734
Hdr workflow (doing lighting computation with floats in a linear space, using tonemapping...) is the standard indeed in modern rendering, especially because of pbr.
And indeed, OP's pic is typical of this ancient time of doing computation with srgb and integers.
>>
>>101393793
ngl I tried to research this in my vfx times, and I got something off it, but the theory is beyond twisted and hard to grasp. what I understood was this. edit in 32 bits, apply light effects, like glow, add, linear light, multiply, etc in there. Then re-render to fxr or whatever and use in your 8 bits compo and render to normal vid
>>
File: feels-3502135343.jpg (110 KB, 1262x709)
110 KB
110 KB JPG
>>101387539
To the anon that made that post. God bless you.
>>
>>101393840
When they say 8 bit, they probably mean 8bits represented as INTEGER per color channel (0 to 255). And when they say 32 bits, they probably mean 32bit FLOAT per color channel.
You indeed need to do the lighting computation with floats because they allow for larger lumen representation (imagine a tiny light of 0,001 lumen vs the sun of 200000 lumen => you can't properly manage the difference with only 256 values at your disposition and will end up with saturation, so you do the computation and then scale it back to the range from 0 to 255.
Do you see what I mean?
>>
>>101392269
A schizo.
>>
>>101393840
> but the theory is beyond twisted and hard to grasp
It's not that hard.
I will give you a qrd:
Your typical monitor uses a 8bit per channel format to display the image.
That means that you have 256 intensity values to represent something like the sun intensity vs something like a lighter intensity.
Now imagine you are doing light computation in your scene (this is what your vfx software is doing internally when you click on the UI). Imagine you add a sun to your scene: Your scene receives light. Wooow so much light!!! Let's increase the intensity to the value 150 for instance! And then there's someone smoking a cigarette. Well you want the cigarette to lighten its surrounding. + 1 intensity value! Then the car: + 30! Then the an explosion: + 50! Ect, and quickly, you reach 256. And it's called saturation: You won't see the difference if you add other lights.

So what do you do? Well you use something called tone mapping: You use 32bit floats (which have a waaay bigger range) to represent the light intensities of your scene, then do the computations THEN use maths (Reinhard) to scale it back at 8 bits (256 values) per color channel, something that your monitor can display.

https://learnopengl.com/Advanced-Lighting/HDR
>>
>>101393999
>>101394280
yeah I get it, does such thing applies to game engines?
>>
>>101394305
Yes of course. Hence the link "learnopengl".
Your VFX software is probably using your GPU to do those computations.
And the goal nowdays is to be careful to not scale back to 8bit if the display is HDR capable.
>>
File: particle-spiral.jpg (124 KB, 768x365)
124 KB
124 KB JPG
https://dgerrells.com/blog/how-fast-is-javascript-simulating-20-000-000-particles
>CPUs and GPUs can crunch numbers fast. Like really really fast. Moving data around is slow and even slower when accessing data randomly. If you want to go fast, it is good to know how hardware works.
https://youtu.be/sjqG1lZI_Ls
>>
>>101394337
>And the goal nowdays is to be careful to not scale back to 8bit if the display is HDR capable.
nice, what formats do allow this?
>>
>>101394361
>Once webgpu is a little more well adopted I will take a stab into compute shaders
You can easily do that with fragment shader and wgpu shader language is terrible
I'm scared of wgpu shader language.

>>101394392
A2B10G10R10 for instance
>>
>>101394448
>A2B10G10R10
damn son, how can they give it that name, actual psychos
>>
>>101394629
alpha 2 blue 10 green 10 red 10
>>
>>101394634
still psycho name
>>
>>101393526
vulkan supports compiling shaders asynchronously. It's what makes vulkan run emulators faster than opengl.
>>
Got this bitch working on mac.
Mostly because my work laptop is only thing that I have at hand that have a high DPI so that I make sure the game looks good on those.
>>
>tfw dont have an hdr monitor so cant even test things like that
>>
>>101394665
you name it then
>>
apple is smoking the good shit. You need to have the same names for you in/out between the vertex and fragment shaders.
>>
>>101394935
fxr, sounds cool, don't ask me what it means
>>
>>101394906
**But I don't know how asynchronous shader compilation actually works in vulkan, on one level you can compile multiple shaders with multiple threads into SPIR-V using threads because the SPIR-V compiler is separate from the vulkan api, since vulkan is no more thread safe than opengl 4 stuff, I don't know if vulkan supports a way to load multiple SPIR-V into the vulkan context asynchronously (I assume sprir-v loads much faster, but if you want instant loading you need to compile the shader to the GPU's binary format which requires recompilation every time you update the driver (I think?) or change GPU.
>>
>>101394956
autist
>>
>>101395263
but the FX!
>>
>>101395280
elon will sue you for using the x
>>
>>101394906
>>101395007
thx and indeed shader compilation should be done at the beginning and once for all.
I think the issue is that in big projects shaders use the #if, #elif, #else, and #endif directives that are triggered at runtime.
>>
on average how many shaders do games usualy have?
>>
>>101395973
tripple A games have approximately 1
>>
>>101395973
A shit load.
In theory, if you are the god of c++/shader language/pre compilation/software architecture/design it should be only two shaders:
One for opaque, one for transparency.
Then the rest for some special effects.
>>
How do people use coroutines? I see they are everywhere now but I don't really get them.
>>
>>101396024
per pass*
>>
If only making an appimage was as easy as packaging an app for macOS...
>>
File: 1418210149620.png (287 KB, 900x1525)
287 KB
287 KB PNG
does your game have milfs?
https://github.com/Anuken/animdustry/issues/2
>>
>>101397724
No, women overflow and crash after the 4th bit.
>>
>>101393526
>Why does vulkan need you to manually compile the shaders?
So buggy driver doesn't compile them shittily. Also you could use any language you want, as opposed to being forced to use glsl. It's simply a better idea.
>>
File: 2024-07-13_16:54:56.png (16 KB, 1920x1080)
16 KB
16 KB PNG
Front rendering.
Not working but this issue seems familiar.
I think its a problem with color blending.
>>
File: 2024-07-13_17:01:38.png (125 KB, 1920x1080)
125 KB
125 KB PNG
>>101398943
Oops!!
>>
File: 2024-07-13_17:09:33.png (239 KB, 1920x1080)
239 KB
239 KB PNG
Fixed.

Now I can transcribe my Raylib UI code I made earlier this year. In fact, what you are seeing is UI code for the "text box". That is, fitting a text message inside a box and inserting new lines when appropriate. I have Raylib code for editable text field and a game log I need to transcribe. Should be quick.
>>
File: 2024-07-13_17:29:27.png (242 KB, 1920x1080)
242 KB
242 KB PNG
Left, Right, and center alignment check.
The three textboxes are stacked and have the same width and height.
>>
File: 2024-07-13_17:36:49.png (276 KB, 1920x1080)
276 KB
276 KB PNG
Multiline check. Words wrap perfectly. But it looks like apostrophes are a no-go.
>>
>>101399356
What libraries are you using for text rendering?
>>
>>101399394
https://github.com/sheredom/utf8.h#api-function-docs for some utf8 convenience functions that I didn't want to make myself.
freetype to handle truetype fonts
vulkan to render
>>
File: 2024-07-13_20:23:00.png (247 KB, 1920x1080)
247 KB
247 KB PNG
Fixed the error.
A casting issue (I think it was getting force casted into a positive number) when I added the bitmap height to the negative of the bitmap top (the sum is negative). So if a glyph is high above the baseline and sufficiently small it is, which is why the error only showed up with the apostrophe.

See y2 in
Loading ... codepoint: '39' advance (pixels): 7, x1 : 1, y1: -23, x2: 6, y2: -15
>>
>>101398132
>So buggy driver doesn't compile them shittily
When has this ever been an issue
>>
Is it worth implementing GAS (Gameplay Ability System) if you're making a game in Unreal Engine?

https://dev.epicgames.com/documentation/en-us/unreal-engine/gameplay-ability-system-for-unreal-engine
>>
>>101394909
are your sims going to be pepe?
>>
>>101400561
This is the type of thing you really should be able to program on your own if you think you're a game programmer
>>
File: 2024-07-13_20:34:18.png (178 KB, 1920x1080)
178 KB
178 KB PNG
>>101400530
It looks like I made another mistake
Notice how the right and center aligned texts are a bit off. I think it is because I use the "advance" of each width when calculating the line width. That's fine when you are finding the width of words to determine how many words can fit on a line. But its not okay for alignment, because of the last glyph. The last glyph should use width + x_bearing instead of advance.
>>
File: 1641606438569.png (241 KB, 1440x1388)
241 KB
241 KB PNG
>>101400587
>This is the type of thing you really should be able to program on your own if you think you're a game programmer
>>
>>101400646
gem
>>
>>101400646
What's that supposed to mean?
>>
>>101400744
That you're a fucking moron who thinks it's a better idea to spend years writing and debugging a massive gameplay system by yourself.
>>
File: 2024-07-13_20:57:37.png (248 KB, 1920x1080)
248 KB
248 KB PNG
>>101400601
Yeah I think I fixed it. Also, now space characters at the end of a line don't factor into line width calculations.
>>
>>101395973
In one of my projects replicating a fixed function pipeline I have 45 fragment shaders, 26 vertex shaders, and 122 distinct pipeline states.
>>
>>101400783
>years writing and debugging a massive gameplay system
Something like this is a weekend project
>>
>>101396024
>>101396077
did you mean there's only one shader that gets written? because when aaa games compile thousands of shaders
>>
>>101393526
>Yet webgpu doesn't require you to precompile your shaders.
that is because apple doesn't like bytecode or cross vendor compatibility
it was originally intended to, it got removed literally only because of them, and chrome and i think firefox added it back unofficially
>And then, is it the same for other modern APIs? (vulkan, metal, DX12)?
yes
OpenGL supports it too

>>101395007
>since vulkan is no more thread safe than opengl 4 stuff
no, vulkan is extremely thread safe, the API intentionally creates very little thread specific state, when something has thread affinity (like command buffers) you're told, and when something has potential implicit locks like a pipeline cache you can disable them
it also includes actual synchronization primitives for host/host, host/device, device/host, device/device
whereas it's only safe to touch the opengl context from one thread at a time and explicit multithreading can literally only be done via spawning multiple contexts or mapped memory

you've got a very bizarre idea of how shader compilation works
the model that's actually exposed to the programmer has two levels of shader compilation, Source -> IR (SPIR-V) -> Binary (there are more in the actual driver)

the source to IR compilation pass doesn't actually need to involve vulkan or the GPU drivers at all, and it's also possible to handle generic operations at a very high level (linking multiple object files into a single binary, vendor neutral optimization passes) and is also easier since SPIR-V has a lot more metadata
this is trivial to multithread especially if you use headers correctly, each source file is its own compilation instance
it's separated out from vulkan so improvements to developer shader tooling aren't dependent on driver updates and so that driver vendors can focus on optimization
1/3
>>
>>101401164
what actually happens in vulkan is the IR -> GPU specific binary pass where vendor specific stuff happens, like hardware specific optimization
even then you aren't actually loading the binary onto the GPU, and compiling pipelines from multiple threads or even from other programs is safe
i believe what you're meant to do for on the fly compilation is use the extension that causes pipeline creation to fail if it's not in the pipeline cache, disable optimization and perform blocking compilation if it fails, use those pipelines in the interim, do the actual compilation tasks on a threadpool, using a pipeline cache per thread(?) then merging them into the actual one which is using explicit synchronization, swap out the pipelines, save the cache to use on next launch
steam installs a vulkan layer which handles some automatic cache management, so i don't know how necessary some of that is

that's prior to graphics pipeline libraries which i haven't gotten a chance to use, which i think act like static GPU libraries and can enable a kind of vulkanized opengl style workflow only static
i.e. vertex input pipelines correspond to creating your VAO/VBOs, pre-rasterization pipelines are your vertex shader and a few other things, fragment shader pipelines are obvious, fragment shader output pipelines correspond to the framebuffer setup

earlier on in vulkan's lifecycle the whole thing was a lot harder because almost everything had to be specified at pipeline compile time, but now very little does
most of that state can just be set to null and changed at runtime without requiring recompilation
2/3
>>
>>101401172
also descriptors (gpu resource pointers that back uniforms) were initially retarded and extremely opaque (fairly opengl-like) and also required a lot of interdependence between shader source code and static pipeline configuration, now there's fairly wide support for more dynamic access methods
the descriptor buffers extension goes further and actually exposes them as memory (which is apparently a lot more like DX12) and not just opaque handles, basically freeing you from having to worry about them

even without it shaders now have access to pointers (buffer device addresses) for everything aside from textures and raytracing structures which can be used without even touching descriptors at all
opengl has nothing like this at all, and if all you're doing is using vulkan for compute it's actually extremely easy

that being said the real problem has nothing to do with vulkan, you aren't supposed to have fucktons of tiny little vertex and fragment shaders that do literally fucking nothing
DOOM Eternal for example actually renders pretty much everything with the same set of shaders
https://simoncoenen.com/blog/programming/graphics/DoomEternalStudy
most shader graph editors and the traditional way artists do material based shading are antithetical to the way GPUs actually work, you should have very very few very very large shaders and you should handle branching at runtime
modern GPUs have hardware acceleration for branchless conditionals, fast paths for some branchy ones, dynamic instruction reordering, the ability to hide latency by juggling multiple shader invocations, and aren't going to bottleneck on scalar operations assuming you do them at the right granularity
for some reason people have convinced themselves that best practices haven't changed despite the more to more general purpose hardware
>>
>>101400577
Honestly I haven't yet think about how they should look like. My first thought would be low poly humans like the sims and project zomboid. But you make me think that anthropomorphic animals could be a cozy "original" idea. I might not good with frogs though.
>>
Added skeletal animations so I can do custom animations for different doors
>>
File: IvyMen_ufkGJ8pKgc.webm (2.51 MB, 1008x728)
2.51 MB
2.51 MB WEBM
>>101401347
Oops forgot the webm
>>
>>101401356
Looking gud, buddy!
Is this a Chicago simulator?
>>
>>101401239
>for some reason people have convinced themselves that best practices haven't changed
People don't know
Sometimes you still see artists trying to optimize every triangle like it's 1998 because programmers haven't told them it doesn't matter anymore
>>
Do you recommend Sokol for building your own engine?
I dont get how thats any different from a fully-fledged framework like Raylib for example
>>
>>101401938
i recommend glfw + opengl loader
>>
>>101393122
>it's called "32 bits float"
>cause after effect
does your mother also float?
>>
Can I be an engine programmer if I don't give two shits about graphics or the GPU?
Just want to work on gameplay related features and networking
>>
>>101403202
>gameplay related features
So, a game?
>>
>>101403202
Yes
Most of the people here think game = graphics but graphics are only a small part of it
>>
>>101395007
>I don't know how asynchronous shader compilation actually works
I can tell.

>you can compile multiple shaders with multiple threads into SPIR-V using threads
Good job, you just described multitasking.

>because the SPIR-V compiler is separate from the vulkan api
Wrong, thread safety is a much more granular feature, saying <API> as a whole is thread safe or not, is a misguided statement. There may be parts that are lock-free, and seperate parts of the API may use independent locks, specific to the feature you're using.

>compile the shader to the GPU's binary format
This can also be parallelized.

>which requires recompilation every time you update the driver
Not necessarily.
>>
File: 155.png (768 KB, 743x743)
768 KB
768 KB PNG
>>101403202
Another software renderer fan?
t. tigervnc cockblocked the device gpu therefore 90% of "gimme a window and a set_pixel()" libraries i know of are unusable to me
>>
>It's a nodevs bikeshedding about Vulkan thread
>>
>>101403678
AGAIN
>>
>>101403678
nodevs and froggy blogshitting
>>
>>101403678
Everybody here should be using Vulkan
>>
I don’t know much about this Jonathan Blow guy but he seems to have a lot of opinions for somebody that doesn’t produce anything
>>
>>101404115
It's like OpenGL except twice the work for no benefit
>>
>>101404131
I thought The Witness was a very well designed puzzle game but it could have easily been made in Unity
>>
>>101404115
cultist
>>
>>101394361
nice, I remember when I made a space shooter game in JS years ago it would lag like hell if I had something like 100 objects on the screen
>>
Stupid question but what does it mean to “split your vertex data into multiple streams”
>>
File: IMG_20240714_042937_653.jpg (173 KB, 1257x880)
173 KB
173 KB JPG
my code says nigger in it several times and you would never know by playing the game
>>
>>101400825
still a waste of fucking time unless you are trying to learn how to design them
>>
>>101404290
Learning how to do fundamental gameplay programming is never a waste of time
>>
>>101404457
I get what youre saying and agree, but an entire weekend on something I wasnt aiming to digest is alot when Id rather be designing something else. We all make games for different reasons though.
>>
>>101404501
You'd rather not put much thought into the fundmental gameplay systems of your game? What?
>>
>>101400561
I actually quit Unreal and started engine dev partly because of my frustration with this system. Despite being advertised as a primary system of the engine unfortunately Epic doesn’t treat it that way. There are parts of it I do love that I intend to replicate. Unfortunately the only resource I can find for this type of thing besides Unreal’s source code is a GDC talk on For Honor.
>>101400783
GAS isn’t that hard to copy, at least if you’re not targeting networking. It’s just the gas component, gameplay ability, gameplay effect, attribute set, and that other thing that calculates attribute changes. Along with gameplay tags which is just some string hashing, I think. A simple version can be very useful.
>>
https://github.com/dotnet/runtime/issues/65850
for the gc fag
>>
>>101404841
Good GCs for games have incremental garbage collection so it doesn't have to pause
Pretty sure Unity has this
>>
>>101403000
trips of truth, I might follow your recommandation
>>
File: maxresdefault.jpg (141 KB, 1040x700)
141 KB
141 KB JPG
>>101403202
you could make a text-mode rouge-like engine with ncurses. or maybe some interactive fiction engine.
>>
>>101404505
Id rather have that sort of stuff done so I can make skins and design levels, ect. Not everyone is autistic and career focused in this. I enjoy creating things for the sake of creating them. This doesnt mean I havent spent an entire week refactoring a system to get it perfect or understand it in order to understand all the functions it will interact with. I would just prefer to automate certain things so i can spike my dopamine on what I like.
>>
>>101405037
I can understand that if you aren't a programmer, but if you aren't a programmer why are you in this thread
>>
>>101401356
very nice, but I hate the camera sway
>>
>>101405069
Because im developing a game and learn things here sometimes. Is there a noob thread for casuals?
>>
>>101405008
it's an unironically good recommendation.
>t. GLFW + OpenGL enjoyer
>>
>>101405112
But should I skip OpenGL and implement Vulkan directly?
>>
>>101405124
you could, but are you ready for all the hassle?
>>
>>101405124
I still stick with OpenGL, because of WebGL. If I didn't care about web, I'd probably go with Vulkan.
>>
>>101405187
Why do you care about web?
>>
>>101405090
nah, you're good here bro. game development is not only coding. this is not /dpt/.
>>101405228
why wouldn't I? it's the most popular platform.
>>
>>101405135
Is it really that hard compared to OpenGL?
>>101405187
yea I don't really care about WebGL for a desktop game
>>
>>101405249
Thanks anon.
>>
>>101405253
>Is it really that hard compared to OpenGL?
it gives you more control, but is way more verbose. I wouldn't recommend Vulkan to beginners. not because it's so hard, but because of how much stuff you need to learn to get the first triangle on screen.
>>
>>101405253
>Is it really that hard compared to OpenGL?
It's not really harder. It's why I choose the word "hassle".
like >>101405330 said
I would recommend that you do something in opengl to familiarize yourself with rendering at an higher level before you dive deep in the lower level of Vulkan.
>>
Getting back on track, should I skip OpenGL? I don't feel as fun, I did go through the opengl tutorial website but now I kinda want to start playing around with raylib and start making stuff.
>>
>>101405340
There's literally no point in moving beyond OpenGL into Vulkan
>>
>>101405364
raylib's fine so long as you're making a 2D game
>>
>>101405330
>>101405340
Well I did some OpenGL for school like 6 years ago, I could render a full 3D environment, load some textures etc, just need to get back to it. Only the shaders stuff that I really didn't understood.
>>
>>101405374
bummer I wanted to play with some 3d. Should be fine, I'll cross that bridge when I get there.
>>
>>101405364
yep, if you're not into graphics programming, you can skip OpenGL. I haven't used raylib myself, but heard good things about it.
>>
>>101405388
It might be ok if you want to do some simple 3D stuff but it's quite limited
>>
>>101405367
Why so much hate on Vulkan? This is basically the next step for graphic computing
>>
>>101405456
Pragmatically Vulkan offers absolutely nothing to an indie dev
I thought well that's ok, at least they're training for future employment but then someone posted a graph showing Vulkan usage falling off a cliff in favour of DX12, so that's no a valid reason either
>>
>>101405375
In that case you might as well give vulkan a shot. I learned it with https://vulkan-tutorial.com. Be warned that you won't get a triangle on screen quickly. Also make sure the validation layers works.
>>
This general is too full of 2D sissies. Everybody should using either Vulkan or Dx12 and working on 3D. This is a game engine general damn it! Clearly some people are using this place as a safe space from /agdg/. I don’t care about the little shit 2D game that could. If you’re going to mope just go to r/gamedev, they got plenty of mopers over there. That’s it, from now on every language that isn’t c/c++ is banned. There’s going to be some big changes around here.

https://learnopengl.com/
https://vulkan-tutorial.com/
https://vkguide.dev/
https://www.realtimerendering.com/
https://www.gameenginebook.com/
https://gpuopen.com/
>>
>>101405967
Where's your 3D game?
>>
>>101405473
>Pragmatically Vulkan offers absolutely nothing to an indie dev
yea type punning data into integer based linked lists is so preferable to having actual pointers in shaders i love not having access to features of the hardware and not being able to have referential data structures in a sane way
and geometry shaders run really well and not like dogshit on everything except intel igpus
if you're doing anything vaguely voxel adjacent, extensively using procedural geometry, or doing anything that vaguely needs compute related features vulkan is literally your only choice unless you're going super retro or want to add yet another potentially promising game that runs like absolute dogshit to the pile

gpus have changed a lot in the years since opengl feature froze, as has vulkan
mindlessly complaining about it because you refuse to learn new things that seem intimidating doesn't make the fact that there are whole categories of shit opengl cannot do in any capacity any less true
for some tasks you'd be better off writing a game in CUDA than opengl because at least you'd be able to access modern hardware features
>>
>>101405967
2d has more soul
>>
>>101406011
>if you're doing anything vaguely voxel adjacent, extensively using procedural geometry, or doing anything that vaguely needs compute related features
that puts you in a very small minority of people who might actually have a valid use case
for people making normal games, no
>>
>>101406011
Also Teardown was done in OpenGL
>>
Apparently my AMD gpu has native support for FP16. What can I do with that?
>>
>OpenGL
>Direct3D
>Vulkan
Why not all 3?
>>
>>101406022
For your indie games, no. Everyone knows 2d means you're jsut bad at programming and design. 2d takes no skill.
>>
>>101406111
https://overclock3d.net/news/software/ubisoft-details-their-use-of-fp16-compute-rapid-packed-math-in-far-cry-5/
>>
>>101406022
Name one game dev billionaire that made their fortune with 2d
>>
>>101406171
Richard Garriott
>>
You wanna make 2d, fine, but there's no need for you to comment in a engine development thread. You can use any of hundreds of engines, heck even WSIWYG game makers, or could even code your "own" in JS with canvas and it will run fine on machines from the last 10 years. 2d engine development is extremely easy and it's a totally solved problem.

That can be a good thing for you. You can focus on other game development aspects when you give up on engine and graphics. It might be the best option for you to make a good game. But there's no need for you to post here.
>>
>>101406244
Where's your 3D game
>>
>>101406251
Where’s your 3D engine?
>>
>>101406251
What's your address?
>>
>>101406270
on my hard drive
where's yours
>>
File: packed.png (30 KB, 803x193)
30 KB
30 KB PNG
>>101406111
most GPUs have had it for a while
>What can I do with that?
half precision is faster, on modern AMD GPUs it's 2x as fast as FP32
while they're somewhat unique in that regard on most GPUs it's still a lot faster
it's significantly less accurate and it's really only usable in the range of [-1, 0, 1] since you get more sig figs that way
haven't seen many gamedevs talk about good uses for them, only warnings on where they're bad to use

i've only ever used them on AI stuff, they're used to accelerate ML related tasks

>>101406160
interesting, i didn't know directx had access to the packed operations
that's not really an intrinsic property of using half precision, that's a very small set of AMD specific instructions, that also support (u)int16, pic related is them on the vega cards
the only thing that's changed on modern cards is mad was replaced with fma_mix
using half precision would also add speed on top of the packed ops but there's a lot more the hardware can do, most instructions on AMD cards support FP16
>>
>>101406111
nothing
>>
>>101406284
127.0.0.1:1234
>>
>>101406131
>no metal
>no mantle
>no glide
racist
>>
>>101406328
i wonder if mantle even works still
AMD's still shipping the libraries in their windows drivers for some reason
>>
>>101406328
>Metal
>Mantle
that's Vulkan now
>Glide
>Voodoo Graphics
interesting
>>
>>101406291
Proof: not found
>>
File: 1720480813144549.png (2.27 MB, 1920x1080)
2.27 MB
2.27 MB PNG
>>101406244
>You can focus on other game development aspects when you give up on engine and graphics.
So the important aspects that sell games and justified the "game" part?
>>
File: engine.png (52 KB, 619x600)
52 KB
52 KB PNG
>>101406543
>>
>>101405967
>c++
dropped!
>>
>>101406610
>empty folders all made at the time time
>>
File: bugs.png (153 KB, 831x698)
153 KB
153 KB PNG
>>101406610
Now cloc it faggot.
>>
>>101406658
it's about 30k
>>
>>101406664
post the output
>>
>>101406672
I don't have any program that counts LOC
>>
>>101406676
https://github.com/AlDanial/cloc
>>
>>101406692
Yeah I'm gonna install this and run it just for you
>>
The shitter was exposed.
>>
File: 1686529866581441.png (74 KB, 394x409)
74 KB
74 KB PNG
>>101405967
>That’s it, from now on every language that isn’t c/c++ is banned.
>c++

Nice try. You are 10 years too early to make demands ...
>>
File: editor.png (1.54 MB, 1296x974)
1.54 MB
1.54 MB PNG
>>101406748
I'm one of the only people I've seen in here who's actually made a 3D engine
>>
>>101391857
Coroutines are surprisingly good for dialog systems. I used them once when playing around with Lua to build a branching narrative thing and it was smooth (although for the specific case of dialog trees, data driven approaches are usually better)

I could see it maybe being used for quests or similar game systems if you can serialize state to disk. Writing out high level flow with coroutines for a complicated branching quest would be relatively easy like that.

But for low level game systems, probably not so much. Modern engines are highly parallel and make use of task systems, but I doubt that's what you're thinking of
>>
If you aren’t using c++ then you aren’t an engine programmer and therefore have no reason to be here
>>
File: 1580242388622.jpg (260 KB, 750x736)
260 KB
260 KB JPG
I want to develop a multiplayer RTS. Nothing fancy just a few units, top down view, 2D. I want to make it so units are customizable. Where do I start? I have experience with C, Python, Java. What engine do I use, or do I start writing my own? What language is best?
>>
>>101407202
>What language is best?
The one you are most comfortable with.
https://www.youtube.com/watch?v=rOVnDZeaBk0
>>
For me, it's bytecode VMs. If you're just here to talk about graphics APIs then you're shitting up the thread.
Drawing triangles is a solved topic. Executing bytecodes is what game engines are really about.
>b-but my game doesn't have a VM
Then why are you here? Writing games in C++ is a solved topic.
>>
>>101407228
Absolute disgusting cringe
More cringe than c++ even
>>
File: syx.png (27 KB, 834x115)
27 KB
27 KB PNG
>>101407213
>>
>too many fags coming here to make games instead of engines
>>
>>101407228
>reinventing the wheel is ... is ... LE BAD!
>>
>>101406941
>what is C
>what is Lisp
>>
File: girls_laughing.jpg (51 KB, 359x478)
51 KB
51 KB JPG
>>101406171
>he makes games for money
>>
>>101407283
If he used an enginel, he'd have bugs no one can help him with, that he also can't fix himself
>>
File: IMG_0123.png (1.26 MB, 1024x1024)
1.26 MB
1.26 MB PNG
Can I wrap a JS game with electron/tauri and publish it on steam? I'm using threejs, I only know web dev. Was thinking learning Lua/Defold if not possible. Thoughts?
>>
>>101408227
yup you can
>>
Making a first-person game in Godot, trying to decide on how to do melee combat. Raycasts or colliders? Already built a raycast system but obviously being a single line if you're off target you miss even if the animation would look like you hit. But it triggers once, and isn't frame-dependent.
>>
How am I supposed to learn game dev in this fucking heat?
>>
>>101409775
If you're laptop-pilled go to a library
>>
>>101409775
it builds character
>>
>>101406244
I want to make a 3D, mini voxel(like teardown) game and I wish there was a premade engine that can just do it. But it seems like everyone just rolls their own voxel engines.
Free voxel editors are not very good either.
>>
>>101406135
3d isn't even significantly more complex than 2d. math is basically the same.
>>
>>101409775
by stopping being poor and get an AC.
>>
File: IvyMen_q0TwORSjEo.webm (3.31 MB, 1008x728)
3.31 MB
3.31 MB WEBM
Added actual colliders to my doors. Need to make it less tricky to worth with (lot of hardcoded value right now), but this is promising
>>
>>101409775
heat is the natural environment to your CPU and GPU. heat helps you understand how your computer operates. heat makes you become one with the machine. just take it in.
>>
https://www.youtube.com/watch?v=zmzS9vz6h30
>>
>>101410529
nice urban youth simulator
>>
For the first time I've made a game I found myself casually replaying, just to beat it again and maybe get better highscore. I should make more levels I guess.
>>
>>101410374
>math is basically the same.
trollface.jpg
>>
Hey guys I'm trying to do dual source blending in Vulkan and I want to know if I'm on the right track.

The fragment shader would look like so

#version 460

layout(location = 0) in vec4 fragColor;
layout(location = 1) in vec2 fragTex;

layout(location = 0) out vec4 outColor;
layout(location = 1) out vec4 outColorMask;

layout(set = 1, binding = 0) uniform sampler2D texSampler;

void main()
{
outColor = fragColor;
outColorMask = texture(texSampler, fragTex);
}


There are two outputs. I think the steps are

1. Check the physical device features for dual source blending and enable in the logical device
2. Create the swap chain images and image views as per usual.
3. Create another set of images (an equal amount) without using the swap chain (use Vulkan memory allocation like when you need to use textures). Also create image views.
4. In the framebuffer creation add my new image views in with the old ones.
5. When making the render pass add a second color attachment
6. During pipeline creation, I have something like this:

(continued)
>>
>>101411716

For this step, I generated this with gpt because I didn't want to type it. Am I correct in my reasoning?

// First attachment blend state
VkPipelineColorBlendAttachmentState colorBlendAttachment0 = {};
colorBlendAttachment0.colorWriteMask = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | VK_COLOR_COMPONENT_B_BIT | VK_COLOR_COMPONENT_A_BIT;
colorBlendAttachment0.blendEnable = VK_TRUE;
colorBlendAttachment0.srcColorBlendFactor = VK_BLEND_FACTOR_SRC_ALPHA; // Source blend factor
colorBlendAttachment0.dstColorBlendFactor = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA; // Destination blend factor
colorBlendAttachment0.colorBlendOp = VK_BLEND_OP_ADD; // Blend operation for color
colorBlendAttachment0.srcAlphaBlendFactor = VK_BLEND_FACTOR_ONE; // Source blend factor for alpha
colorBlendAttachment0.dstAlphaBlendFactor = VK_BLEND_FACTOR_ZERO; // Destination blend factor for alpha
colorBlendAttachment0.alphaBlendOp = VK_BLEND_OP_ADD; // Blend operation for alpha

// Second attachment blend state (dual source blending)
VkPipelineColorBlendAttachmentState colorBlendAttachment1 = {};
colorBlendAttachment1.colorWriteMask = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | VK_COLOR_COMPONENT_B_BIT | VK_COLOR_COMPONENT_A_BIT;
colorBlendAttachment1.blendEnable = VK_TRUE;
colorBlendAttachment1.srcColorBlendFactor = VK_BLEND_FACTOR_SRC1_COLOR; // Use the secondary color output as the blend factor
colorBlendAttachment1.dstColorBlendFactor = VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR; // Destination blend factor
colorBlendAttachment1.colorBlendOp = VK_BLEND_OP_ADD; // Blend operation for color
colorBlendAttachment1.srcAlphaBlendFactor = VK_BLEND_FACTOR_ONE; // Source blend factor for alpha
colorBlendAttachment1.dstAlphaBlendFactor = VK_BLEND_FACTOR_ZERO; // Destination blend factor for alpha
colorBlendAttachment1.alphaBlendOp = VK_BLEND_OP_ADD; // Blend operation for alpha
>>
>>101411723
You should look up an actual GitHub example instead of using chatgpt
>>
>>101412137
I am actually. PCSX2 apparently has blending so I'm checking there currently. I thought at first maybe all I would need is step 1 and to alter the blend state. But the vulkan layer bitches at the renderpass which causes bitching about the framebuffer and so on and so forth.
>>
>>101412167
Use dynamic rendering
>>
>>101391816
has anyone ever had to make extensive modifications to your game's RNG system? i was using the standard RNG system C++ provides, but it made the game i was making extremely frustrating and unfun, so i spent most of yesterday and saturday working on an, ironically, less "random" but more fair RNG system.

it was really just playing around with shit until i hit on a balance that somewhat kind of worked, and even still i think i can probably improve the balance further. i just wish there was some way to describe how "fair" a sequence of values was, within the context of the game i'm writing, as opposed to solely caring about how "random" they are
>>
>>101412771
this is like an extremely well known problem that has nothing to do with programming and everything to do with human psychology and the way it interacts with statistics
true unbiased randomness doesn't feel random to human beings, if you ask a human to select numbers at random there's distinct biases towards specific numbers
iirc i think there's a probability distribution designed to feel more natural, it might even just be the normal distribution, not sure
>>
>>101412771
You never played tabletop RPGs if you think fair RNG is fun.
>>
>>101412771
>>101412863
i think another problem is that it's really hard to test different weightings for the system, since weightings that seem fine on one trial could be way too easy or completely unfair on the next game, or the game after that, and so on

the solution there is probably to stop being a caveman and do something approaching an actual experiment, but it's kind of more fun to just mess around with values until something feels good to play
>>
>>101412863
>true unbiased randomness doesn't feel random to human beings
You mean to idiots
People who have an incorrect subjective perception of random distributions should not be pandered towards

>>101412951
Fair RNG is fun so long as they're high frequency / low impact so the fate of a game doesn't rely on a single dice roll
A good example is DOTA, a 15% chance for 2x crit on Juggernaut is fine, a 15% chance for a 5x crit on Phantom Assassin is not because the outcome of the entire fight can be determined purely by getting lucky
>>
Maybe the reason true RNG "feels unfair" is because shit gamedevs have been training gamers for years to have an incorrect model of reality by tweaking the RNG.
>>
File: Tryndamere_OriginalSkin.jpg (215 KB, 1215x717)
215 KB
215 KB JPG
>>101413025
>>
>>101414430
gross
don't play games by developers that explicitly actively discriminate against linux for literally no reason
especially not bad ones
>>
>>101414500
Imagine turning computers into an ideology
>>
>>101414430
no. i play the better game, warframe
>>
File: swizzle.png (125 KB, 987x877)
125 KB
125 KB PNG
Vectors have been swizzled
var
v1 = vec(1, 2, 3)
v2 = vec(4, 5, 6)
v3 = vec(-1, -3, -5)

check:
v1.zx == vec(3, 1)
v2.xxy == vec(4, 4, 5)
v1.xzy == vec(1, 3, 2)
v3.zxz == vec(-5, -1, -5)
>>
Can I make minecraft in godot?
>>
>>101415128
yes
it's not a very complicated game especially if you're basing it off earlier versions
depending on how you did it it could run better than java minecraft
>>
>>101415128
why make minecraft in godot when minetest exists?
>>
>>101415370
I've been working on an adventure game in godot. After playing Dragon Quest Builders, I realized I could incorporate a lot of the work I have done into a voxel based game. Also, I just like godot and want to make use of it's features.
>>
>>101415128
Yes but you’d still be better off making your own engine tailored specifically to a Minecraft-like
>>
>>101412771
>standard RNG system C++ provides
what the fuck do you need that required "extensive" modifications?
c++ provides all the elementary distributions, and there isn't anything commonly used that couldn't be computed from those distributions (no beta? just express it as two gammas, ...)
>>
File: script_lang.png (60 KB, 738x362)
60 KB
60 KB PNG
Slowly but surely i'll crawl back into the game
Picrel is my proposed solution to making gamedev in rust more tolerable than last time: a forth interpreter in which I'll do all my scripting
Granted, my forth skills are shit, but it is all what I have at my disposal right now
>>
>>101416309
this is one of the most nodev things I've ever seen
>>
>>101416309
>Writing a new lang to make Rust bearable
Hmmmmm, what if you just used a non-shitlang in the first place?
>>
>>101416309
stop being a procrastinating faggot and just like make game.
>>
>>101416309
https://www.youtube.com/watch?v=Z9GbGO7CKdQ
>>
>>101416309
Congratulations are in order for hooking the entirety of /gedg/ with the shittiest bait I've ever seen in my life; that's got to be less than 20 lines of code.
>>
>>101416025
>what the fuck do you need that required "extensive" modifications?
i don't want the same number to be generated more than twice or three times in a row, and i want to generate numbers based on the overall frequency of each value
>>
>>101416371
People will do anything to not use c++
>>
File: csharp-hero.png (27 KB, 663x374)
27 KB
27 KB PNG
>>101418450
Except the right thing.
>>
File: 1692830247851904.png (99 KB, 283x375)
99 KB
99 KB PNG
Still no luck on my end. Has anyone tried dual source blending in Vulkan before? Having two color attachments in the render pass is mandatory, correct? I was under the impression that you had two fragment shader outputs and but one attachment initially. I've tried with two attachments and still no luck, kek.

>>101412554
I don't really understand how that will help me.

>>101412863
I think what crpg's tend to screw up is the idea of failure. I'll keep my points specific to skill checks.
1. Getting locked out of an outcome. This is where the save scum comes in. In those circumstances, I think I prefer flat skill checks with an opportunity to try again at a later date (I'm thinking of things like opening treasure chests or recruiting party members in this instance)
2. In games, if you recover from a failure the reward or outcome is always equal to or worst than if you succeeded.

I think if you manage to overcome a failure by being clever you should be rewarded more than succeeding without being clever. I also think games with speech mechanics should do what the first fallout game did, and not show you which additional speech options are available due to your skills. So basically

You succeed a check and you are just as clever as you'd have to be in order to recover from a failure > Recover despite failure because you were clever > Succeed without being clever >>> Fail without being clever

There should be a large gap between smart recovery and mindless success.
>>
>>101418613
*There should be a large gap between smart recovery and mindless failure.
>>
>>101418613
>>101418654
I used the word "clever" a lot and while I don't think the term is completely inaccurate I think there is a better way to describe it. It should be more about immersing yourself in the skill from a roleplay perspective.
>>
File: 2024-07-15_14:17:22.png (366 KB, 1920x1080)
366 KB
366 KB PNG
>>101412554
Are you suggesting this because of this "output remapping"?
>>
>>101419457
I literally don’t know what the fuck I’m talking about. I just threw out a random term.
>>
For me, it's toit https://docs.toit.io/language
>>
>>101418613
so the way i read it you have explicitly have one color attachment for each output location but internally it uses up more
the second output index per location is accessible only through the blend factors VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, and VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA

not sure when vulkan changed the rules or if you need to enable an extension for it but according to one of the vkd3d-proton devs
https://themaister.net/blog/2019/09/12/the-weird-world-of-shader-divergence-and-lod/
texture sampling only has to be dynamically uniform on a per-quad basis if you have a subgroup size >= 4 which both AMD and NVIDIA GPUs do, you could just have one output and select what you want to output in the shader
>>
>>101407456
nodev languages.
>>
>>101419691
>>101420464

I think I'm making at least a little progress on figuring this out. This is a circumstance where my crappy GPU is being useful by being crappy.

If you look at my pic related I did some looking at the physical device and it turns out the max number of outputs for dual source blending is 1 but dual source blending is also supported by my physical device. As the spec says

"The maximum number of color attachments that can be used in a subpass when using dual-source blending functions is implementation-dependent and is reported as the maxFragmentDualSrcAttachments member of VkPhysicalDeviceLimits."

This means that you should be able to dual source blend with one color attachment if I understand correctly. Originally I was under the impression that you didn't NEED more attachments to dual source blend but you COULD use more than one. But the weird thing is, when I try with 1 attachment, the vulkan layer complains when I have two outputs in the fragment shader (not seen in pic related since I changed the code to use 2). So I'm still not sure what is going on lel.

Dual source blending is just a single paragraph in the spec, I don't know why I'm struggling so hard kek.

>>101420464
I'll give the that link a read. Thanks friend.

>>101420550
You are just building my motivation to prove you wrong.
>>
>>101420550
Upboated, my fellow reddit bro!
:)
>>
File: 2024-07-15_15:49:37.png (253 KB, 1920x1080)
253 KB
253 KB PNG
>>101420559
And I forgot the image
>>
File: 2024-07-15_16:12:11.png (281 KB, 1920x1080)
281 KB
281 KB PNG
>>101420464
>second output index
Fucking hell ... Index, not location
I N D E X

Anon you've done me a lot of good.

#version 460

layout(location = 0) in vec4 fragColor;
layout(location = 1) in vec2 fragTex;

layout(location = 0) out vec4 outColor;
layout(location = 0, index = 1) out vec4 outColorMask;

layout(set = 1, binding = 0) uniform sampler2D texSampler;

void main()
{
outColor = fragColor;
outColorMask = texture(texSampler, fragTex);
}


I had layout location 1 instead. The image is still fucked but a huge problem was solved.
>>
>>101420559
>the vulkan layer complains when I have two outputs in the fragment shader
well do you? are they using the same location? using a second location might imply there's 4 color attachments total, two explicit two implicit
layout(location = 0, index = 0) out vec4 outputColor0; //the color attachment
layout(location = 0, index = 1) out vec4 outputColor1; //what uses the implicit color attachment resources


>>101420722
lol never mind they weren't
>>
>>101420762
Yeah it was a typo in my shader haha. It's still messed up but this should be easy to fix. It's probably just something in the color blend fixed state function, another typo in the shader, or the glyph loading.
>>
>>101420722
Holy shit how long have you been working on drawing text to the screen?
>>
File: baby microwave reverse.webm (1.31 MB, 1280x720)
1.31 MB
1.31 MB WEBM
>>101421003
I can draw text, but I'm trying to do subpixel rendering since yesterday
>>
>>101420559
>You are just building my motivation to prove you wrong.
Have at it, I'd be pleasantly surprised to see one of /g/'s C cultists actually make a working program.
>>
Lets say that for my minecraft-like in godot, I wanted to keep maps to a small size like a traditional adventure game. Would using gridmaps be viable? https://docs.godotengine.org/en/stable/classes/class_gridmap.html#class-gridmap
>>
>>101421042
Doing proper subpixel font rendering sounds like a complete nightmare on modern systems
>>
Hey /g/uise, my cousin made a map in picrel's lvl editor for a LAN party and its pretty gud but kinda lacks in some respects. i wanna try a stab at it now, are there any resources you would reccomend for fps level design? Im not that retarded but some pointers would be noice. I wanna make a more "doom"/"quake" style map. Thanks for looking
-k. newton
>>
What should I know about when tackling the following in Unity:
Music files
SFX
VFX
Leaderboards
Server to clients
2D animation.
Hidden UI on top of hidden UI on layers
Different layers for enemy interactivity and optimization.
Messageboxes, popupboxes, chatboxes, search functions, galleries.
Replacing a file with another file in game such as renaming it... while in game.
Optimization for masses of enemies, projectiles, VFX, SFX.
>>
>>101415128
Can I make Minecraft in Unity ot UE5 and make it run better than Java?
>>
Where does one borrow music from without getting sued? will some random Genesis game give a duck that give a fuck that I borrowed its music n SFX?
>>
File: 1720822059951587.jpg (266 KB, 905x881)
266 KB
266 KB JPG
spent the past month architecting, refactoring, and undoing the refactoring. this is hell.
>>
>>101421168
Here
https://github.com/nunuhara/xsystem4
https://github.com/nunuhara/ai5-sdl2
>>
If I want to own the leaderboard scores should I buy a server in my house or just rent like 3? USA, Europe, Australia.
>>
>>101415128
the principals of a voxel game stray so far from the purpose of the engines that you might as well make it from scratch
>>
>>101405967
The problem is that people like you have the ego of a superstar but the reality is that you only care about programming and end up accomplishing nothing because success is a people's skill not a technical skill.
3D games are a solved problem, every 3D game looks the same, maybe it feels / looks different, but for most general purpose 3D game engines, everything is open to customization to the point where with the help of some low level API you can make it work.
You could create a 3D game engine to create something unique, but the reality is that you are working on a game engine isn't a revolutionary way of expressing a 3D environment like minecraft or fez (which can be made in an engine by the way), instead you are just making a FPS game with lighting in a binary that is less than a megabyte large because that matters?
https://www.youtube.com/shorts/3OmaWv4eoq4
There is also this schizo that is obsessed with scripting, not sure if you are the same person but scripting for community content is pointless because people who want to make mods need a community + distribution system, you could organize it, but it's a lot easier if you just let the community do everything themselves and copy paste generic unity modding frameworks into your game and you don't need to pay for the website / hosting / etc (and that's implying your game is fun enough for people to want to code for you). And they are able to add silly things like lovense mod or fixing bugs you didn't fix, or add multiplayer to your game that is only singleplayer (and note that pretty much every game with notable modding communities are for games that are in unity, I don't know of a single decently sucessful recent game with a custom engine with scripting other than factorio which is like 10 years old).
>>
>>101422880
it doesn't matter because I will use cheat engine day 1 to fuck it.
>vac
easily subverted by pirating the game if it's singleplayer
>too unpopular for someone to upload a cracked copy
(this is copy pasted from reddit)
Files needed for cracking:

CreamAPI - cream api is a steam emulator, with this you can change the process ID of the game to whatever game you want, if the game is free steam will report you as playing this game and let you use the servers for that game on whatever one your emulating. the process ID for Spacewar is 480.

CreamAPI comes as a steam_api.dll file and a cream_api.ini file, steam api contains the crack to emulate steam and cream_ini is how you configure that emulator to modify things like process ID, DLC, Etc

SteamOverlay.ddl - this one is simple, while using cream api to you will lose the Shift-Tab overlay, making it hard to invite people to actually play after uve cracked it, this file just adds the overlay back to the game.

Winmm.dll - This is a file that lets you use things like controllers in ur game, you may say "whats the relevance?" honestly, i dont know. but ive never got a crack to run without this file.

dlllist.txt - This is a text file called DLL List, and it contains what it says. a list of the ddls. if a name of the dll is not in this list it wont run, the only thing its used for is to call SteamOverlay.dll Into the game
>>
Does this look good? I don't want to drop godot.

https://github.com/Zylann/godot_voxel
>>
>>101423265
>>>/vg/agdg/ come back when your cortex starts developing
>>
>>101423300
Shut the fuck up, bitch ass white boy. I'll fucking kill you.
>>
File: 2024-07-15_21:32:55.png (280 KB, 1920x1080)
280 KB
280 KB PNG
>>101420722
Think I might have found my mistake so I could fix things. Each row in a freetype bitmap has "pitch" number of pixels not bitmap width. I checked a few Shithub repos and saw that they used pitch in their subpixel code. When you use a certain flag for subpixel rendering I think I saw in the reference that it adds padding. So that makes sense.
>>
after a long break I got back at my game and started to work on AI stuff. I figure if I can't into ai then I might as well quit. fortunately I got a basic "if you're close then follow" thing pretty readily, had to modify my game loop mechanics some but seems pretty good now. I'm just going to implement some basic stateless ai stuff and move on until it needs to be expanded.

unrelated but I hate ncurses, should I quit the terminal thing and go the fake terminal route or is there another tui library people recommend?
>>
>>101423237
It's not going to have a Steam release.
It's going to be WebGL.
It's going to be hosted on my website.
You will require a NFT to play it.
Checkmate, cracker jacker.

Also nobody fuck with me, do you faggots actually know how to program or can you at least fetch me the source code for Worms World Party/armaggeddon/worms 3D to see how optimized the netcode for it is?

and I guess fetch me the statistics for what the majority use for PCs and internet connection. Worms should be a very optimized game.
>>
>>101423649
There's so many levels of retardation to unpack here
>>
File: 2024-07-15_21:50:52.png (331 KB, 1920x1080)
331 KB
331 KB PNG
>>101423587
Now things look better, but I have to figure out how to clean these artifacts. They aren't too easy to see unless you open the image in a dedicated tab and zoom in. They are highly visible on the screen though while the program runs.
>>
File: 2024-07-15_22:09:23.png (349 KB, 1920x1080)
349 KB
349 KB PNG
>>101423714
That was 32 pixel font size and bitmap font size was shown. If I make the font bigger and scale down the texture to 32 pixel the problem is way worse (not shown). When I make the bitmap font smaller (16 pt) and scale up the problem is reduced (pic related). In all these scenarios the displayed font size is kept constant.
>>
File: level_editor.webm (365 KB, 1024x768)
365 KB
365 KB WEBM
I've done it. I've made the jankiest editor of all time.
>>
>>101423649
you should ask web devs what to do
>>/wdg/
>>
File: 1706056601851498.png (122 KB, 350x633)
122 KB
122 KB PNG
>>101425001
>>
>>101407228
>VM
solved topic. just use wasm. stop shitting up the thread.
>>
>This work aims to bridge the existing knowledge gap in the optimisation of latency-critical code, specifically focusing on high-frequency trading (HFT) systems. The research culminates in three main contributions: the creation of a Low-Latency Programming Repository, the optimisation of a market-neutral statistical arbitrage pairs trading strategy, and the implementation of the Disruptor pattern in C++.
https://arxiv.org/pdf/2309.04259v1
>>
>>101423649
>It's not going to have a Steam release.
>It's going to be WebGL.
>It's going to be hosted on my website.
dangerously based
>NFT
not based. what is it? 2021?
>>
>people telling me using vulkan is pointless unless I want to do low level gpu optimization but also telling me opengl is obsolete and should stop using it immediately
which one is it
>>
>>101423649
>Also nobody fuck with me, do you faggots actually know how to program or can you at least fetch me the source code for Worms World Party/armaggeddon/worms 3D to see how optimized the netcode for it is?
I don't think this require anything special other than broadcasting input. Latency doesn't really matter. You can checkout hedgewars which is an open source clone of worms https://github.com/hedgewars/hw
>>
>>101425325
first one
>>
>>101425325
OpenGL is not going anywhere. especially when it's possible to implement it on top of Vulkan.
>>
>>101422639
you didn't actually expect to ship the game, did you anon? it's all about the journey.
>>
>>101425443
C isn't going anywhere.
>>
>>101426175
was this intended to be sarcastic
>>
>>101426196
Just admit you feel hurt.
>>
>>101426205
If any programming language will be around in 100 years time, it will be C
>>
>>101426209
Just like opengl.
>>
>>101426224
No, in 20 years time OpenGL will only exist as emulation
>>
>>101426234
I'll mark your words.
>>
>>101426259
Might be 30 years if hardware progress is slow
>>
>>101425648
i want out
>>
>>101426561
I want your mother. Make a new thread.



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