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

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

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


[Advertise on 4chan]


Freedom Fighters Edition

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

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

Previous: https://desuarchive.org/g/thread/107913536/#107913536
>>
Set up skeletal animations really quick for a game jam, then abandoned my idea and did something less impressive
>>
>>107976240
What graphics API are you using?
>>
File: Code_OjVyehYUdy.png (45 KB, 685x1031)
45 KB
45 KB PNG
>>107976527
DirectX 11, but I wrote my own framework around it to reduce boilerplate, but it's not an engine (you still have to implement the renderer yourself).

For example, in raw DX11 creating a very simple input layout for a vertex shader is like 50 lines of code, just initializing a struct (it's so long I can't even post it here. See picrel for a "standard" input layout)

In my framework, I assume things for certain built in semantics. Like if you add a position element, it's probably going to be DXGI_FORMAT_R32G32B32_FLOAT, so I built a builder class:

    InputLayoutBuilder builder;
auto inputLayout = builder
.addPosition()
.addNormal()
.addBlendWeight()
.addBlendIndices()
.addTexCoord()
.build();


Importantly, the framework provides access to all underlying DX11 types and ComPtrs, so you can decide how much involvement you want with my framework. If you literally want to do everything yourself except for the input layout, the
build()
method returns the raw input layout data used to initialize the vertex shader.

I have a bunch of other helpers too, such as initialized Textures, Cubemaps, CBuffers, Mesh data, etc.
>>
File: ion_storm.jpg (1.99 MB, 2749x2184)
1.99 MB
1.99 MB JPG
>>107976650
To give you an idea of how the framework creates textures, here's the 4 gbuffers for my deferred effect

    auto albedoRes = TextureBuilder()
.withTexture(TextureOptions{
.width = w,
.height = h,
.format = DXGI_FORMAT_R8G8B8A8_UNORM,
.miscFlags = 0
})
.withRTV()
.withSRV()
.build(device, context);
if (!isOk(albedoRes))
{
return error(albedoRes);
}

auto normalRes = TextureBuilder()
.withTexture(TextureOptions{
.width = w,
.height = h,
.format = DXGI_FORMAT_R8G8B8A8_UNORM,
.miscFlags = 0
})
.withRTV()
.withSRV()
.build(device, context);
if (!isOk(normalRes))
{
return error(normalRes);
}

auto positionRes = TextureBuilder()
.withTexture(TextureOptions{
.width = w,
.height = h,
.format = DXGI_FORMAT_R32G32B32A32_FLOAT,
.miscFlags = 0
})
.withRTV()
.withSRV()
.build(device, context);
if (!isOk(positionRes))
{
return error(positionRes);
}

auto depthRes = TextureBuilder()
.withTexture(TextureOptions {
.width = w,
.height = h,
.format = DXGI_FORMAT_R24G8_TYPELESS,
.miscFlags = 0
})
.withSRV({
.format = DXGI_FORMAT_R24_UNORM_X8_TYPELESS
})
.withDSV({
.format = DXGI_FORMAT_D24_UNORM_S8_UINT
})
.build(device, context);
>>
>>107976234
>Freedom Fighters Edition
What's Linux's future look like as a game development platform?
>>
>>107977316
Bikeshedding about your operating system is for brainlets, all you need is a text editor and a compiler
>>
>>107977398
>Bikeshedding
I haven't seen that term in a while. Just genuinely curious about it.
>>
File: file.png (49 KB, 184x184)
49 KB
49 KB PNG
>>107976906
>builder pattern
>>
1000 cubes and a grid of 2d tiles rendered at many fps..nice...progress is slow....but it is happening. lots of bookkeeping shit to do now.
>>
>>107978363
Gotta maximise lines of code.
>>
So did you guys see that new game Highguard and how it totally flopped on release? Any of you working as game devs in actual big companies? Is it true people dont give a fuck about the project only the paycheck? I find that hard to believe, I'd be extremely bummed if it was me
>>
>>107978610
No it's not really true most people care about what they're working on
>>
>>107978610
I'm sure most of the people want the game to do well, but at the end of the day they care more about getting paid.
>>
>>107978610
you'd be surprised how many ubisoft employees unironically believe that the ubisoft open world design is the pinnacle of gaming.
>>
>>107978610
It’s a trash game so I’m laffin. All that money, all those devs…and they made corporate generic sloppa
>>
>>107978610
I do and I don't care about the project, I solve programming problems for the paycheck. The project I care about is my game I work on in my spare time.

