Rodrigo Soria

83 posts

Rodrigo Soria banner
Rodrigo Soria

Rodrigo Soria

@Hrodrick54

Indie game developer. I like cats Creator of Brickotori and Iconia Defenders: https://t.co/QTYjgWVqw1 Also making tools for game devs!

Canada Katılım Kasım 2023
50 Takip Edilen14 Takipçiler
Best Indie Games
Best Indie Games@clemmygames·
reply with a link to your game
English
234
33
190
24.5K
Best Indie Games
Best Indie Games@clemmygames·
Happy Monday! What are you working on this week?
English
54
20
88
8K
Rodrigo Soria
Rodrigo Soria@Hrodrick54·
One thing a lot of players asked was to see through the bricks when building. And here we are!🧐 The statement may seem simple, but it isn't an easy task. Oh boy, so many questions and problems to solve...🥲 Check them out and let me know your thoughts! #indiedev #gamedev #log
English
19
1
10
282
Rodrigo Soria
Rodrigo Soria@Hrodrick54·
Players can enable/disable this feature individually using a button for convenience. This will effectively "hide" the effect from such player only, so he will not see through the bricks, nor other players will see him. A bit hard to explain with words lol.
English
0
0
0
22
Rodrigo Soria
Rodrigo Soria@Hrodrick54·
This was a nice experiment! And even tho I am not a big fan of see-through effects, I do see the benefits. There are multiple ways of making it, but this is the way I found that "solves" all those questions. Specially the multiplayer related ones.
English
0
0
0
20
Rodrigo Soria
Rodrigo Soria@Hrodrick54·
It doesn't end there! Since my bricks are already using a shader, I needed to combine all of this with that shader. And because it was not a shaderGraph, everything needed to be done using shader code, particularly hlsl... Which I didn't know before lol.
English
0
0
0
19
Rodrigo Soria
Rodrigo Soria@Hrodrick54·
Both areas are calculated based on the size of the shape in screen space, not world space! And in relation to the camera's view angle. All pixels within the minimum and maximum area gets their alpha blended between 1 and 0.
English
0
0
0
20
Rodrigo Soria
Rodrigo Soria@Hrodrick54·
Lastly (or well, in-between), we need to consider the maximum area we will have for our see-through effect, which means at which distance we will start to hide bricks. As well we need to have a minimum area, which means at which distance the pixels will have 0 alpha.
English
0
0
0
13
Rodrigo Soria
Rodrigo Soria@Hrodrick54·
Then those translated coordinates are used together with the pixel's position being rendered and its distance from the player to determine how much should we "hide" its color (in other words, change it's alpha value).
English
0
0
0
14
Rodrigo Soria
Rodrigo Soria@Hrodrick54·
On the shader I did a bit of math magic to translate those world coordinates (position and size) to the screen coordinates (Now that I am thinking about it I might move that to C# 🤔)
English
0
0
0
14
Rodrigo Soria
Rodrigo Soria@Hrodrick54·
I Group those bricks by closest player, Filtering them by height (so, ignoring those below the player) And then, I update a bunch of variables on the bricks' shaders. Such as the closest player's position, and its size.
English
0
0
0
14
Rodrigo Soria
Rodrigo Soria@Hrodrick54·
but let's go to my experimental approach😁 For handling all this I'm using a combination of shader code and regular C#. Through C# and simple collision tests I get the bricks between the player and the camera.
English
0
0
0
16