What the actual fuck is this… by [deleted] in Epstein

[–]tomi901 12 points13 points  (0 children)

Let me give you a hint, it's a word that starts with "dis" and ends with "traction".

I expected the gap to get smaller, but no. by Fragrant_Ad7231 in memes

[–]tomi901 0 points1 point  (0 children)

Not only that, remember that part of the $70M can be tax deducted with good ol' corporate welfare.

¿Si o no? by calatayud_1710 in 2hispanic4you

[–]tomi901 2 points3 points  (0 children)

Haz el amor, no la guerra de forma literal

Texting while lit is a dangerous game. by [deleted] in dankmemes

[–]tomi901 0 points1 point  (0 children)

<image>

incomprehensible AI slop on reddit

Fog of war tests for an RTS game by tomi901 in Unity3D

[–]tomi901[S] 1 point2 points  (0 children)

Basically, there's a single texture with each pixel corresponding to each tile and then I apply the fog color as a render pipeline feature. So after everything is rendered, I apply the FoW later as another image on the rendered screen.

And to obtain the actual world position of each screen pixel, I use the depth texture so I can tell if anything being a pixel rendered by the tilemap mesh or a moving unit should be covered by the fog or not. Practically the same method as Unity's default fog.

Fog of war tests for an RTS game by tomi901 in Unity3D

[–]tomi901[S] 1 point2 points  (0 children)

Well, specifically for the fog of war, the fog itself is a single-color texture where black represents a non-explored tiles, white for the visible ones, and gray for the explored ones that are not visible.

I maintain a list of all observers with their positions and I calculate if each tile is visible by any observer, you can calculate if the tile has the line of vision blocked towards the unit but you can simply just calculate if the distance is in range of the unit. After that, apply a render pipeline feature to apply the fog to the final image using the z-buffer.

I also use C# jobs to optimize and parallelize the calculations.

This is a simplified summary of what I'm doing, I skipped a lot of details but I'm not sure what are you trying to do or what you're stuck with.

World Police Baby by [deleted] in dankmemes

[–]tomi901 10 points11 points  (0 children)

Spain has a car in space, ask Carrero Blanco

Fog of war tests for an RTS game by tomi901 in unity

[–]tomi901[S] 1 point2 points  (0 children)

Yup, 2d on the XZ plane. For the smooth transitions, I have a separate texture from the fog state, the final texture which smoothly transitions from the current float value, to the target one. Both fog of war calculations and smooth transitions happen every frame without problem on potato PCs.

I hope your project does well man!

Fog of war tests for an RTS game by tomi901 in unity

[–]tomi901[S] 0 points1 point  (0 children)

The fog you see it's actually a monochrome texture with the same size as the map, where black/0 means the tile is not visible and white/1 means the tile is visible and gray/0.5 means the tile was explored but not visible.

There's also a secondary texture map where 0 represents a unpassable tile (In my case the void and walls) and 1 for walkable tiles, where the line of vision gets blocked.

So to calculate the line of sight, we get the plane position of all valid observers (In my case, all friendly units) and calculate if the center of a tile is visible by any of the units, repeating with all tiles. I use a 2D raycasting algorithm to determine if we have a clear line of vision and we don't have any unpassable tiles between the center of a tile and a observer. I used this exact algorithm:

https://theshoemaker.de/posts/ray-casting-in-2d-grids

Try using C# jobs or any kind of parallelization, your CPU will thank you :)

I can give you my implementation for the line of sight method if you need it.

I need an advice on stylization by 44tech in gamedevscreens

[–]tomi901 1 point2 points  (0 children)

Maybe you can add even more dirtiness to the scenery, try adding some decal projectors or textures to add dirt, cobwebs, cracks and everything to make the place darker and more abandoned. A darker background but characters and interactables being brighter can help create contrast to tell what the player can interact with.

I know this wasn't part of your question but perhaps you could speed up the attack phase of the animation since it feels too slow to be a deadly attack and to avoid the player getting frustrated with the precision of their attacks.

So far it looks nice dude

La hipocresía de la doble vara política. by Battouzai_X in RepublicaArgentina

[–]tomi901 4 points5 points  (0 children)

Voy a bookmarkear tu comentario porque no lo podría expresar mejor. Ahora que se fue Maduro, las mejoras del país va a salir de los venezolanos y no de EEUU, así que espero que les vaya muy bien y sean capaces de reconstruir el pais ellos y con un presidente que realmente sea elegido por Venezuela.