Thankfully I am a programmer not a designer, so caring about the project isn't anywhere near as important.
>>
>>107981874
>Thankfully I am a programmer not a designer, so caring about the project isn't anywhere near as important.

This is the mindset I had when I was a pipe welder. Not my fuckin circus but I will be compensated.
>>
so much fucking spaghetti code
>keep track of intermediate render target format
>keep track of msaa
>keep track of colorspace
>keep track of back buffer format
so much shit just to avoid intermediate targets if the msaa and back buffer targets are the same
>>
>>107978610
it really depends on the project. some of it you work on just for the paycheck and the dumpster fire it becomes, some of it you genuinely want to see succeed
>>
>>107978610
>>107981874
To expand on this: a lot of people think these games are soulless slop, but those people are almost never in management positions, nor talking directly with management. Management likes to promote the yes men, the guy who's at the office an hour before work starts and "loves his second family haha", the guy who has zero fucking clue about anything, let alone what the gaming audience thinks, but will suck the dick of the company even when they present the most bland grey slop of a game concept to him.

People who don't suck the dick of management, their retarded ideas, and the ever important investors/stock price are simply not going to end up in management positions. I could write a 50 page critique of the current game we work on and why it's shit, why the ideas are shit, why the design is shit, etc. and present it to management. Do you think they'd appreciate the feedback? No, I'd probably be fired, despite being right and the game being headed for a complete flop.
>>107982426
Exactly, since the job is not my life I am just here to get paid, the fact that I enjoy the work itself is a bonus. All the people I know who "love their job" and "have a burning passion for the company/project" don't have much going on outside of work, no productive projects or hobbies, etc.

For better or for worse I've never been one able to latch onto other people's creations and be passionate about them.
>>
>>107978363
You prefer 40 lines of initializing structs with boilerplate?
>>
>>107978363
What would an alternative pattern look like and how would it behave differently?
>>
>>107978363
>he hates builder patterns
Too bad, I did .build() on your MOM last night HAHA
>>
>>107983541
one could say you -> operatored her
>>
>>107983619
Oh you
>>
How do you guys handle AABBs? Mine are currently calculated from the mesh, but that means that if the mesh isn't loaded into memory somewhere, I can't access the AABB.
>>
>>107984053
just preprocess the mesh and spit it out into a metadata file
>>
>>107978610
Triple A doesn't make games they make money, it's a shame they don't make neither.
>>
>>107984796
Private equity makes money, that's all that matters.
>>
>>107985344
yeah making shit games that nobody buys is making everyone billions
>>
>>107984053
I keep shapes separate from their transforms. My AABB is calculated thusly:

XMVECTOR max = XMVectorReplicate(std::numeric_limits<f32>::lowest()),
min = XMVectorReplicate(std::numeric_limit<f32>::max());
for(auto pos : mesh.m_positions) {
max = XMVectorMax(pos, max);
min = XMVectorMin(pos, min);
}

return AABB(min, max);


This assumes that your mesh is centered roughly about the origin (0, 0). When I do physics queries later on, I pass the transformation matrix along with the AABB, so the AABB remains constant. I can also create AABBs with a half-space vector:

