r/Unity3D • • 30m ago Mindblown

Game After 6 years of working non stop with Unity, I am excited to announce that I am releasing my first game with my friends!

14 Upvotes

Technical summary:

The planet is divided into chunks with their own mesh and collider. It's a cube mapped on a sphere and basically it stores one height per vertex. When you destroy the terrain, only the modified chunk updates. The environment is an asset we have used before called Point Grass Renderer. (I know it looks awesome)

The complicated part of the digging was conserving the mass (in a kind of realistic way). So the solution my friend came up with was just saying that each vertex you lower gives you x kilograms and each vertex you raise uses x kilograms, and that x is computed once when the planet is generated. That's not explained very well because I make it seem like the same variable, I ll drop the code for the technical people out here:

float VertexArea(float pCubeX, float pCubeY, float pAngleStep, float pPlanetRadius, float pEdgeShare)
{
    float lCellSide = pPlanetRadius * pAngleStep;
    float lCentreCellArea = lCellSide * lCellSide;

    float lStretch = (1 + pCubeX * pCubeX) * (1 + pCubeY * pCubeY);

    float lSquash = Mathf.Pow(1 + pCubeX * pCubeX + pCubeY * pCubeY, 1.5f);

    return pEdgeShare * lCentreCellArea * lStretch / lSquash;
}

float lCubeX = Mathf.Tan((lColumn / (float)_gridSize * 2f - 1f) * Mathf.PI / 4f);

When you dig, the rock you get is the height you removed × the vertex's area × the rock's density. Cells near the edges of the cube end up about 30% smaller once projected onto the sphere, so without this correction, digging there would give you around 40% more rock than you actually removed.

Almost all vfx work with GPU instancing instead of the particle system, because when you have 8 players working at the same time and hundreds of robots paving as well we far exceed the limit of what's possible with the particle system. So for all the people having a problem with that, GPU instancing is your solution. (However if you are a new dev don't do it, it's too complicated in my opinion. You can opt for other solutions like just reducing the number of things that generate particles)

Multiplayer is done with Mirror, that works through steam. (FizzySteamworks)

The stupidest decision we made was having the planet be actually round 😢 💀 Never do that, or not unless you are ready to face the challenges that come with it:

1- Everything had to work like real gravity, so get pushed down towards the center of the planet and stay upright relatively to the ground underneath it. Let me tell you it was hell. The players kept going into orbit after getting hit with the vehicles 😂 (yes you guessed right, implementing knockback was another one of our stupid decisions). Conclusion we should have used a shader, but we didn't and I think on smaller planets it gives us a truly unique experience. I suggest that less experienced devs use a shader to "round" flat terrain.

2- The planet itself is an equi-angular cube-sphere, I am sorry that's the best way I can describe it. Basically, if you want to dig into a sphere you need a grid on it, and every way of putting a grid on a sphere distorts it somewhere. The way we did it is we projected a cube onto a sphere, but the grid points are spaced by equal angles (we used a tan() mapping). If we had used plain projection we would have had very uneven cells. So look into it if you want to project a grid onto a sphere, it's a cool way to do it.
The pavers were a separate problem, because you can't tile a sphere with squares. So we pave in rings around the planet's axis, 1.5 m wide, with round caps at the poles. Each ring is split into stretches, each ending in one column of pieces cut to size, and those columns start at a different spot on every ring so they never line up. We used AI to help write the algorithm that helped fix this problem.

3- The hubs were the hardest part. The planet is curved so the buildings have to adapt to the curvature, and the host picks the planet's size, so the curvature changes every time💀 We tried splines for the base and bezier curves to place key parts, SPOILER ALERT: it didn't work. What worked was modelling the hubs based on the smallest planets, and while the game was loading, every vertex was moved onto the real one, keeping its distance along the ground from the hub's center and its height above it. The final result means that everything is bent: collider, mesh, normals and tangents. We used AI to help write the algorithm that helped fix this problem.

4- For conveyor belts we did use bezier curves. Basically how it works is we calculate how it should be placed with a regular cubic bezier 3d then every point is pushed from the center of the planet towards the surface (so the radius) otherwise since the curvature of the planet is real, the conveyor belts would sink underground when placed.

We still have some optimization problems during the late game, because of the thousands and thousands of pavers placed and the robots working and the automation machines doing their thing. It is still a work in progress even though the release date is approaching very quickly. If anybody has optimization tips/secrets please do share.

