« first day (2662 days earlier)   

9:59 AM
And 7k \o/
 
congrats!
 
10:31 AM
fuck all my lib files just disappeared for some reason
like how???
hmm so apparently my master branch doesn't have those.... really really weird
 
yep and Grandle stoped building cause some apache lib suddenly got duplicate conflicts today
must be international fucked up lib day
 
oh so because I added the lib files to git on another branch, and this doesn't have them, it deleted all those
git didn't care those until one branch had them and one didn't
now to decide whether I'll work on OpenGL stuff today or Christmas theme stuff...
I think I'll try get a bit of both done
 
10:57 AM
ugh I forgot that I did the comment removal cleaning on the opengl branch, and my master looks terrible
 
11:36 AM
 
11:53 AM
okay way less merge conflicts than I expected, props to git
 
 
1 hour later…
12:59 PM
Lol my question was number 39,999
 
where do you see that?
oh nvm
that's cool!
 
1:16 PM
also dude your avatar is a swastika?
 
me lol?
 
@Tyyppi_77 It's technically not a swastika
 
yeah you
 
hmm never noticed that lol
 
The rules about what counts as a swastika and what not are surprisingly strict
If you make it triangular instead of a square, then it's not a swastika
If you remove one "branch" without changing the shape, then it's not a swastika
What the hell....There are swastikas in unicode...
 
1:22 PM
lol
 
Swastika is a good luck symbol in India I think
 
it is not a nazi symbol?
 