AABB aabb(extents);
>>
File: 1566373220700.png (38 KB, 657x527)
38 KB
38 KB PNG
At what point can I say I have a graphics engine as opposed to a framework that helps write programs that render things?
>>
>>107986108
whats the difference?
>>
>>107986132
thats what I'm trying to figure out, the directx anon seemed to make a distinction between having an engine and a framework here >>107976650
>>
I'm gonna make a simple C++ game framework to help me with any game jams I might partake in.
>>
>>107982947
>>107983127
at the most simple it would just making ctors that take arguments with valid combinations of arguments, if you prefer to have info of what that "true" means at the call site you can wrap the arguments in a struct and use aggregate init
function arguments and struct fields are static so you can guaranteed at compile time what gets passed to ctor or not, builder has to check what was set or not at runtime
use a wrapper template with no implicit ctor or an invalid default value to ensure every argument is passed
if you don't like constructor bloat on the final class you can just have one constructor that takes every possible thing in with no validation
then have a build/construct method on the argument structs that takes this as r-value reference and does the outside logic before making the final class
if you expect to build multiple times from the same set of arguments either overload that build with one taking a reference or if copying the params for each final class is expensive make an explicit clone method, or if it's only expensive for some of the arguments make a method returning a struct that references the original, and has it's own r-value build that constructs a new argument struct but you can pick and choose how each element is handled separately
>>
File: 1753324495148576.jpg (801 KB, 1920x1881)
801 KB
801 KB JPG
why is my vertex painted mesh so much darker in godot when using gl_compatibility renderer? it says it's an old gl 3.3 renderer but I don't see what would cause such a stark difference for simple vertex colors. They're both rendered with lighting off. It renderers fine with the other two renderers.
>>
File: 1742650243885787.png (219 KB, 1158x729)
219 KB
219 KB PNG
>>107986346
the two entrances in particular are engulfed in darkness,
>>
>>107986417
looks like it's a color correction/tone mapping issue, when I set color management to raw in blender instead of standard i get the same look. Wish it wasn't baked into godot's renderers. I hate tone mappers, it's never clear what you should use.
>>
should I read
https://vulkan-tutorial.com/
or
https://docs.vulkan.org/tutorial/latest/
>>
>>107976234
nodev here but out of curiosity why is OOP superior for game development than whatever C has?
>>
>>107986637
C is a plain procedural language, OOP is an abstraction ontop of procedural code that integrates common procedural design patterns into the language itself
>>
>>107986637
you can do OOP in C but you're going to manually implement the paradigm and end up with a tons of code compared to using an OOP language that abstract away the implementation. As for why OOP is better it's a matter of perspective but it scales really well.
>>
>>107986663
>>107986682
but are classes actually better? AI doesn't seem to think so.
https://chatgpt.com/share/69791de7-91fc-8003-b353-9a58335c514b
>>
>>107986728
>AI doesn't seem to think so.
jesus christ the next generation is so fucked
>>
File: 1715521034550509.jpg (71 KB, 647x594)
71 KB
71 KB JPG
>>107986728
>>
>>107986728
did you actually read what your "AI" even told you?
>>
>>107986796
It did manage to regurgitate a perfectly coherent, wrong opinion and claim it as fact
>>
>>107986796
yes it said oop is for retarded humans to understand the code
>>
>>107986728
you are cooked
>>
>>107986814
I wouldn't say it was down right wrong, but it's trained to always play middle ground as much as possible. Regardless it said nothing about "classes" in particular and. by his own admission op knows jack shit about game dev or programming and clearly can't understand a word chatgpt is spouting on the subject so I'm not sure what his end game even is.
>>
>>107986861
> it's trained to always play middle ground as much as possible
It's repeating ECS dogma
>>
i'm a programmer, i'm familiar with many software concepts, never done game loop but i understand how it works in theory

want to make a low poly 3d game with fixed camera, some vehicle physics and some networking

should i go with godot or something like sdl?
>>
>>107986891
if your objective is to make a game then go with godot. godot is a fully featured game engine designed to build games. SDL is a very basic framework with nothing game specific and doesn't even do any 3D by itself.
>>
Just laid down some groundwork for a new NPC system. I was thinking about how I could give them actual goals, and have all of their other behavior stem from wanting to complete those goals. I'd get basically infinite emergent complexity without stupid LLM wrappers.

I had the idea to describe all behaviors as a simple "action" class. Each action has multiple requirements that need to be met ("requirement" class), and each unmet requirement generates a new action. There are also branching actions, for example "acquire" branches into "pick up", "harvest", "craft" etc.

Currently all NPCs have an inexplicable urge to get as many swords as possible.

I wrote it in poopooscript for the ease of debugging and visualizing, and because my idea mapped really well to OOP. I plan on rewriting it later in a language with a higher tranny/jeet ratio, and maybe even putting it in a first person RPG like Skyrim, but that will come way later down the line.

My favorite part is how, when resources start running dry, they just decide to start killing eachother and stealing as much as possible.
>>
>>107986941
i have two objectives, one is to make a game and the other is to implement certain things (like some vehicle physics and controls) in an unconventional way
i know i'm tehnically capable of creating my own engine for what this game is supposed to be, i'm just wondering if godot can take away most of that work for me without limiting me too much

learning what someone else coded can be way harder than coding it yourself, that's why i'm wondering, i don't want to reinvent the wheel, but i also don't want to learn a gigantic codebase just to use a fraction of it
>>
>>107987147
> i'm just wondering if godot can take away most of that work for me without limiting me too much
it does way more than that, there is a ridiculous amount of work, both low and higher level involved in game development before actually doing any kind of game logic, and godot do that for you. I'm far from an export with godot but i'd be surprised if you couldn't relatively easily implement your own physics system if you're not happy with the stock one.

