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


Moving over to the dark side 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: >>101063587
>>
I wanna see 32 bit skies and lights
>>
File: holy shit mario.jpg (131 KB, 1130x756)
131 KB
131 KB JPG
PROGRESS DAY IS IN 2 WEEKS

https://itch.io/jam/gedg-progress-day-6
https://itch.io/jam/gedg-progress-day-6
https://itch.io/jam/gedg-progress-day-6
>>
>>101092927
dumb question
any art style is market viable
>>
>>101092927
Hey why are you making the game I want to make
>>
>>101092964
No, I mean the software rendered voxel part. As in, do you guys think that game can even be pulled off technologically?
>>
>>101092987
There are plenty of environs in the world and different lores.
Our games can both exist, it'll be ok.
>>
>>101092989
there's games that use software voxels for some things like Red Alert 2 uses it for vehicles
You won't be able to draw everything as a voxel at a modern resolution
>>
>>101093041
alright, I'll just keep on going with Vulkan then
>>
>>101093041
Nta but what if one were to have the software renderered frame be at a low resolution (320x180) that's then upscaled and blitted post-render to the actual frame buffer?
>>
That reminds me, I posted this in the last thread:
Voxel software renderer with 1-4px size voxels, yay or nay?
I'm considering doing something like this, but a potential problem would be: how would I make and render objects and characters? Voxel terrain is a snap, but objects/characters? Tools like MagicaVoxel are a PITA for me to work with, and "dynamic" voxel structures could potentially be computationally expensive.
>>
aaaactually, what if I were to base my renderer on an old and unique graphics hardware?
Like say, the Saturn's VDP processors?
>>
>>101093065
you can do that
>>
>>101092927
i mean maybe?
more so if you include entirely compute based rendering as software rendering since the notion of software rendering is kind of out of date, the raster pipeline is basically entirely software now