http://卐.com/
wow SE chat can't parse characters like that in urls
(that's a SFW website)
 
I think it was adopted by nazis
not sure
 
how did you pop in here btw? an alert on the word "swastika"?
 
1:26 PM
lmao
 
i'm a relatively new user so just browsing :)
 
cool
 
nwp
disguise it as xn--zkr.com
 
Oh, BTW, Godwin's law
 
lol
 
1:27 PM
haha
 
Hmm God win
 
Since when can you put special characters in URLs?
 
Ohh, that's fun
 
So tyypi you used unity for your game?
 
1:31 PM
no
A custom framework built ontop of SDL2 in C++
 
game looks pretty cool man!!
 
thanks!
 
I've always had an interest in designing games, any suggestions on where to start?
 
Design or make?
 
this is embarrassing, what's the difference?
 
1:34 PM
Game designers sometime don't code, developers on the other hand do
Also, indie developers usually do everything from art to programming
 
design is the process of planning how features and mechanics work, and maybe tweaking those, while "making" actually makes those mechanics and features happen
 
Ok thank you, I have no clue which I want to be. I have reasonable handle on C++ but my art work is pretty awful.
 
oh gosh i hate art
 
My day job is research so ideally if i can gamify a problem that's hard to solve, that would be a win-win :)
 
yeah art was a tricky bit, I improved a lot by just drawing a lot of stuff, and looking at other people's art, combining different things from different sources
 
nwp
1:37 PM
@LastIronStar If you were to make a starcraft clone, would you rather make the engine that supports arbitrary models and stats or make sure that the units are balanced and fun to play with?
 
That's what I used to draw like
 
@nwp the second part!
 
This is what stardew valley used to look like
@LastIronStar Then designer
Try teaming up with a programmer and an artist and make a game
 
@Bálint Well that doesn't look bad, just not near as good as the final product
 
@Bálint reminds me of chrono trigger
 
1:39 PM
@Tyyppi_77 1:11
It's not bad, but it got a lot better
 
Well unpolished UI is a whole different thing, the environments IMO are okay
 
@Bálint Thanks. Do I come up with my game's plan and then approach people? what forums do people usually use for this?
 
I'm not sure, I'm technically a solo dev
 
oh ok
 
nwp
Approaching people is difficult. There is a lot of fear of wasting time and incompatible goals.
 
1:45 PM
I agree, I don't mind writing the game myself but i don't have the slightest clue as to how to go about this. just raw ambition at this point.
 
nwp
@LastIronStar There are some decent frameworks like gamemaker around that let you make games without having to worry much about the programming part.
The important part is not to get hung up on unimportant details and concentrate on the core features. I recommend watching this so you can get a clearer idea of what you want to achieve.
 
^
GDC is always an amazing source of game design knowledge
 
ok thank you
 
 
2 hours later…
3:29 PM
Ah, a new coder is going to learn the pain of networking and how quickly it gets complicated :D
Learning they gotta refactor everything to handle the backtrack and fast-forward part is the best.
 
I tried this, but I'm not too happy with the results
No huge time sinks in the compilation all though my compilations are pretty slow
largest times were like 0.2 seconds
 
On my end I just got a lot of small files and templates. Only really hurts when I modify a base template that's used everywhere.
Full engine and game rebuild: 2m19.466s
This is what the linker command looks like in the terminal :D
678 files, 285 .cpp, 393 .h
 
 
3 hours later…
6:31 PM
why is animation so hard? Why cant it be easy
 
what's the issue?
 
7:04 PM
I'm just complaining :D
 
 
1 hour later…
8:12 PM
Animator actually giving me the middle finger :D
 
I tried using a precompiled header: 2m19.290s from 2m19.466s
So either the precompiled header is not being used or that's not the bottleneck at all.
That's not even a random background-cron-job worth of a difference :P
So Threadripper or EPYC Opterons might be my only choice for faster builds now. At least that's what I'm gonna tell the wife :D
Kidding. I don't have to justify it :P
 
8:31 PM
I love Unity's documentation
The parameter for a method is called "grid" and is of type "GridLayout"
The documentation says:
Wouldn't have guessed that
 
concise :P
Yeah. I rarely document parameters when they're self-explanatory
 
The problem here is, that it isn't self-explanatory
After 3 days I still can't figure out how I need to use it
 
ah well, now that is a problem
 
For some reason, they give you a bound (an area between 2 3d vectors) when you need to do the preview
I thought "maybe it represents the area when the user uses boxfill", but it doesn't
It scales randomly, and only the center's useful
 
8:50 PM
Finally, circles
 
9:43 PM
So I have a question
My engine is forward rendering engine. In forward-rendered games, do they have one BIG main shader that does most rendering?
or should I switch around shaders as I try to render objects with different textures?
 
@BlueBug People usually have multiple, dynamically created shaders
But uber shaders do exist
 
I made a question
0
Q: One Giant Shader VS Many Small Shaders

Blue BugI am building forward rendering engine combined with atlas shadow map technique. My goal is to build an engine that is capable of rendering similar scenes from games such as.. Doom Overwatch So I wonder, do I need to write one giant shader that does all? or do I have many different shaders fo...

@Bálint what do you mean by "dynamically created shaders"? Are you saying shaders are created kinda like... on fly? As the engine is executed?
I want to like
ask the person whoever wrote the engine
"HOW DID YOU MAKE THIS ENGINE!!!"
 
@BlueBug Either generated on the fly or pre-generated
I'm pretty sure Overwatch has multiple shaders
I don't think they use the same one for Reaper's mostly metal gun and effects
 
@Bálint generate shader on the fly as you are playing the game?
arent all shaders pre-generated? How can you ever have a shader generated on the fly?
 
When the game starts up
Okay, let's look at an example
Threejs, because I can't think of anything else
You can create custom materials (shaders) by combining small parts
 
10:00 PM
@BlueBug I generate shaders on the fly as needed in my engine. I got a bunch of micro-shader definitions and a system that combines them and them builds the shader.
 
^
 
@BlueBug Kind of like Photoshop has layers: "Multiply", "Additive", etc. I have: Point Light, Directional, Ambient, diffuse texture layer, modulate texture, normal texture, bump texture, etc ... That can be added even multiple times to the same shader.
 
so by "fly" it means, there is bunch of small parts of the shader and you can "not write each shader" because your engine is capable of creating the shader you need before the game start by combining smaller parts, then compiling that new shader for you?
 
So I got a "material" container class to which, for example, I add multiple textures "diffuse, diffuse, normal, specular" and when I try to render this the engine builds a custom shader with all those layers in order.
If I want 3 layers of diffuse (eg: add blood splatters) I can just insert another one and the engine builds a new shader.
The same applies to "light" and "shadow" layers. it's another "material" layer applied to the object. Same with cameras.
 
It sounds something like ShaderLab where you don't ever need to write actual codes for the shader
 
10:06 PM
Yes
 
Well, I write code but they're tiny functions that do very little by its own.
 
That's the idea behind it
 
Is that correct? The only difference is that ShaderLab takes UI then convert it to shader code
But in this case, instead of UI you are working on "code" then program converts it to "shader code"
ok
I can't even begin to imagine how to build such a system tbh. Dang... :(
 
yeah. I don't have a UI system above that. I could, but it's just as fast for me to edit a text file...
It was over a month of work ...
 
I mean... doesn't it require coming up with systemic ways of structuring your shader codes and reading your own "shader instruction codes" then building "shader instruction codes" into "shader codes" then compiling the "shader codes" into "shader"?
 
10:08 PM
@BlueBug It's just concatenating pieces of shaders together
 
This sounsd like an insane amount of work.
 
Nah, it's just a bunch of function calls that get ordered.
 
I'd do it like this:
The main shell:
    #version 330 core

    in vec4 vertex;
    {INPUTS}

    out vec4 position;
    {OUTPUTS}

    void main(void) {
        {PARTS}
        return vertex;
    }
Then every part defines a list of lines it needs to put between inputs, outputs and "parts"
 
^^ I got a very similar system. the syntax is different but it's the same in principle
 
so like... these "keywards" in your file get replaced with bunch of codes?
 
10:12 PM
For instance a "basic position" component would put the matrix uniforms between inputs, nothing between outputs and a vertex = projection * view * model * vertex between the parts
Not replaced, the code shouldn't replace it, so there's place for the following parts to "connect" into the system
The code would become
    #version 330 core

    in vec4 vertex;
    uniform mat4 projection;
    uniform mat4 view;
    uniform mat4 model;
    {INPUTS}

    out vec4 position;
    {OUTPUTS}

    void main(void) {
        vertex = projection * view * model * vertex;
        {PARTS}
        return vertex;
    }
Then you remove the meta tags at the end and compile the shader
You could even make the meta tags comments, so you don't have to care about removing them
 
so each "component" does something. and "basic position" component assign the basic vertex transformation value to the variable "vertex"
 
Yes
 
I could come up with "scale vertex by some number" component or "add some number to vertex" component?
 
Yes, or even a billboard component
Then do the same with the fragment shader and the color instead of the vertex position
 
Then I guess the order of "component" in your shader instruction is important because based on the order it could either "scale then add some number to vertex" or "add some number then scale the whole thing".
 
10:21 PM
Yeah
 
oh man
This sounds so cool
but feels like LOTS of work
and easy to mass up
 
Nah, it's only a couple of classes
 
I struggle with 4 classes in college RIP
 
You'll only need to write 4 lines of code to create a diffuse shader though
E.g.
 
And you want to make a sophisticated 3D renderer?
 
10:23 PM
ShaderFactory.create()
    .addBasicPosition()
    .addDiffuse()
    .addSpecular()
    .compile();
 
While 4 classes are causing trouble???
 
@Tyyppi_77 I thoght Bálint meant like classes in school. Too much college school and now I am confused between "class" in school and "class" in programming. I know it sounds crazy but I actually thought he meant "You need to take couple college classes".
 
wat
odd thing to confuse but okay
"Dynamic shader creation 101 & 102"
 
There is no such class in my college. Nobody teaches how to build a graphic engine :(
 
o_o
 
10:26 PM
I'd be amazed if there was a separate course for dynamic shader creation, let alone two, as it's basically just a preprocessor
 
The English language strikes again!
 
We have a few 3D graphics courses available, but sadly they're in DX
 
@Bálint so when I call "addDiffuse" or "addSpecular" program will add components such as "diffuseColor" or "specularStrength" or "diffuseTexture" (if I use texture instead of a color as my diffuse) or "specularTexture"?
 
Yeah
 
So I guess the strength of this approach is that you could potentially create bunch of small operations that does fancy things and you could order them in such an order that it creates an effect?
 
10:32 PM
Yeah, it creates a layer of abstraction over the shaders
 
But I guess "cons" is that I will have hard time creating very specific effect such as this
 
And less copypaste between any shader code in general
 
Not any harder than without the abstraction
 
Oh, is this that game where you create custom powers by pressing different keys?
 
10:36 PM
@Bálint it is called Path Of Exile, Yes you can create your own skill/power by connecting stuff
 
Great
No, not that much different
You give it a texture, make it reflective, make it glow somehow
 
ok what if this particular effect does require types of code that's not used in any other shaders?
For an example edge detected material code
 
If you do it with a custom shader, then it'll require a whole shader, that's not used by anything else in the game
And dozens of custom shaders
 
@Bálint are you saying...in that special case I just need to either write a whole shader or I need to come up with a unique "component" that is used only once for that particular effect shader?
 
If it needs a unique component, then there's no problem with that, it's better than creating a whole custom shader
 
10:43 PM
ok clear
:O
ok I can do this. I will struggle but I can do this.
ty @Bálint @StephaneHockenhull I think is super cool and happy to know how to do this now... I am... probably gona need to spend a month I guess?
 
On this one thing?
 
yes
 
Probably a week if you get the hang of it
 
Depend how complicated/flexible you want it to be...
 
On top of my head I am still clueless how you would manage the buffer though
depending on the instructions the required data that need to be put on buffer for the shader is different?
do I just assume "the worst possible scenario" and put all the possibly required information inside the buffer?
like ex) .addBasicPosition().compile() will only need vert position and world view projection matrix inside buffer to transform "basic position"
.addBasicPosition().addSpecular().compile() will need basic position and world view projection matrix inside buffer to transform "basic position" then a float value that determines the specular strength inside a buffer?
 
10:56 PM
What buffer?
 
buffer inside my shader to hold all the "uniform variables"
 
I build the buffer according to the components parameters.
 
oh!
 
Each layer has a uniform "struct" definition
 
Ok. So my "shader class" on CPU knows the required "uniform variables" that shader on GPU will require to render properly.
 

« first day (2662 days earlier)