> i don't want to reinvent the wheel, but i also don't want to learn a gigantic codebase just to use a fraction of it
game engines don't really have a "gigantic" code base as far as the game API itself is concerned and they're always more or less compartmentalized so you're not gonna get lost.
>>
File: a9c2bf7afb47353f.png (39 KB, 987x214)
39 KB
39 KB PNG
Serious question btw. Should I partake in gamejams?
Planning to build a custom engine in C++20 and use it for at least one of these three jams
If I'm doing something wrong, feel free to yell at me or something
>>
>>107987253
ok, good info, it's appreciated
>>
>>107987273
Why not?
>>
>>107987291
Just wanna know whether game jams are no longer "in". If they are still useful for gamedev, then great, better late than never for me to do my first jam
>>
>>107987314
useful for what? what do you think a gamejam is and what are you expecting from them?
>>
>>107987322
I view a gamejam as a potential source of practice. A way to get my feet wet in the industry and the game development process and also network with potential future team members.
In RPG terms, gamejams could be seen as the "sidequests" that make you gain XP so you can be high level enough to take on the "main quest" (aka dream game)
>>
>>107987347
You can make games without joining a game jam so I don't know why anyone bothers
>>
>>107987347
you sound like a colossal fag so I guess game jams are right up your alley
>>
>>107987382
Nope, not a fag, I jerk off to anime girls getting assraped from time to time
>>
>>107987405 (me)
Ok, not assraped, I was being hyperbolic. More like consensual (incestuous) sex
>>
>>107987145
What's this written in and how are you handling these actions? I have a similar system in something I'm working on so it'd be nice to see other implementations of it's nature
>>
>>107987364
Yeah but jams seem useful since they give me constraints and themes to work off of
>>
I have no ideas
>>
>>107978610
People who matter don't give a fuck about the product, in any industry. This is by construction. If you give a fuck you will be marked as a threat, terminated and blacklisted before you can end up in a position where the amount of fucks you give is relevant.
>>
Is making a game with several mechanics, story, characters, and dialogue system hard?
>>
>>107989279
embarassing /v/-tier post

>>107989295
yes
>>
>>107989459
where would you start?
>>
>>107989518
Probably by making a smaller game
>>
>>107989625
how do you make a smaller game if you have zero experience making a game and only know some basics in coding.
>>
>>107989638
try make a simple platformer or something
>>
File: shadowsFogUpdate.webm (1.14 MB, 854x480)
1.14 MB
1.14 MB WEBM
added noise onto the attenuation/shadows from point + spot lights. its more subtle but I think it looks nice, I still need to fix the banding for the light
then fixed a problem I had with the volume fog "splitting" when an object is blocking the light, its more smooth now and doesnt flicker when the fog is hitting something on a weird angle
>>
File: 4515645998.png (61 KB, 624x851)
61 KB
61 KB PNG
>>107986346
>>107986417
This is most likely due to Blender's "color management" bullshit. Sadly, I've never managed to turn it completely off. It never looks quite like it does in-engine.
>>
>>107989986
yeah I found out you need to set it View to "Raw" in blender's color management settings, which must be the equivalent to off then you get the same look as the gl_compatibility renderer. but if you use mobile or forward+ renderer in godot you need to leave it at least on standard to match the look.
>>
>>107991952
also my main grip with setting it to Raw is textures are really dark so I guess tone mapping is off and there is no longer any gamma correction done on textures however they still display correctly in godot with the same tone mapping. You can circumvent this by going into the texture node in blender and set Color Space to Working Space but I have no idea what the implications are.

All around it would really be helpful if gl_compatibility had the same tone mapper as the other renderers, which I don't get why it doesn't.
>>
>>107992077
also what irks me is if for whatever reasons I decided to upgrade to mobile or forward+ my vertex colors will be completely off.
>>
File: 1745876179635012.jpg (1.21 MB, 1920x2743)
1.21 MB
1.21 MB JPG
It's fixed! Turns out it just a simple sRGB correction issue so all I had to do was to pass my color input node to the linear to sRGB node to get GL_Compatibility to render my vertex color same as Mobile and Foward+.
>>
how did you guys learn godot? I find it really hard to wrap my head around all this node bullshit. Why isn't there a engine that lets me do everything in code and uses a config file for the editor part?
>>
>>107992844
nothing stops you from doing everything in code but that's like saying you can't warp your head around 3D modeling and want to write vertex coordinates in a file.



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