>>101093054
if you're already using vulkan why on earth would you use anything else, stop fucking retrocoding, it's retarded
properly using mesh shaders for procedural geometry and/or maybe also really low resolution hardware raytracing would be the ideal but that requires cutting edge hardware
>>
>>101093090
So something like what paraLLEl does for N64 graphics?
https://github.com/Themaister/parallel-rdp
Have at it.
>>
>>101093090
sounds retarded
>>
>>101093080
>voxel structures could potentially be computationally expensive
??? Do you not have a depth buffer? Rendering them is identical.
>>
>>101090416
Should've used Claude 3.5
>>
>>101093338
But how do I store the voxels? Only way I can think of that's not octree is a 3D array which is retarded
>>
>>101093467
https://research.nvidia.com/publication/2010-02_efficient-sparse-voxel-octrees/
encode them as bitfields
other potentially relevant more recent stuff would probably be under BVH or acceleration structure since speeding up raytracing is in right now and both octrees and bvhs are spatial partitioning trees
also use warp (subgroup) level ops whenever you can
in particular, to handle compaction (an extension provides mbcnt on amd, don't know if nvidia has a dedicated opcode for this but you can emulate it doing something like bitCount(subgroupIndex & bitmask)) and broadcasting
>>
>>101092583
https://www.youtube.com/watch?v=SzHfZYClTwo
I suspect this game makes good use of 32 bits lighting, what say you, it might not be needed, if you carefully cut and mix, but at the same time it can be really convenient, photorealistic effects on top of photorealistic effects in a non destructive color blending
>>
>>101092583
https://www.youtube.com/watch?v=iZFjtX_cr4o
not sure if he explains it, but, with 32bits, full 32 bits pipeline or else the 8 bits will make the whole thing destructible , you can fake light easily, just make a rustic luma key mask of a light or a reflexion, pass that thingy that """"casts rays from the center or wherever""""" make it 3bity and you got some killer light beams, grab the dof and make a horizon tint map, make explussive light passes to bump up the light info and the controll over the final scene, make hdr sphere maps, the whole thingy
pls show me examples you do, can be a a sample, a test :DDDDDD
>>
>>101092583
https://www.youtube.com/watch?v=xgBrNQJKHg4
>>
Is it worth making games for UEFN for money? I always see the zoomers on the comment section of every epic vid talking about uefn that they keep giving the traffic and money to the top 10 content creators that started on the platform and everyone else gets jack shit plus their ideas stolen

Apparently the only success story was “future trash” that made this weird pvp tower defense red vs blue game
>>
>>101095478
Sounds like you answered your own question
>>
>>101095526
I’m a boomer with UE skills who knows nothing of fortnite or epic’s practices so I’m asking. Don’t know if I can trust zoomers or epic
>>
>>101092530
>pic
Why should it not be necessary? (I've never worked with D3D)
>>
>>101095478
The first goal is to get a single person to buy your game.
>>
>>101095586
Never
>>
>>101095586
>I’m a boomer
You're the one that can't be trusted
>>
>>101095586
There's no low-hanging fruit in games. Popular game-within-game platforms like Fortnite or Roblox are places where the top 1% take all of the money
>>
alright, that's it.

voxel software renderer in assembly.
>>
side project idea:

voxel software renderer in assembly. RP as a 90s programmer making Daggerfall.

It's just for fun, I have a main project in Vulkan.
>>
https://loglog.games/blog/leaving-rust-gamedev/#once-you-get-good-at-rust-all-of-these-problems-will-go-away

if anyone wants to read something
>>
>>101096553
Rust is a cult
>>
>>101078939
> What are you using to make this?
For the guy from previous thread, busy working on HLA (read: high-level assembler) so I missed entire thread yesterday, catching up now, heres the answer:
-- Ada programming language, GNAT compiler (part of GCC).
-- Raylib 5.1 for audio, input and video, made my own Ada bindings.
-- My (bad) pixel art patiently drawn in GIMP 2.10...
This game currently is 700 KiB of source+sprite data, when finished it'll be less than 1.2 MiB, with all the content, uses 10% of CPU (singlethreaded) and 37 MiB of RAM.
Planned content is 6 factions, 90 weapons, 120 armour parts, 120 landmarks and locations (map objects with or without effect), 12 maps plus randomly generated maps.
--
Game is minimal in terms of resource usage (potato PCs can run it), in terms of colour palette, and in many more aspects, you can even see that this 1800x900 screenshot is mere KiBs.
>>
>>101096553
You already posted this script kiddy's complaints.
>>
>>101096988
Continuation, I only use Raylib to draw a sprite on the screen, get the user input, play a sound and load sprites, fonts and sounds. Everything else is implemented in Ada from scratch.
I don't really care about privacy so you can check it out here, link below, also I don't really share my projects so there's only 9 of them in my Git. And yeah, this game is FOSS and modder-friendly.
https://gitlab.com/xames1/xorana
If you know at least basics of Ada, you can mod it however you want, UI code is the only uglier part in my opinion, will be refactored (if I broke some rules sdom will know what to do...).
>>
>>101096998
Rust sucks, cope
>>
https://github.com/Siv3D/OpenSiv3D
Huh, TIL there's a japanese equivalent of raylib
>>
>>101097499
looks better than raylib
>>
>>101097499
> C = C + 1
No thanks...
>>
>>101092530
What the fuck is an Entity Component System?
>>
>>101097779
A cult
>>
>>101097779
it's a game logic architecture,
>>
>>101097779
the Rust of game architectures
>>
>>101097779
Architecture in which game elements are defined through the sum of behaviors attached to them. A behavior can be AI, control, position, appearance, inventory and so on. The entity then would contain an array with its components which you can modify at runtime. Example:
Monster: [Position, Look, Health, Inventory, AI].
I think is a neat way to organize your most elementary gameplay structures, specially if you don't have OOP.
>>
>>101097512
much better
>>
>>101092530
> there is a c++ repl
https://clang.llvm.org/docs/ClangRepl.html
is it a good idea to start using it for scripting or will I still be better off learning lua?
>>
>>101097512
>>101098507
>Boost
Yeah, nah
>>
>>101098604
scripting? no
definitely not game scripting
the ability to just go #include <library> and then %lib sharedlibrary.so seems like it might be nice but llvm is not known for runtime performance (that's why valve replaced mesa's shader compiler with ACO)
maybe more metaprogramming, hot reloading and debugging tools, i think the compiler or at least the base AST type is directly exposed to the repl's runtime in a weird way

the project it's a simplified form of, originally derived from, and now used by, cling, was about autogenerating cuda kernels if that's of any guidance help iirc
>>
>>101097056
>making games in Ada
>using geany as the editor
I kneel...
>>
>>101098605
well, asides from that
>>
what do you guys think of a software renderer in assembly to RP as a 90s Daggerfall programmer?
>>
>>101097499
i puked a little
>>
>>101099778
retrocoding for the sake of retrocoding is silly
modernize it so you can learn something actually useful
software renderer in assembly but targeting your GPU's ISA (or PTX if nvidia)
>>
>>101100112
nta but
>retrocoding for the sake of retrocoding is silly
>anyways, try coding your GPU for the sake of coding your GPU
lol
>>
>>101099778
if you will have fun, go for it
>>
>>101100157
one's more useful (and fun) in the long term since it's a different execution environment
i guess it could be good for initially learning ASM
alternatively going the other way and target something borderline embedded like a TI calculator would also be potentially useful
>>
>>101100302
I can build the initial software renderer in only ASM and then use PTX to make it a bit faster.
>>
haven't worked on my game for a week now
>>
What’s the hardest part of a game engine? Networking excluded
>>
I deeply regret not jumping on the UE train a long time ago to grab the weekly and monthly free assets. Do these come back for free or is it a one time thing
>>
>wm_input doesnt give you all the keys correctly
ffs
>some physical keys are literally just two keys in one
ffs
>>
>>101100455
architecture
>>
>>101100455
Starting it
>>
>>101100455
finishing it
>>
>>101100455
For me its not project hoping between all the different game ideas I have
>>
>>101100455
Not killing myself!
>>
>>101100455
Keeping that peskly orange man with the green hair from making bugs in my code!
>>
File: 1213262512064.jpg (488 KB, 1280x960)
488 KB
488 KB JPG
>create a base for something
>think about expandability when creating it
>need to add functionality to it
>turns out my base didnt'; account for that
>have to rewrite it
every fucking time. am i a brainlet? i don't understand, i feel like i think things through and then every time i need to expand on something, i get blocked.
>>
>>101103909
I think you reached a point where you have to learn about architecture, Im a backend shitter so I only know about scaling webapps, but I think games and game engines are far more difficult.
>>
I'm working on an idle game. Does that count ?
>>
>>101105036
Why wouldn't it?
>>
>>101103909
>am i a brainlet?
no, it's a struggle everyone goes through
>>
https://godbolt.org/z/4ETb5sn48
https://godbolt.org/z/88YnTMcqz
>>
But wait -- https://godbolt.org/z/49sqMvWbd
>c++'s vector class is actually (albeit 1 instruction faster) faster than c arrays when iterating
>>
File: death_diagram.png (24 KB, 1453x635)
24 KB
24 KB PNG
>>101105142
no graphics and web related.

I'm working on an idle game where you'll have to manage a tribe and go through all the prehistoric era.
I just did "a birth" and "a death" algorithm to get some "realistic" evolution of my population.
For birth, it's quite simple : I set a birth rate per woman and run on a population how much babies are born every month, with some randomness added.

For death, I made an algorithm that gives me how many % of the population should die every year for ages from 15 to 99 with pic related curb. Before that, I apply an infant mortality and randomly kill at birth to simplify.
What's cool is that I can change life expectancy and it's pretty accurate. Here it's set to 50, and result is 50.59
>>
>>101103909
Either you rewrite or you are in analysis paralysis, but still should think ahead.
>>
>>101103909
design from up to bottom, that's why triple A studios do, they always use an abstract custom draw commande buffer so they can switch rendering API depending on the platform, or have some hardware specific fix, they always add scripting abilities to their entities because that's the only way to account for future change, it might be slow, but when it gets important enough they just integrate it in native.
just be a bit flexible, you don't need to make a generic engine or cover every use case literally, you just need to be flexible enough, if you need to rewrite on every feature that's a big issue.
>>
>>101103909
Which programming language and API do you use ? And do you identify the reason why you're stuck ?
>>
What would a state machine for a multiphase boss be like?

Pic related is from a recent indie game called Indigo Park, specifically an arcade-like minigame called Rambley Rush. The boss of the minigame has multiple phases with different attacks.

https://youtu.be/8H8S0K_pVDA?t=1344

A YouTube dug around the game and found that the different attacks are separate actors that are swapped out as needed. One commenter said something like "when you can't bother to do a state machine"

Question is, would a state machine for this even be possible?

The game was made in UE5 if that matters?
>>
>>101103909
this is the problem with starting out with generic stuff
come up with a clear design, focused to what you're making, do it in as straightforward or dumb of a way as possible, and then refine later
>>
>>101103909
yeah architecting is hard
>>
>>101107606
In the context of Unreal, the proper way would be using the gameplay ability system (GAS) in which a boss is simply using different abilities for each phase. The AI behavior wouldn’t be difficult to change either. For complex bosses that radically change in appearance and function it probably would be easier to swap for a different actor although you could also swap the mesh and animation blueprint.

From what you showed and said it sounds like that dev took a very simplistic approach. They didn’t use GAS or anything fancy. The two boss phases can be merely looked at as two different enemies. When entering the second phase the old actor is deleted and the new one is spawned at the same location.

Overall to answer your question, yes. The dev just did it that way because it was an incredibly simple approach and there was no need to do it another way.
>>
euler angles? more like eule up angles
>>
Nothing visual to show off yet, but I got Odin+raylib working and have been messing around with that.
So far I really like Odin, very comfy language. Not sure about raylib though, might give SDL a try instead.
>>
>>101097499
how the absolute nigger FUCK do I get this to build on Arch

cmake spits this out: error: ‘AVCodecContext’ {aka ‘struct AVCodecContext’} has no member named ‘channels’
>>
https://x.com/ammaar/status/1804649903815115053

Its over, you can build a 3D fps shooter with AI
>>
>>101110186
>https://x.com/ammaar/status/1804649903815115053
How the fuck did an AI model give him sound effects?
>>
>Want to raymarch a 3d texure as a distance field ala that Dauglas guy
>compiler spits out that I cant access texures in a conditional loop
>cant break out of the loop early
Great, now what the fuck em I supposed to do ?

Can you disable the non uniform control flow limit in wglsl ?
>>
>>101110549
I'm assuming you have a non-uniform variable in the conditional of the loop. Instead, you can loop for a constant number of iterations and break the loop whenever the fragment has found an intersection.
>>
>>101096553
>But, and I say this having spent the past ~3 years and written over 100k lines of game-related code in it across the whole ecosystem of frameworks/engines and having made my own, many if not most of the problems don't go away if one isn't willing to constantly refactor their code and treat programming as a puzzle solving process, rather than just a tool to get things done.

>The most fundamental issue is that the borrow checker forces a refactor at the most inconvenient times. Rust users consider this to be a positive, because it makes them "write good code", but the more time I spend with the language the more I doubt how much of this is true. Good code is written by iterating on an idea and trying things out, and while the borrow checker can force more iterations, that does not mean that this is a desirable way to write code. I've often found that being unable to just move on for now and solve my problem and fix it later was what was truly hurting my ability to write good code.

>In other languages one can write code with "I can throw this away later" in mind, which I've found to be the most useful approach in terms of getting good code. An example being say that I'm implementing a player controller. I just want the player to move and do things, so that I can start building my level and enemies. I don't need a good controller, I just need it to do things. I can surely delete it and make a better one later. In Rust, sometimes just doing a thing is not possible, because the thing you might need to do is not available in the place where you're doing the thing, and you end up being made to refactor by the compiler, even if you know the code is mostly throwaway.
>>
>>101111318
Some Anons story I saved long ago...
> 2017, decided to download rust compiler, to try out using safe language instead of my c
> compiler installed, i google up rust hello world. immediate ::!{_-} symbol spam blinds me
> wtf, readability is key to safety, nevermind, copy paste that into my vim, see broken highlight
> okay fine, lets try to compile it, it's a simple hello world program, i can learn from that a lot
> 20 minutes later, i've read osamu dazai novel called currency, made a cup of tea, and alarm!
> hell, what now, i see that after 20+ minutes rustc finished compiling, but there was an error
> what error, i see only spam of symbols, dots, brackets, go to google for help, fixed it
> another 20+ minutes of compiling, took a shower, felt dirty for using such a language as rust
> come back, see that everything is fine, compilation done, i run ./hello, works, hell yes
> casually type 'ls -l', since i know that tcc gives smaller executables than gcc, and dear god
> 10 MiB executable size for hello world program, and i didn't even add debug symbols
> called my parents on the phone, said if i ever did anything wrong, they're confused
> start feeling bad for installing and using such a bullshit language, rm -rf immediately, back to c
>>
>>101111548
kek! Things have improved since 2017 though, but I'm afraid the spam has only intensified.
>>
>>101111656
Not even my story, but it's funny, found some old DVDs with my old C, Ada, SDL and Xlib projects, half of them scratched and corrupted.
Found on some of the working ones my old cringy code, various greentext stories, Cube related texts, desktop thread screenshots and many more crap I used to collect.
I'm working on my "language", high-level assembly language to be precise, since one token expands into one or several CPU instructions, image related.
I'll only do lower level stuff with it, not game-dev tho, I use C and Ada for that. Right now, I'm implementing if-else statement...
>>
>>101111890
>casually includes linux
>needs to specify the string length as if it was assembly
xolatile things
>>
Such a beautiful paradigm, but the plebeians always need blood.
>>
>>101092530
FUCK YOU
>>
>>101112527
composition is better
>>
>>101112561
i compose my classes by multiple inheritance
>>
Should I pass glm structs by reference?
>>
imgui vs nuklear?
>>
>>101112742
const ref yeah
>>
>>101112899
As far as features and support goes, imgui.
>>
Anyone got a guide for making a small game studio in terms of average cost and roles needed? Got a friend with cash for one with 20 people or so, however he doesn't want to run it or do anything except get money from it, so he asked me have to find people for all the roles and run the development side of things. Good thing is that it would be a Balkans based studio meaning the salaries would be ultra low compared to any american or euro studios.
>>
>>101113021
$100,000 per person per year
If you have no experience making games please don't try to run a project, you will fuck up and waste all that money
>>
>>101112742
no, pass by value and the compiler will love you
>>
>>101113021
From Balkan, I only know of Serbian and Croatian developers who made a name for themselves, CroTeam (Serious Sam guys) and Eipix (VN guys), but I also heard that Romania and Hungary, of all countries, has some decent programmers...
--
Cost depends on the scope, as with all cases, and in Serbia for example, you can pay a programmer 2000$ per month and he'll be happy, artist can be paid less. But if you want to make non-indie games, reconsider, that small team won't make next AAA title, focus on niche.
--
Good example would be the kind of people that cry about HoM&M3, Age of Empires, Age of Wonders, Quake, Doom, with same mechanics and better slight better but still retro graphics don't exist, you can focus on those.
>>
>>101113021
hire me if you want windows support
>>
>>101113084
I mean I said I was in the Balkans, so average pay here for example for programmers is around 20k dollars, and if you get juniors its 12k. In addition to that these aren't indian tier programmers, so for the cost of one developer from america you could get 5-10 here of the same quality or better. Either way I wouldnt do anything overly ambitious, just easy money makers like a roguelite.
>>
>>101113197
Sorry I didn't read the Balkans part
The first rule of game development is making games is really hard
There's no such thing as something simple to get you a quick return on investment. If you have no skills or experience the odds are majorly stacked against you
>>
>>101113133
Good advice and thats mostly what I was planning, in terms of keeping it small for the first game as a test run, however not really sure how to proceed with the stage of hiring people for the job, as most of the tech people I know work remotely for american companies so they have huge salaries. I guess I could look for people beyond the Balkans as well but then I'd probably need to find another richer investor to cover the cost and I'm not even sure how I'd find one.
>>
>guy who barely passed his physics classes in university makes a physics and collision engine (things that have been created 1000s of times already and he could just choose one of those, but decides not to because this is at least a straightforward and well defined task as opposed to actually making a game)
>>
>>101092530
ech, so i'm running into an issue with Vulkan. the renderer i'm working on is supposed to allow you access to any image within a shader, including the one being drawn to. well, it's not that you're SUPPOSED to be able to access the one that's drawn to, but rather the fact that you can is an artifact of the way you access the images. anyway, Vulkan doesn't like that. it would seem in modern Vulkan, some of the extended features allows you to create specialized pipelines, but i'm trying to avoid using extensions as much as i can, so...fuck. the only solution i can think of rn is that there'll be a separate image, reused across draw calls, that's drawn to and then copied to the appropriate image in the descriptor array. this renderer is pretty tiny, so no part of it is truly performance sensitive, but it sucks that every draw calls is gonna require this system
>>
>>101113529
is it really that hard to seperate your inputs from your outputs?
>>
>>101113549
it's not that it's hard, it's that it's complicating a system that i'd rather keep as simple as possible because vulkan is a clusterfuck.
>>
>>101113575
Keeping it simple as possible is having inputs and having outputs. You're making it more complicated
>>
>>101113594
the system itself is quite simple, it's vulkan that's being difficult. what i'm trying to do works fine on modern vulkan afaik, so i think these issues speak more to the limitations of the original design of vulkan, but i'm trying to stick to the latter because i can't reliably develop with modern vulkan atm
>>
>>101112727
>composition
>by inheritance
based retard
>>
>>101113639
Reading and writing from a texture in the same shader has never been something you could do reliably on any API. The simplest solution to this is to seperate your inputs from your outputs
>>
File: idtim.gif (1.47 MB, 498x278)
1.47 MB
1.47 MB GIF
>>101112727
>>
>>101113658
go back and reread my post, you aren't meant to read from/write to the same texture
>>
>>101113681
>allow you access to any image within a shader, including the one being drawn to
am i misunderstanding this
>>
File: output.webm (3.44 MB, 1280x757)
3.44 MB
3.44 MB WEBM
>>101113319
We do be checking intersections on concave polygons tho
>>
>>101113087
?
>>
>>101113701
based zigger
>>
>>101113712
passing by value gives the compiler much more room to optmize
>>
>>101113700
yes. it enables you to do it by virtue of how the system to access textures work, however it doesn't mean the user is meant to access it (and indeed it wouldn't make sense to access it). hence why i'm complaining about the limitations of vulkan, it's not that i want to be able to access the same texture that i'm writing to, but rather the system (which otherwise works fine) breaks down because of the fact that you could, theoretically, access the same texture you're writing to
>>
>>101113756
so make the system unable to access the texture you're writing to?
>>
>>101113769
yes thank you we are now on the same page
>>
File: 1717867178052824.jpg (29 KB, 600x556)
29 KB
29 KB JPG
>>101092530
Finally finished my first day on the road to being a game dev.
#include <stdio.h>

int main(int argc, char *argv[])
{
printf("OP is a faggot.\n");
return 0;
}

IGMI
>>
>>101113802
>didn't even make a rainbow triangle
Not GMI.
>>
>>101113821
>rainbow triangle
This is how far /g/ has fallen?
I'm disappoint.
>>
is it even possible to make a game using pure functional paradigm?
>>
>>101110266
Probably some web audio shits to manipulate firing and maybe some background music generated through another model like stability audio?
>>
File: 1573954364391.jpg (37 KB, 640x640)
37 KB
37 KB JPG
>>101113920
>I'm just going to write words here
>>
https://github.com/MrFrenik/gunslinger/
Is this a good framework to use if I wanna get a headstart with my game """from scratch""" but don't wanna use raylib?
>>
>>101113672
i know what im saying, trust me bro
>>
File: airlos.png (294 KB, 978x1237)
294 KB
294 KB PNG
>>101092530
Think this is enough provinces, I guess I could try break them even smaller pieces
>>
>>101113991
just use sokol
>>
>>101113991
reading the main header more --
>isn't too cucked to not say retarded
kinda based, though I haven't seen whether the api is actually good or not
According to the docs it's essentially sokol-ish
>>
does the location of tris in an index buffer matter?
Like do I have to connect these things in certain ways?
>>
>>101114269
>I guess I could try break them even smaller pieces
More isnt necessarily better, especially if you have any micromanagement for each tile
>>
>>101114314
no
>>
>>101113529
>but i'm trying to avoid using extensions as much as i can, so...fuck
this is extremely stupid and counter to how vulkan was designed and one of the reasons i hate they used the same language as opengl, it's not haha bloat it's this API targets heterogeneous systems so specification is restriction
the fucking memory model is optional for fuck's sake

feature and extension fragmentation is a lot less severe you might believe
it's safe to target a union of the desktop profile and the general roadmap profile

>>101113756
the system breaks down a lot easier than that, that's the whole point of vulkan, no safeties
you can cause a driver crash if you're not careful
>>
>>101114341
Well, you don't, every province has a steward.
>>
>>101114405
also i want to add they've been overly fucking cautious with making shit optional even when you consider shit like mobile tiling GPUs
check gpuinfo for availability information before assuming an "extension" is an actual extension and not something literally everything has and khronos artificially restricted access to out of paranoia
>>
>>101114405
i might have written my post poorly cuz i'm tired, the main reason i'm avoiding it right now is because the version of vulkan that i have is olde and i'm on linux on a machine that's on life support atm and i really really can't fuck around with installing new drivers right now, so i'm writing the lowest common denominator thing. i'm not really averse to using extensions otherwise (except that resources on how to use them plummet dramatically, i have very little experience graphics programming so diving in to things with nothing beyond vulkans documentation isn't something i have a lot of motivation for).
>>
>>101114314
The order is important for any kind of transparency because it controls the order of depth buffer writes
>>
>>101114580
>i'm not really averse to using extensions otherwise (except that resources on how to use them plummet dramatically, i have very little experience graphics programming so diving in to things with nothing beyond vulkans documentation isn't something i have a lot of motivation for).
now that is a legitimate criticism, a lack of documentation, and a lack of documentation for using extensions together as well
it's much better than it was though, docs.vulkan.org didn't used to exist and you had to just read the standard

