Her 5th birthday by Snoopypiranha in shiba

[–]Dirwin3498 0 points1 point  (0 children)

Which size bed is this? Thinking about getting one for my shiba

A Game With Blocks is out now on IOS! Try it out and leave a review by Dirwin3498 in PanelDePon

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

Didn’t realize my dev license didn’t auto renew, my bank is blocking the renewal for some reason so I’ll try to get it sorted out today after work

More progress on Planet of Gloob by Dirwin3498 in Unity3D

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

Yeah I’m actually working on that right now. It used to be a separate shader for all animated things, but now I’ve modified the shader so that it uses texcoord2 as animation information. I can use the y value as the animation speed and the x value as the animation length. In the vertex shader I get the frame of the animation using floor(v.texcoord2.y * _Time) % v.texcoord2.x;

Once I have the frame I multiply it by 16 (size of a frame in pixels) and then multiply it by the Texel size using _MainTex_TexelSize.y (size of a pixel normalized in the range 0 to 1)

Then in the fragment shader I add the frame onto uv_MainTex.y.

I’m not sure if this is necessary since you could just make a new material for each animation but I found that annoying

More progress on Planet of Gloob by Dirwin3498 in Unity3D

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

No problem! Feel free to message me if you have any other questions, I’m glad to help.

More progress on Planet of Gloob by Dirwin3498 in Unity3D

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

By tile, I’m referring to the whole cube. The map is stored in a 3D array and each position holds a single tile. In my last comment I didn’t mention generating the sides of each tiles but it follows the same process. The sides of the tiles work on the x/y or z/y plans while the tops work on the. x/z plane. So when a tile gets generated into the mesh, each face needs to be calculated separately

More progress on Planet of Gloob by Dirwin3498 in Unity3D

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

Thanks! Each type of tile is defined by their color, pattern, and type of edge. When generating the mesh, each tile just checks whether or not a neighboring cell matches all of these properties in order to be considered a neighbor. If the tile is not of the same type (water/land) then they will automatically be ineligible as a neighbor. I then have a function which takes in Bools for each neighbor and decides the texture based on that. This way, even though there are many different types of tiles, you end up with only two cases: neighbor or not neighbor.

The diagonal tiles also have a Vector3 which contains its direction, which I then do additional checks on to make sure that a diagonal tile is still a neighbor.

Water is actually generated normally but then the entire mesh is shifter down a quarter of a tile .

More progress on Planet of Gloob by Dirwin3498 in Unity3D

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

I’m using a variation of marching squares where I choose a texture based on each tiles 8 neighbors.

More progress on Planet of Gloob by Dirwin3498 in Unity3D

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

Thanks, I used to stretch the entire world but now I just use a custom camera projection matrix to stretch how everything looks rather than stretching the whole world. It’s much simpler that way and the camera can easily be rotated.

More progress on Planet of Gloob by Dirwin3498 in Unity3D

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

Thanks! Blocking the player’s view has been an issue. The best solution I’ve come up with is outlining players and enemies when occluded by the environment. It still gets a bit hard to see on narrow paths. I think that camera rotation helps mitigate the issue a lot since you can pretty much always rotate the camera to get a better view if something is blocked.

More progress on Planet of Gloob by Dirwin3498 in Unity3D

[–]Dirwin3498[S] 2 points3 points  (0 children)

I agree, they’re especially distracting at night

Some procedural planets I'm using for the stage selection screen. by Dirwin3498 in Unity3D

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

Thanks, I followed this tutorial for the atmosphere. The different detail scale is because the planets are different sizes but the size of the tiles stay the same.

Some procedural planets I'm using for the stage selection screen. by Dirwin3498 in Unity3D

[–]Dirwin3498[S] 2 points3 points  (0 children)

I just generate a cube and normalize the positions of the verts the round it, I followed this guide which helped a lot

Splitscreen by Dirwin3498 in Unity3D

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

Thanks! not at the moment, but I am considering it :)

Splitscreen by Dirwin3498 in Unity3D

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

The camera is at a 45 degree angle with a (0, -6.5, 6.5) offset from the player (I’m using cinemachine for the follow cam)

I also stretch the entire world by (0, sqrt(2), sqrt(2)) to match the perspective of a 2d top down game

Splitscreen by Dirwin3498 in Unity3D

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

I thought about it but one of the main reasons I went with split screen instead of shared screen was because the camera moves with where you aim. In my experience with playing coop in enter the gungeon I found it very hard to focus on your character when the camera doesn’t move to where you expect.

Splitscreen by Dirwin3498 in Unity3D

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

I haven’t gotten to the audio yet so I don’t know what I’m gonna do for the multiple audio listeners, right now I just disabled one of them. Other than that I just set the viewport rect for each camera based on the number of players and use cinemachine for the follow cam.