I am curious about one thing though, how do you people implement volumetric lighting in unity ?
(since URP doesn't come with it, we made our own render pass feature but it's not the best in my opinion. If you have some tricks or article on how to obtain a good result please share)

About us:

We are students and friends in our 5th year of game design and development major, and we have been working with unity since the start of our journey. It has been an insane dev journey for us, and I don't think we would have gotten that far without this engine. It is the only engine so far that felt like a fun and productive environment to work in.(for all the people that tried Unreal and hated it you know what I mean).

If you want to check out the full game (and maybe give us a little wishlist 😄):
https://store.steampowered.com/app/5551820?utm_source=reddit


r/Unity3D • • 12h ago

Question Shoud I just ignore it?

Post image
89 Upvotes

This randomly poped-up in my editor. I wasn't even working, just had the editor running in the background.

I have no manager to contact, I haven't used Unity commercially for almost a decade, and even before that I was just a freelancer for indies and individuals with nothing more than a contract, NDA, and personal license. No company licensing or anything.

My account only has freebies from asset store, mostly from publisher of the week.

Should I worry about it? Should I reach up to the support, or is it just a mistake message that I can ignore?


r/Unity3D • • 3h ago

Question Cliffs and Caves Issue

Post image
6 Upvotes

Hi guys! I’m a beginner developer making a snowboarding game called Windbreak. I’ve been struggling to find tools in making structures like cliffs, ice caves and overhangs in Unity for my terrains. Yes I have used Digger which is very slow and clunky and basically doesn’t work for me due to the way it combines meshes and textures. I wish Unity would just make native Cliff and cave tools because I’m really struggling to make my level design more interesting without cliffs/caves, because of this I have gotten very creative with the engines terrain system but it won’t be enough for my vision. Does anyone have any solutions thinking outside the box? My last resort I can think of is making the caves themselves in blender but meshing them with Unity’s in engine terrain mesh will be a nightmare. Any input is appreciated since I am learning as I go!


r/Unity3D • • 17h ago

Show-Off I'm a fpv drone nerd who wanted a fun way to improve my skills, so I made this with Unity.

65 Upvotes

r/Unity3D • • 16h ago

Show-Off New autumn level in Unity 6.3 with custom car physics and camera

46 Upvotes

Hey everyone, back with another update!

As I mentioned in my previous posts, my friend and I are developing Stunt Paradise 2 in Unity 6.3 + URP.

I think we've finally got the car physics and camera working the way we want! We use a custom camera script with control points instead of Cinemachine, and our car physics is built using SphereColliders and Joints, since WheelCollider didn't quite fit our gameplay.

Right now, we're focusing mainly on level design and balancing. The video shows our new rocky autumn level!

Thanks for checking it out!


r/Unity3D • • 7h ago

Show-Off Added texturing and "Room" creation to PBJ, super quick now!

Thumbnail
youtu.be
8 Upvotes

r/Unity3D • • 11h ago

Question Should I lock my Steam release to DirectX 11 after hitting critical Vulkan crashes on startup/intro?

11 Upvotes

Hey everyone, I have a live game on Steam made in Unity 6 (URP) and I just caught a pretty nasty crash on Vulkan. On the very first launch, it actually made it to the main menu, but the moment I clicked a button, the game crashed. After that, every subsequent launch started freezing and crashing right during the intro sequence. I'm worried this is causing refunds on Steam.

When I checked the Player.log on my test laptop I saw Vulkan disables hardware-accelerated Media Foundation video decoding, and subsequent runs hang right around the intro video. Forcing DirectX fixes it completely.

For those of you with shipped games on Steam, did you lock your Windows builds to DX11, keep DX12 as well, or drop Vulkan altogether? Trying to figure out if going DX11-only is the safest move right now to stop avoidable

Tested system: 13th gen i7, RTX 5060 Laptop GPU
Unity Version: 6000.6.8f1


r/Unity3D • • 6h ago

Game Old games with new lives: AirTycoon 6, created via unity

Thumbnail
gallery
4 Upvotes

After 6 years of the original developers abandoning the project, Kallis studio picked the game back up and over the past 8 months and countless hours we present a brand new air tycoon, one to be remembered, and hopefully the airline simulator people turn to!


r/Unity3D • • 20h ago

Show-Off I made the main menu for my indie game! Here's how I built it step by step

53 Upvotes

I recently finished working on the main menu, so I thought I'd share a quick step-by-step look at how I built it in Unity!

What do you think of the final result? Any feedback or suggestions for improvement?