you should still check gpuinfo for availability information though, you can do a fair amount of filtering on what devices you're checking for support, and you depending on how old of a version of vulkan it is there might still be a copy of the desktop profile json
>>
File: 54544.png (45 KB, 720x360)
45 KB
45 KB PNG
>>101114269
I struggle with characters, something I hate in CK-series is that every character more or less acts the same, the traits only mildly modify AI behavior.
I wish to make it a system that makes characters behave more extreme manner.
Every king has raison d'être such as:

>glory
Rulers who who want to die in glory, so they seek to conquer Ireland, even it means taking loans, never impregnating their wife, and leaving behind a bankrupt kingdom.
>legacy
Rulers who want to stabilize their kingdom, by constructing castles, and divorcing their wives if they don't produce heir. They will also try forming alliances with other kingdoms.
>hedonism
Rulers who want fuck around. They will waste all their gold on feasts, pick 100 mistresses, and let the nobles rule the kingdom in their stead.
>devotion
Ruler is devoted to handing all their money to the church and persecuting heretics.
>avarice
Ruler wants to collect a big pile of money

Of course, besides, raison d'être personality values such as boldness determine how they wish to about their goal.
Dunno, could be a boring system, but think anything is better than CK's.
>>
>>101114795
sounds like a good system
>>
Are you using rhe NIGGER+ License?
>>
>>101114866
>open source
lol no
>>
>>101092530
Today I decided to see whether I could try writing windows x64 assembly on a whim, but on doing so I encountered a problem I cant seem to wrap my head around.
The following is compiled through the VS2022 IDE, if that helps.
// main.cpp
constexpr size_t memory_size = 0xFFFF;
uint8_t memory[memory_size];

extern "C" void update(uint8_t *, size_t);

int main() {
printf("before: %d\n", memory[0]);
update(memory, memory_size);
printf("after: %d\n", memory[0]);
return 0;
}

; update.asm
.data
update proc
mov r8b, byte ptr [rcx] ; Segfaults while trying to execute this line
add r8b, 2
mov byte ptr [rcx], r8b
ret
update endp
end

To try my hand at diagnosing why this segfaulted, I tried inspecting the disassembly
// main.cpp
*memory += 2;

; disassembly.asm
mov eax,1
imul rax,rax,0
lea rcx,[memory (07FF70A6AC000h)]
movzx eax,byte ptr [rcx+rax]
add eax,2
mov ecx,1
imul rcx,rcx,0
lea rdx,[memory (07FF70A6AC000h)]
mov byte ptr [rdx+rcx],al

; simplified.asm
; Comments are my interpretation of what should be happening
; read byte
lea rcx, [memory]
movzx eax, byte ptr [rcx]

; add byte
add eax, 2

; write byte
lea rdx, [memory]
mov byte ptr [rdx], al

As far as I can tell, this is essentially my original code minus some extra loads and stores but I still dont get why my code segfaults.
>>
>>101114269
let the player decide
>>
Just curious if anyone has used a game engine to make something besides a game? I just realized Godot reminds me a lot of the rapid development IDEs that used to be popular like VB6 (rest in peace)
>>
>>101115356
yes, i've heard of a fair amount of people using it for cross platform GUI application development
couldn't point you to any specific examples though
>>
Is RPG Maker actually good? And which one?
>>
File: retardation.png (39 KB, 749x101)
39 KB
39 KB PNG
>>101114886
Dear clueless retarded me from one hour ago, you're missing a .code segment.
>>
>>101092530
Are you guys planning on making games for Temple OS?
>>
What are some considerations when developing a constant NPC companion (besides making sure they won't get in the player's way and ensuring they have SOME utility to the player, whether it's being able to unlock things or even able to fight alongside the player)
>>
>>101115813
If your game is incredibly narrative heavy then RPG maker can be a good choice. The only real problem with RPG maker is that it allows people to make games with little effort so there is a deluge of mediocre games all using the same default assets from there. But if you put love into it and your game fits their style then it’s a great engine.
>>
File: 1690859236953765.jpg (75 KB, 500x500)
75 KB
75 KB JPG
>>101116057
What kind of game are you making? I feel like the answer here will depend a lot on the context.
Though generally I feel like what makes npc companions annoying is the unpredictability of them, which can be mitigated by being able to give them at least some commands (use X ability, go to Y, hide, etc). And make sure the player never has to wait for them to pathfind their way to you, having them teleport close (but outside of camera view) when they get too far or the player approaches something that requires the companion seems the best way to avoid that.

And of course you can always rely on pic related to pave over an issues.
>>
>>101116057
Don't have them talk unless spoken too as well
>>
>>101116340
Thats a good point too. The random quips tend to get annoying. Better though would be have an option to set the frequency of it (obviously with 'never' being an option). I do feel like it would feel odd to have a companion follow you around without ever saying anything, like your being stalked or something.
That said, I doubt anyone here is making a game with voice acting in it, so its a mute point
>>
>>101116057
make them able to carry shit for you that's always useful
>>
>>101116403
Voice acting or no, text lines popping up all the time are also an annoyance and add nothing.
>>
>>101116300
The thought was inspired by some "mods" I found for Indigo Park and Poppy Playtime

https://www.youtube.com/watch?v=nduOXZcGcVQ
https://www.youtube.com/watch?v=3Tu3U-nSx58
https://www.youtube.com/watch?v=FS13fXOgRj8 (this one seems to have at least a bit more effort in it. It has voice acting!)

I'm not that into indie horror (or horror in general) but that hasn't stopped me from looking into those games. And seeing as how it seems to be a trend nowadays (IIRC Indigo Park was either the developer's first "serious" coding project or his first coding project ever. And it still took a year and a (admittedly small) team to get it out), I've half considered making such a game myself.

I'd imagine any chase sequence or anything involving narrow tunnels would require the companion to scriptedly go on ahead or stay behind

And yeah, I can KINDA see what you mean by it depending on the game. An FPS (think Alyx from Half-Life 2) probably has requirements that would be separate from, say, a third person game like Nier Automata or the examples above.

Still, they probably all have SOME things in common

>And make sure the player never has to wait for them to pathfind their way to you, having them teleport close
https://www.youtube.com/watch?v=13YlEPwOfmk
>>
>>101092530
>using godot c#
>no completion and editor pretty slow.
anyone actually know how to use neovim with this thing?
is there some kind of LSP i can install with mason?
>>
>>101110748
Yeah, its all fine and dandy if you can hardcore the distance field function in the shader. However when raymarching the function from a texture I have to break according to the value I get from a texture sample.

After a day of digging I found that you can disable the uniformity analysis by including

diagnostic(off, derivative_uniformity);

In the shader code. Took me a fucking while to googlefu it out of some github discussion about a chrome 113 issue breaking babylon js about a year ago

I guess those are the downsides of working with a brand new API
>>
>>101116340
>>101116403
Ehh, this could be an option, a slider even "nothin -> only important bits -> be annoying as possible". If companions dont interact with changing events dynamically, then its a dull playthrough.
>>
>>101092530
What if there were loot boxes, but you could open them for free?
>>
why does /gedg/ develop their own shit games that nobody is going to play? just contribute to open-source projects that are active and have a community already

https://gitlab.com/veloren/veloren

https://github.com/minetest/minetest_game

https://github.com/minetest/minetest
>>
>>101117828
You’re in the wrong general bud. We’re not making games. We’re making half baked game engines. /agdg/ is in /vg/
>>
Are there any parts of vulkan-tutorial.com that are bad/outdated?
>>
Gooooooooooood morning handsome sirs and buetiful madams. I am a gamedev Am I welcome here if I am not an enginedev?
>>
i want to make a couple shitty 3d first person games as jokes. i have like 4 or 5 ideas that i think are funny and i just want to see it made into reality.
do i just go with unity?
>>
>>101103909 here
thanks for all the replies anons.yeah i guess i panicked a bit, i come from webdev so it all feels very different to me, but i thought it through and i'll just read up more and keep applying what i know. if others can make games i feel like i should be able too, if only just
>>
>>101118275
They're updated a few parts of the API like dynamic rendering, schronization2, etc, but it's not like the old APIs are gone, and in dynamic renderings case, it's not a full replacement for the old API.
>>
>>101118275
yes, most of, if not all of it
vkguide.dev was updated to vulkan 1.3 and from a quick glance actually takes some more novel approaches now as well making some interesting recommendations like potentially using buffer device addresses in some interesting spots
>>
Man the Vulkan tutorial does a shit job at explaining queues. I’m going to have to look up a video or something for it.
>>
>>101120744
queues are what you submit commands to, and some queues can only submit a certain type of command so you have to find a queue that supports all the types of commands you're hoping to use
>>
>>101120744
Just find 1 graphics queue and only use that. Once you're actually more comfortable with the API, maybe you could go back and add a separate transfer queue (if it exists) or compute queue.
>>
>>101092530
I don't really understand why gdscript exists.
>>
>>101120909
>>101121105
Setting them up is a nuisance. One of the first things imma do when I finish the tutorial is find a more intuitive way to set them up.
>>
>>101120744
queues are kinda like the task dispatchers for a threadpool, a commandbuffer is the recorded list of tasks, they send it over the GPU, it actually takes some time to start up so this can also be used for things like hiding latency
queue families are groups of queues
there are some specialized queue families
the main graphics functions as the generic queue family
i believe most drivers also have one with just async compute and transfer which tends to have more queues and is meant for GPGPU, usually you'd set this one up more like a pool of threadpools
the transfer only queue family if you have it (RADV still doesn't, though it's being worked on) is meant to correspond to stuff like AMD's dedicated SDMA queues and is for uploading and downloading from GPU memory without affecting the rest of the GPU
no one really uses sparse binding afaik but if you've got a dedicated sparse binding queue it's meant to be for changing the backing of virtual textures iirc
the video encode/decode queues are the hardware encoder/decoder

some form of the queues actually exists at the hardware/firmware level though vulkan can't interact with them
AMD cards can actually interact with them in some capacity, they're exposed to OpenCL and HIP in a manner defined by the HSA standard and I think? ARM gpus might be able to as well
>>
>>101121387
The main thing as well is I believe queues have at least some form of implicit ordering in there, so putting a bunch of heavy compute shit on your graphics queue can possibly stall that. But doing compute on the graphics queue can still make sense, e.g. stuff that is going to be used for the current frame.

>>101121362
>nuisance
Just loop over the queue families, get the properties, and check if the desired bits are set.
Are you trying to create some kind of wrapper that is abstracting away the details and it doesn't fit nicely in that?
>>
>>101121387
I know some of those words
>>
>>101121494
>Are you trying to create some kind of wrapper that is abstracting away the details and it doesn't fit nicely in that?
No that section of the tutorial is just confusing with the amount of data abstractions and menial explanation. I know for a fact there must be a better way to do it.
>>
>>101117828
Yeah I'd much rather contribute to someone else's shit game that nobody is going to play
>>
Which would you rather see in a 2D sandbox RPG with mechanics and gameplay modeled after those from the 80s:
>NES RPG art style; every object and character is a 16x16 sprite/tile, or
>Card art style; everything is a card in the style of a TCG card. Every card art is generic and monochrome/manga-inspired
>>
>>101092530
What is g's opinion on turn-based vs action for an RPG?
I've enjoyed games with both types, though it seems to me that action is a lot hard to implement right
Very few games have managed to nail action (like Souls games), and certain powers would become really busted to the point of being unusuable, but in contrast it shouldn't be hard to make a challenging and balanced turn based system
On the other hand I remember very fondly of busted action powers like flying in Morrowind or superspeed in VTMB
It seems to me action is more immersive
On the other hands companions also suck in action
>>
>>101122107
NES art style, tile based, 16x16 for easy mode and 32x32 for hard mode.
>>101122254
I enjoy turn-based RPGs more since I can light a cig and play with 1 finger.
>>
File: IMG_4799.jpg (352 KB, 2597x766)
352 KB
352 KB JPG
Alright vulkan.gpu.org helped me visualize queues, a huge sigh of relief. I assume my application will be using queue family 0 since that’s the one that supports both present and GRAPHICS BIT. I know it’s a very very bad practice but hypothetically I could technically hardcode Vulkan to use family 0 instead of searching for a viable queue family right?

Can somebody give me a rundown of the scenarios each of the 5 queue families would be used for?

For reference my GPU is a 7800xt. I used the site before when checking for my GPUs ray recursion depth [spoiler]unfortunately 1 as opposed to nvidias 32 :([/spoiler]
>>
File: IMG_4800.jpg (379 KB, 2387x787)
379 KB
379 KB JPG
Here’s a 4070 super for comparison. AMD leaving out video encoding seems like a pretty big deal. The 4070 also has 16 times the queues as the 7800xt in family 0 but I’m not going to immediately assume that means it’s more powerful, merely that the architecture is different. Although what do I know.
>>
File: K6vd4stN7d.gif (1.09 MB, 1295x760)
1.09 MB
1.09 MB GIF
>>
>>101122463
>>101122587
simply selecting queue family 0 is valid for playing around with Vulkan, or for non-production code. but it's not going to be sufficient across different machines, over time. finding a queue really isn't hard, here's an example from my code written in C (note that it isn't meant to be production code, so this might not even be the best way to do it but afaik it's good enough). it's really not a complicated process to search for the queue.
>Can somebody give me a rundown of the scenarios each of the 5 queue families would be used for?
in vulkan, you record commands in a command buffer then submit the command buffer to a queue. a queue family represents the sorts of commands that can be submitted to that queue. so, graphics bit means submitting commands related to drawing, compute means submitting things related to compute shaders (i'm not sure what compute commands use as i haven't used them), and transfer refers to commands related to transferring data.
for instances, in the example for your graphics card, if i tried to submit a draw call to a queue with family 2, then it would presumably crash or fail in some way because it doesn't support drawing commands; however, it DOES support transferring, so if i had a command buffer with commands that ONLY send data, then that would be perfectly valid.
>The 4070 also has 16 times the queues as the 7800xt in family 0 but I’m not going to immediately assume that means it’s more powerful, merely that the architecture is different. Although what do I know.
keep in mind that one of the whole motivations for creating vulkan is decentralizing the process of sending data to the GPU, to help enable parallel processing of graphics programming at the CPU level. multiple queues means you can submit multiple things without having to wait for a queue to be free.
>>
>>101092530
Any thoughts on euler angles?
I'm watching a vid and he picks the yxz one, chatGPT tells me zyx is the most common in game dev, to me xyz seems the most intuitive
What should I pick?
>>
>>101122818
zyx
>>
>>101122818
roll then pitch then yaw is the most useful for a typical game about things on the ground
>>
>>101122463
to explain this more simply, >>101121387

0 is the generic family cause it's the present and graphics one
1 has lots of queues, compute support which means it's probably (and is) meant for async compute using the GPU for non-graphics tasks, GPGPU
2 transfer only == special VRAM upload/download
3 is actually the video encode queue you just don't have drivers that enable it yet for some reason (they are out for windows btw)
4 is the decode queue

i can tell you're on windows because you don't have a dedicated sparse binding queue as well, no one uses sparse binding, but i believe it's meant for changing the backing of virtual textures/megatextures if you're doing pop-in
video de/encode are their own separate thing
the protected bit is some mobile exclusive nonsense because they don't have real VRAM

on the nvidia GPU 0 is graphics, 1 is transfer, 2 is compute, 3 is decode, 4 is encode, and 5 is a secondary transfer i guess?
and you can't hardcode things like queue families, they differ between cards, drivers, and operating systems
right now for example on linux AMD cards require enabling a bunch of queues (transfer, encode, decode) and it also has a dedicated sparse binding queue
you rank them based on what they can do
the best one to pick for transfer is the one that only does transfer (ignoring sparse binding), the best one to do for compute is one that does compute and not graphics, then if you don't have a good queue family to pick for transfer you fall back to what you'd use for compute then the generic one, and if you don't have a good one for compute you'd pick graphics
most projects give each family a score and pick the highest to do this

>but I’m not going to immediately assume that means it’s more powerful, merely that the architecture is different
correct, queues are just the things that handle command processing
for the record, they don't actually recommend you even keep all of the queues in a queue family busy because they might not be real
>>
>>101122936
i'm nta but thanks for dropping this info, its insane how esoteric graphics programming is and how little resources there are for learning best practices. are there any books or articles you recommend for that is it some sort of fucked up graphics programming tradition to learn it all via trial by fire?
>>
Vulkan sounds like it was made for people who love bikeshedding
>>
>>101122994
>is it some sort of fucked up graphics programming tradition to learn it all via trial by fire?
pretty much
it's a niche field of programming
>>
>>101123009
i guess its the natural result of something both complicated and rare. at least its really rewarding to write a bunch of vulkan cryptic slop and then have it work
>>
>>101123029
Most fields of programming you have to learn by doing or talking to people who do, it's the same for making game engines
Web dev being extremely prolific has made people think programming is about following tutorials
>>
>>101122994
GPUOpen (the AMD blog), the khronos blog, the nvidia blog
this info in particular i believe i remember originally came from either from a conference like vulkanized or from GPUOpen,in particular that last bit about potentially causing slowdowns if you actually go and use all the queues (which should be safe on AMD hardware since all their GPUs tell vulkan they have that amount of queues and the modern ones actually have more hardware queues than that) but i would be wary of the NVIDIA stuff
but most sample projects do replicate it without explaining so you'd run into it anyways

and no i'm still learning best practices
like according to the new version vkguide.dev it's perfectly okay to use buffer device addresses (vulkan's version of GPU pointers in shaders) instead of descriptors for plenty of things without performance loss which I guess I could have figured out after reading how descriptors were implemented on the khronos blog about descriptor buffers (they're just pointers on most architectures)

although i'm at an advantage because i've also worked with ROCm and HIP (AMD CUDA) at a very low level (and learning that's even worse lol), I know my AMD GPU very well
and am on linux so the whole stack is also open source
>>
so atomic counters in shaders are a trap right?
>>
>>101123046
in my experience, having dabbled in a variety of arcane programming stuff, graphics programming is unique wrt how sparse information is alongside how complicated it is to do it well. things are usually one or the other, in my experience. the only other area i've come across that's similar is high-level compiler design and optimization techniques
>>
>>101092530
>can I develop games using python for coding? I mean I want to use unity or unreal or some other well-known engine but also want to use python as that is the language I know, is this possible?
>>
>>101123112
What you think arcane probably isn't that arcane, I mean there's lots of information about compilers out there
There's also a fair bit of information about graphics programming out there, but knowing how to practically apply it is something else because it's basically a minefield of things you shouldn't / can't do but you'd never know this unless you talked to people who actually shipped
>>
>>101123129
who are you quoting?
>>
>>101123183
no one fucking 4chan added the >
>>
>>101123129
You can use Python but it's shit because it's really slow, invest in your future and learn a new language, it's not that hard
>>
>>101122815
>>101122936
Thanks. I went from being confused and scared of queues to being pretty excited for them. But I know I won’t be using a second queue for a long time. That’s the beauty of consoles, they’re all the same exact hardware so it’s an optimization dream for developers.
>>
>>101123129
You can use any language you want to make games, but Python is slow.

Use C.
>>
>>101123129
For 2D yes. For 3D you have to bite the bullet and use a different language.
>>
>>101123138
extreme dunning kruger energy radiates from your posts. and i hate to bring note to it, but small dick energy as well. consider living a less niggerlicious existence
>>
>>101123225
Have you shipped a graphics engine?
>>
>>101123225
are atomic counters a trap though?
>>
>>101123104
maybe, maybe not
i have not seen many game shaders that use lockfree operations on the GPU, and apparently in vulkan opengl atomic counters just map to modern atomic ops
OpenCL, CUDA, and HIP code uses them fairly often and based on how they use them, you should generally try to minimize atomic operations through using subgroups' cross communication functions then an atomic on the result of that, and keep everything as granular as possible

AMD has dedicated memory and hardware for atomic integer counters in special shared memory at the local and global scope, disabled in the firmware at the global scope when using compute APIs for some reason, enabled for graphics like vulkan, unclear if ever actually used to map to shaders, but in theory atomic ops on shared memory should do the first and maybe atomic ops on groupshared memory does the second?
don't know about NVIDIA hardware
>>
The way I see optimization for graphics programming is there is no absolute best way, you just work with what you got. And if you’re in the “pretty good” category then you’re already doing it better than everybody else.
>>
File: hqdefault.jpg (11 KB, 480x360)
11 KB
11 KB JPG
>>101123240
have you shipped an argument?
>>
>>101123257
There is an absolute best way if you have one particular game and you're using one particular piece of hardware
If you ever read an article about extreme graphics optimization it's usually about a console game
>>
>>101123265
Have you?
Telling somebody something is complicated is kind of the opposite of DK, DK is claiming something is easier than it actually is
>>
>>101123240
Does anybody “ship” a graphics engine? Isn’t it just a bunch of self loathing gitbub repos called “(insert goofy noun) engine” that people bring to show and tell on Reddit?
>>
>>101123301
If you make one and it's in a released product then you've shipped a graphics engine
>>
>>101123306
So if I make my repo public, call it the “nill kiggers engine”, and post it on Reddit that counts?
>>
>>101123319
No, somebody has to use it to make a product that people actually use
>>
>>101123257
AMD does have a general optimization guide for their modern hardware https://gpuopen.com/learn/rdna-performance-guide/ and if you're using their FidelityFX shader headers it has helpers for stuff like optimal texture access patterns
and i think this is a similar thing for NVIDIA https://developer.nvidia.com/blog/advanced-api-performance-shaders/
following them is probably going to put you significantly better than pretty good
>>
>>101123333
oh they actually have a bunch of little articles
https://developer.nvidia.com/blog/tag/advanced-api-performance
i need to get over my anti-NVIDIA bias, their learning materials tend to be good at least
>>
>>101123284
you could have saved a lot of time by just typing "no", lmao
>>
>>101123387
I'm not seeing any arguments here
>>
Surely you’re using FIFO_RELAXED or are you a little fucking pussy?
>>
If “Culling primitives using a geometry shader or cull distances is expensive” then where else am I supposed to do it?
>>
>>101123506
Culling on the CPU is fine
Culling in a compute shader for GPU driven rendering is also fine
>>
>>101123506
use a compute shader or a mesh shader or do it on the CPU
geometry shaders only run well on intel iGPUs
>>
>>101123112
Is it really that cryptic?
They have even done a whole framework with everything implemented the best way possible
https://github.com/KhronosGroup/Vulkan-Samples/tree/main/framework/

Granted understanding it is really hard. I have found 3 whole tutorials on vulkan on the whole internet.
One is the official, the other is vkguide and the 3rd one is some youtube videos so I know what you mean by information is hard to come by.
I did the official tutorial and barely understood anything, doing the videos next and I will do vkguide last and I will probably do them a second time and then start coding by combining stuff from the tutorials and the official samples.
>>
>>101124210
The cryptic part is understanding the performance on the hardware after you've written the code
>>
FYI you can go into the Vulkan configurator and enable vendor specific validation layers (amd, nvidia, etc) to help get best practices
>>
>>101124210
essentially what >>101124238 says, the actual usage of Vulkan is actually quite straightforward once you understand the general design of Vulkan, it's designing a good Vulkan and performant renderer (and designing a good renderer generally) that's a bit of a mystery.
>>101124573
very sage advice, i did not know this, i will certainly look into it, thanks anon

i suspect a large part of the reason why this info is hard to come by is because of the proprietary nature of GPUs, and then on top of that things like Vulkan and other graphics APIs are highly abstract to account for the variety of GPU designs, whereas CPU designs have all largely converged. maybe this is a consequence of GPUs being relatively immature as a technology?
>>
>>101124775
at least one anon mentioned a large part of the problem being interesting info being hidden behind siggraph's paywall
i've never really checked shadow libraries like zlibrary or anna's archive for papers though
>i suspect a large part of the reason why this info is hard to come by is because of the proprietary nature of GPUs
AMD GPUs aren't proprietary unless you're going firmware level and technically NVIDIA is the same now although more is in firmware and ARM GPUs have been semi-reverse engineered
collabora does talk about their work on the latter two but unless i'm missing something big the rest of the freedesktop people, who would be the best people to write that kind of documentation, don't tend to talk though, and neither do most of the AMD people
>whereas CPU designs have all largely converged.
so have desktop GPUs, they aren't black boxes like they were in the silicon graphics era
it's a lot more visible if you're writing AMDGPU ASM or PTX (which is an IR, NVIDIA does actually have an assembly language called SASS but it's proprietary any you're not meant to use it) directly but right now AMD GPUs use a multithreaded SIMD architecture, with RDNA using SIMD32 vector threads which run in lockstep and enterprise CDNA GPUs and previous generations using SIMD64 while NVIDIA GPUs actually have truly divergent vector threads divided into sizes of 32
they've got fairly similar instructions available to them

mobile GPUs are a lot more varied I think but are more tile oriented

i think it might more be the games industry doesn't pay well enough to do graphics oriented research
there's actually a fair amount of papers on optimizing for research like ML, though it's not like you ever need to microoptimize large matrix multiplication to write games
>>
>>101125228
>i think it might more be the games industry doesn't pay well enough to do graphics oriented research
the games industry pays more attention to graphics oirented research than any other programming industry and most of the people in graphics research are from the gaming industry
>>
>>101125238
the problem is i think that that's still not enough, graphics research is being eaten by general compute and the way the games industry treats developers as expendable
the people funding cutting edge ML related research are paying considerably more than even high silicon valley salaries (i've heard cases of 500k starting) and the knowledge transfers
all i know is you only really hear stuff worth paying attention to out of AMD, NVIDIA, other hardware manufacturers, sometimes peeps out of id, EA actually has a fair amount of publicly available research which is not something you'd expect, and a few other people
it's either all behind paywalls or not being done anymore
and also goes completely unused
>>
>>101125301
Well if you mean graphics research as just using the GPU, AI is obviously hot right now
If you mean graphics research as in literally drawing graphics, that's all games industry adjacent. Up until a few years ago GPUs only existed to play video games so you can't say game developers are slacking, you just aren't privy to what they're doing
>>
>>101125342
yes and no, both
GPUs in general are trending more and more towards general compute under the hood and graphics techniques are changing to reflect that and developers suddenly have a lot more competition for jobs and that's causing brain drain
i will reiterate this is just a hunch, i have no evidence for this
>>
>>101125373
Your hunches don't mean a lot when you've never actually had a job and just recite technical manuals
>>
i bet you are a very fun and well liked person with a lot of friends who enjoy your presence
>>
>>101125615
sorry but people roleplaying as experts really grinds my gears
>>
so I used atomic counters to tightly pack a vertex buffer and I'm getting spaghetti meshes.

I guess atomic counters aren't really that reliable and I should just inflate the vertex buffer or pre scan.
>>
>>101115950
someone made a game engine for TempleOS
https://scumgames.neocities.org/cyberchud
>>
File: 1716394433552931.webm (1.94 MB, 854x474)
1.94 MB
1.94 MB WEBM
>>
https://blog.polybdenum.com/2024/06/24/hitting-the-wall-with-rust-s-borrow-checker.html
>>
>>101126444
Did you get that house with your game revenue?
Your cute wife is filming this, right?
>>
>>101126444
Is this AI?
>>
>>101126475
no
>>
>>101126455
>you need linear types, lifetimes, and borrow checking.
programmers really love making things more difficult for themselves these days
>>
File: yfk7xn.png (21 KB, 1146x654)
21 KB
21 KB PNG
New horror game coming
>>
>>101122818
just use quaternions and save yourself the headache
>>
>>101126558
Typicall you use both, eulers are translated to quaternions
>>
File: arcade-logo-128.png (8 KB, 128x128)
8 KB
8 KB PNG
https://api.arcade.academy/en/latest/

I just found out today a pygame library but better exists and yet no one ever talks about it
People really enjoy using inferior software eh
>>
>>101113529
so after some probing and experimenting, i've come to learn more about the specifics of the issue.
the problem isn't so much that you can't have an image that can be accessed both as a shader resource and also be the target of a render pass, but rather that there is contention between the layout of the image that cannot be resolved - the shader wants one format, and the render pass wants another, in other words. in the course of learning this, i've also learned that i could just have the images exist in a "general" layout, at the cost of potentially being very non-performant (it's not clear how much performance will be impacted).

although it would solve my problem to just make all of the image layouts be "general" (there will only ever be a maximum of about 256 draw calls, realistically way way less), i think it would be good practice to the system in my post.
>>
This is the library mindustry (java) uses for game stuff related https://github.com/Anuken/Arc among other things it employs a custom memory pool. I think overall this strategy is better than borrow checkers or managing all the memory by hand.
>>
>>101127007
that's an allocation strategy, it doesn't dictate how you manage the memory
>>
>>101122815
so i think im missing something, why would having multiple copy queues be good, shouldnt they already use the entire bus meaning they would just be sequential instead of concurrent?
>>
>>101127314
i'm not an expert in anything related to this so i can't give you a solid answer. when you submit a queue, you have to wait for that queue to be free before you can submit more work, so at least as far as an abstraction goes, multiple queues gives you a way to not have to wait on the processing of unrelated work going on in the queue. as a bonus, i would bet specialized queues might be more efficient if they can map to actual hardware features. it's really not so different from the idea of having multiple execution units in a CPU.
>>
File: queue.png (18 KB, 1580x1195)
18 KB
18 KB PNG
>>101127314
You wouldn't really bother with copy-operations on multiple queues.
In my vulkaninfo output, the top one is an AMD GPU, and the bottom is an Intel iGPU.

Ignoring "QUEUE_SPARSE_BINDING_BIT", if you see a "transfer only" queue, it usually means that it's more efficient, probably because of some dedicated hardware for that sort of thing.
So the "better" thing to do is to create 2 queues, one from queue family 0, and one from queue family 2. Graphics operations on the first, transfer options on the second.

You can't assume a queue like that exists though, like in my iGPU case. You've got the 1 queue that's going to handle everything.
But even then, on my AMD one, it's not "wrong" to just use 1 queue and treat it like it's the second case. The separate transfer queue is more of an optimisation, and you can bring it in later when you're more comfortable with the API.
>>
>>101127388
well for things that require work like graphics, compute, encode, and decode, i can see how multiple queues could be a game changer, the copy queue im more skeptical about, but that might be a lack of understanding on my part regarding it, but my initial thoughts are "shouldnt the copy queue already take the whole bus, forcing additional copy queues to be run sequentially by the driver?"
>>
>>101122994
artificial difficulty, it's not best practices it's just something a group of nerds arbitrarily decided and forced everybody else to use
>>
Has anyone worked with OpenGL in an SFML window? I've moved over some code from my previous project into my current project and now the depth buffer doesn't work anymore. The difference in the current project is that the draw calls are done on a separate thread.
glEnable(GL_DEPTH_TEST);
is called at the beginning of the rendering thread and
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
right after glClearColor.
>>
>>101127430
thats how im doing it at the moment, one direct, one compute, and one copy. ill have to eventually work on encode/decode and perhaps multiple queues way down the line
im not really being a good enginedev since im just "yolo use the highest feature level and fuck everyone else" so i cant even use my igpu to test things. its working backwards in a sense
>>
>>101127431
one easy way to imagine an advantage is that a driver might be able to take operations submitted in multiple transfer queues and then optimize some aspect of the transfer, like batching all of the transfer queues so that they're submitted at once, or perhaps copy operations can be compressed in a particular way when it's known there's no other kinds of operations, etc.
>>
>>101122818
yxz is nice because it's more intuitive to have Z set to default and default parameters go at the end. And if course you are going to have a bunch of nerds arguing that Z first theoretically makes more sense in the 0.001% of cases where you need it. Whatever.
>>
>>101127485
Did you actually set up your window to have a depth buffer?
I don't know SMFL's API, but in most other cases, it's not there by default unless you ask for it.
>>
>>101127499
The order the rotation applies actually matters so you shouldnt pick a particular order just because it looks nice
>>
>>101127493
that could maybe happen, but then you could flip that around and ask that if the driver is already going to spend time compressing and merging queues, why shouldnt you use just one and avoid that overhead when the result is in effect the same
this is just me speculating of course
>>
>>101127487
A separate compute queue is only really necessary if you're going to be doing some compute operations async from the graphics queue.
I think a common example of that is doing physics calculations in compute shaders.
>>
>>101127514
The depth buffer is allocated when the SFML window is created and enabled with glEnable. I don't know much beyond that either and I'm still very new to graphics programming.
There's also some fuckery going on with multithreading and SFML where you have to create the window in the main thread, disable it immediately, and then re-enable in the rendering thread.
I don't know if this is the reason, but it does add a lot more complications to what the problem could be.
>>
>>101127544
thats exactly it, atm its just particle systems and noise generation, but i aim to move more physical systems on to compute
>>
>>101127521
If Z is identity it doesn't matter which side it goes on so they only remaining metric is how intuitive the API is, and making the Z parameter optional wins. I get it though, you want to cover every possible use case even for things you don't need and even if it looks ugly, complicated and you need to explain to people that every time you call this function you have to put a meaningless 0.0 as the first parameter. Go ahead, I won't stop you.
>>
>>101127570
Moving simulation onto the GPU seems dumb because you're using GPU power you could be using to draw graphics on stuff the CPU could be doing better
>>
>>101127582
what the fuck are you talking about?
Z is usually roll, so it should go first
>>
>>101127589
its situational, some work loads are big enough that it could be better to run on the gpu, like stuff im going to move there in time are fluid, n body, perhaps cloth or other soft body sim too
>>
>>101127589
The GPU is far, far better at massively parallel calculations. "The CPU might be idle" is a stupid reason to not use compute shaders.
>>
>>101127641
Most physics calculations aren't massively parallel is what I was implying
>>
File: rollinrollinrollin.png (106 KB, 892x664)
106 KB
106 KB PNG
>>101127608
I am talking about use cases. Not your idealized toy engine. Besides Z isn't always roll.
>>
>>101127668
In real uses cases the order you apply the rotations matters, yaw before ptich will usually give you an undesirable result
But this is a moot point because it's trivial just to handle any Euler order, it's nice to have a sane default though
>>
>>101127684
A real use case is not needing Z at all so you put it last so that you can use the canonical form of the equation and leaving the Z parameter as default in the API. I didn't make this up, it's a real use case.
>>
>>101127700
the order the arguments are written are not the order in which they are applied
>>
>>101127568
Multithreaded OpenGL is a weird beast, and most libraries aren't doing you any favours in that regard.

People always go on about how it's "impossible" on Google/Stackoverflow or whatever, but it's definitely not.
Usually the thing you want to do is create a separate OpenGL context for each thread that's interacting with it, and "share" them: 3rd argument to https://registry.khronos.org/EGL/sdk/docs/man/html/eglCreateContext.xhtml , other APIs have their equivalents.
I don't know if SMFL gives you this level of control when it comes to context creation. It probably doesn't; most libraries don't.
>>
>>101127721
>Usually the thing you want to do is create a separate OpenGL context for each thread that's interacting with it, and "share" them
You never want to do this, trust me
>>
>>101127708
So your suggestion is to have the parameter order different than the order they are applied? Look, that's the worst suggestion I've ever heard, but that's besides the point. The point is that I am not talking about a preference. I am talking about things you will objectively come across in the wild that you should understand are not wrong, they are just not the way you would do it.
>>
>>101127730
I didn't personally write the code, but I project I worked on used a second context on a separate thread to do texture uploads, because it was stuck on some old GL version that wasn't capable of doing any of that shit asynchronously.
It seemed to work fine.
>>
>>101127737
Nobody writes a set of euler angles in the order of application instead of just XYZ form, jesus christ
>>
>>101127755
Now you're just making stuff up.
>>
>>101127770
What game engine or piece of 3D software does this
>>
>>101127746
You worked on a project that only used OpenGL 1 but still had access to multiple threads?
>>
>>101127780
Real ones.
>>101127746
That's still UB even if it works
>>
>>101127810
>Real ones.
So name one
>>
>>101127815
[REDACTED]
>>
>>101127815
No you are trying to bait so I won't fall for it, you've already demonstrated enough lack of knowledge that I don't have to prove anything to you. So you can take it or leave it until one day it bites you in the ass and you realize you were wrong.
>>
>>101127835
How am I trying to bait? You can objectively answer this question by just providing one example
I have never seen it before, but I could wrong
>>
>>101127797
OpenGL ES 2. It's a great lowest common denominator for stuff with simple requirements, without going crazy fucking old, but man, it's a pain in the ass sometimes.
There were textures being uploaded every frame (part of how the program works, not something that can be preloaded), and it was actually becoming a performance issue.

>>101127810
>That's still UB even if it works
You just need to throw in some EGLSync objects around.
>>
>>101127852
My argument is that there is a use case for a thing that exists. Your argument is, I haven't seen it so it doesn't exist. That's bait.
>>
>>101127909
My argument is that it doesn't exist in any popular 3D software and you're talking about "real world use cases"
Unreal, Unity and Godot all specify Eulers in XYZ order and apply them in a different order. So what the fuck are you talking about?
>>
>>101127918
Look, you're not going to put me to work to debook your bullshit.
>>
>>101127721
The developers of SFML have specified a use case for multithreading. It's not specifically about OpenGL but it is on the same tutorial page, so I'd imagine they did have something like what I'm doing in mind when they wrote that.
>>
>>101127935
You don't need to do any work. Because you've encountered it already, which is why you made this argument right? So just tell me in which software package are Euler angles specified this way. I can Google it myself. Because you're telling the truth and not just talking out your ass, this is an easy question
>>
>>101127944
Real one, I mean shit if you really want to learn and not just argue you will go look at the way a bunch of different ones do it and you might see they are not all the same. Or just stick to pretending to know how to use Unity or whatever, idc.
>>
no 32 bit skies/lights anones? iSad
>>
>>101127970
I did look. I Googled those three popular engines and that's how they do it, I've never used any of them. I use other software, which also specifies Eulers in XYZ order. So I ask again, what software does not do this? It's a very simple question, it has a one word answer, and you know this word already because you're definitely not making things up
>>
>>101127984
Stick with Unity then you don't need to worry about it
>>
>>101128037
I've literally never used Unity
>>
left handed vs right handed coordinate system. fight
>>
>>101128207
Seamlessly using both at the same time
>>
>oh hey gedg is more active than usual
>fags argue about meaningless things
every single time
>>
File: what does ai thinks.png (12 KB, 706x226)
12 KB
12 KB PNG
>>101129170
>>101128043
>>
>>101129213
Is this the best you can come up with
>>
>>101129213
xyz > any other permutation of x y and z
rgba > any other permutation of r g b and a
pitch yaw roll ... you get the idea
>>
File: girls_laughing.jpg (51 KB, 359x478)
51 KB
51 KB JPG
>they/them use euler angles
>>
>>101127314
so this is specific to AMD transfer queues and the underlying hardware system direct memory access queues that actually back them, but iirc
if you use the one of the compute queues for copying it
>uses a compute/graphics hardware queue
>potentially amounts to copying host memory mapped into the GPU address space from a shader
>get the full bandwidth of the bus
>clogs up the hardware queues meant for program execution and probably has other side affects like latency from kernel launching

if you use the transfer queue for copying it
>uses the SDMA hardware
>potential bandwidth caps
>maybe easy to saturate
>does not clog up other hardware queues or resources, doesn't even run GPU executable programs but interprets simple message packets sent from the host
>>
Aight lads, eternal question:
Pixel art (8-bit NES style), or Hand drawn (manga/comic monochrome style)?
>>
>>101129564
>>101129269
git gud and use bivectors
>>
>>101129719
im not well versed in the vendor specifics or what goes on under the apis, but the newer dma tech is pretty cool. afaik we will get gpu hardware for it eventually, that will be great
>>
>>101129839
geometric algebra chad in the house



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