r/Unity3D • • 11h ago

Show-Off Helicopter combat prototype, wdyt?

8 Upvotes

r/Unity3D • • 1d ago

Show-Off My attempt at a VR cooking game with liquid + soft body physics

780 Upvotes

r/Unity3D • • 20h ago

Show-Off Hello there 👋

Post image
16 Upvotes

Ok, this is a silly feature but I still feel like it adds a lot of character to my game, Fred's Idle Garden. Now you can click on your character or NPCs and they will stop and wave at you. You can actually exploit this feature a bit with NPCs if they enter the shop with a demand that you currently can't fulfill, click the NPCs until your character delivers the crop :)


r/Unity3D • • 9h ago

Question Weird light leaking right where static meshes meet the terrain after baking (Unity 6 URP)

Thumbnail
gallery
2 Upvotes

While putting together a new map update for our Steam co-op zombie game (The Fallen Grid), I noticed a really ugly light bleed right where static objects intersect with the terrain after baking.

What's throwing me off is that this glowing line shifts and changes intensity as I move the camera around. I'm on Unity 6 (URP) and not sure if I'm missing something obvious with terrain lightmap UVs, normal bias, or probe bleeding from under the map.

Any ideas what I might be doing wrong here?

Unity Version: 6000.6.8f1


r/Unity3D • • 17h ago

Game Finally nailed the first-person steering animation

6 Upvotes

r/Unity3D • • 18h ago

Question collider problem with an empty

5 Upvotes

 In my Unity project, I want an empty GameObject—containing only a collider and named "attack"—to destroy an enemy (the red rectangle). I’m using a tag called "sword," but it doesn't work; however, when I do the exact same thing using the player object, it works fine. How can I fix this? Here is the line of code I’m using on the enemy script:
private void OnCollisionEnter(Collision other)
{
if (other.gameObject.CompareTag("Sword"))
{
Destroy(gameObject);
}
}


r/Unity3D • • 12h ago

Solved Having some trouble with my camera, there's this weird static and darkness over it. Not sure why it's happening or how to fix it

1 Upvotes
You can really see it on the bottom half of the screen, it follows the camera as it moves. Any help is appreciated

r/Unity3D • • 1d ago

Shader Magic I've been experimenting with a customisable ground fog shader (URP)

240 Upvotes

r/Unity3D • • 16h ago

Question How to create in-game borders?

2 Upvotes

I'm making a retro style game that I want to have a consistent screen ratio but also accommodate people who have different screen sizes.

I've seen other unity games that had customizable screen borders as a solution for this.

In the past I've played with the viewport rect of the camera in order to change its in game width, but I was never sure how to put the customized borders on there.

How does one implement that?


r/Unity3D • • 17h ago

Noob Question Question: How do I make this texture seamless?

1 Upvotes

The texture of these two wall objects are way different(although thery're the same texture), is there any way so it can be seamless?


r/Unity3D • • 1d ago

Show-Off Deflecting arrows with a sword (and how it works)

81 Upvotes

So we're making this physics-based roguelike and added some archer enemies. We quickly noticed they were VERY lethal to charge with a melee weapon.

So we thought that it'd be cool as hell to be able to block those arrows with your sword, so we made it a skill! The video doesn't even do it justice, you feel like a ninja in-game!

We were already thinking that the lvl 2 of this skill could be to deflect them back to the shooter, kind of like with lightsabers and stormtrooper lasers!

What other physics-based skills should we make? Our characters are fully physics-driven active ragdolls. :) P.S. The bow holding and aiming is fully physical as well.


r/Unity3D • • 2d ago

Official New Unity Editor Software Terms changes Nov 17 2026 prohibits more than 3 concurrent instances of the Unity Editor on computer

Post image
194 Upvotes

For the sake of clarity, you (or your Authorized User) may only use othe Unity Editor on one computerone instance at any given time per seat, with no more than three (3) concurrent instances of the Unity Editor on that computer, unless your Offering Identification permits more.

Full doc: https://unity.com/ru/legal/editor-terms-of-service/software


r/Unity3D • • 1d ago

Show-Off Awaken my child, and embrace the glory that is your birthright

91 Upvotes

Having fun with Unity and my favorite childhood game. I would love to see a Star Craft game with massive hordes and realistic sizes. Made with NavMesh2D Pro.


r/Unity3D • • 17h ago

Resources/Tutorial PurrFanity - Profanity Filter [Unity]

Thumbnail gallery
0 Upvotes