r/Unity3D

▲ 37 r/Unity3D

I spent 4.5 years making a modern take on Super Cars 2 in Unity - the demo is finally out

Hey all!

After 4.5 years as a solo developer I am finally releasing the demo of my Unity game. It is called Blastlane Racers and is a top-down arcade combat racing game.

I wanted to create a modern take on Super Cars 2, one of my absolute favorite games from my childhood.

When I started I had programming experience but zero experience with Blender or 3D game development. I ended up learning a lot along the way. Looking back, it's crazy how much of what you see in the game now I had absolutely no idea how to do when I started.

The full game is basically finished - just a little bit of polishing before the release on November 2nd. And I do also take part at the Steam Next Fest in October🎉 Therefore I built a free demo containing:

  • 6 tracks across all three environments
  • 4 playable cars
  • all weapons and upgrades
  • a 6-race championship with the upgrade/shop system
  • single races and time trials
  • local split-screen for up to 4 players
  • global leaderboards
  • achievements and unlockable gold paint jobs

I have attached a video showing the race → earn credits → upgrade → next race gameplay loop (with only one lap per race to keep the video short).

I am interested in feedback on the driving/combat readability and the overall presentation. After staring at the same game for several years, it's getting increasingly difficult to judge those things myself.

The demo is on Steam if anyone wants to try it.

Thanks for reading, and I am looking forward to any feedback you have!

u/raphaeldumont — 7 hours ago
▲ 48 r/Unity3D

SUCCESS!!! Implemented ragdoll for the first time.

How does the game look so far? Imma shared itch.io links soon...

u/xginteractive — 12 hours ago
▲ 15 r/Unity3D

I made a Warcraft 3-inspired Terrain Editor for Unity and decided to release it as Open Source

Hey everyone,

A while back I posted here about my Unity terrain editor project, inspired by Warcraft 3’s World Editor.

It’s been fully functional for a bit now, and my initial plan was to try and make some money off it sincefinances have been pretty rough lately. But after giving it some thought, I decided to open-source the project instead.

Why open source?

I’ve tried making small projects to earn a bit of cash before, and it never really worked out. It takes a lot of promotion to reach an audience, and you have to convince people that the product is actually worth their money. Honestly, it’s a whole process I don’t know how to do and don't really want to do. If I tried going down that route, the project would just end up abandoned.

Most importantly: I built this for personal use. Working on it completely alone means it’s always going to be capped by my own limits. By going open source, I’m hoping other people can contribute and collaborate so it can grow into a genuinely useful, reliable tool.

That’s pretty much it. At the bottom of the GitHub page, there are a few donation links. If anyone feels like supporting and thinks it’s worth it, I’d really appreciate it.

I hope those who can will contribute to the repository with improvements, and that anyone who finds it useful can leverage it for their own games!

https://github.com/MooLucio/TileTerrain

Feel free to ask anything on comments.

u/MooLucio — 6 hours ago
▲ 126 r/Unity3D

Unity’s ECS physics was too slow and general for thousands of agents on a deformable terrain with water sim. So I was crazy enough to write my own raycast and simple-shape physics so explosions could permanently deform the terrain and pathfinding in realtime.

u/Ordinary_Games — 17 hours ago
▲ 70 r/Unity3D+1 crossposts

I've been playing with Unity's Lighting Shader Template to make a stylized environment - how does it look?

u/DigiJarc — 16 hours ago
▲ 3.5k r/Unity3D+13 crossposts

I’m working on a meadow for my analog horror game.

u/vladkudas — 1 day ago
▲ 747 r/Unity3D+1 crossposts

Entities Avoidance

Hello everyone
For context watch the previous videos about entities forming bodies and transitions, here i added avoidance for the entities, so that when something is passing thro they automatically avoid the body and then return to their current position
Will use it in upcoming videos as an evasion
Let me know what you think
#unity #ecs

u/OmarItani10 — 1 day ago
▲ 86 r/Unity3D+2 crossposts

A new organizing game is coming out next week! 🧸🧹 (Not Slop, No AI)

You might have seen a few 'tidy up' games recently due to 'Librarian: Tidy Up the Arcane Library!' and we're here for it with our take on this genre!

Too Many Toys! takes place at a big toy store with 5,599 toys to sort out. There is different sections for plushies, toy cars, skateboards, board games and some more that you need to get familiar with to put the toys in the right place.

Our game has some features you haven't seen before like robots that help you organize this mess, or a train you can ride around the store with more toys to carry over across. There is quite a few abilities to unlock as you progress and speed up the process of cleaning up the store.

No time limit, no different modes, no co-op, no ai, no slop. Just some chill time following in the footsteps of the game everyone fell in love with, providing you a similar experience.

We also have a cute cat that sits at front desk (Yes, you can absolutely pet the cat! ❤🐈🖐)

Help us out and give it a wishlist, and we hope to see you on launch!
https://store.steampowered.com/app/5028390/Too_Many_Toys/

u/Inceas — 1 day ago
▲ 98 r/Unity3D+2 crossposts

Разом з товаришем роблю Stunt Paradise 2 (перегони, платформер) - сьогодні запустили плейтест і новий трейлер до Ukrainian Games Festival

u/N0lex — 1 day ago
▲ 59 r/Unity3D

WIP of our new customization system we did for our driving game.

We’ve been working on a new customization system, and this is how it’s looking so far.

There’s still more we want to add and polish, but we’d love to know what you think of it so far!

Is there anything that particularly caught your attention, or something that isn't quite fitting in?

u/Driving_Rogue — 1 day ago
▲ 38 r/Unity3D+5 crossposts

We’re a small team of friends who make trailers & video content for indie games, and we just launched our new website!

Hey everyone! 👋

I’m Brad, founder and creative director of ByCherryMedia.

We’re a small creative team specialising in trailers, gameplay editing, devlogs, social content and other video/creative work for games. We’ve just finished rebuilding our website, so I wanted to share it here and introduce ourselves properly.

We’re a small group of friends who have known each other for a long time. We originally met online playing Call of Duty: Ghosts back in 2014. Over the years we all went in different directions, built different careers and picked up different skills. But gaming was something that always kept us connected. Eventually we thought, why not put our skills together and build something around gaming? And that’s basically how ByCherryMedia happened.

Today we’re a small team covering video editing, game capture, motion graphics, music, sound, and localisation. I’m personally responsible for most of the creative/video side of things, with the rest of the team helping across the different areas.

We’ve had the opportunity to work and build relationships with some really amazing game developers from all over the world this last year:

VaultBreakers Map Overview (now unlisted)
VaultBreakers Playtest Showcase (we’ve helped amass over 1 million views for VaultBreakers on YouTube!)
Slumber Realm Trailer
Swimpossible! Launch Trailer
Relooted Demo Trailer

And our new website is finally LIVE - bycherrymedia.com

We’ve tried to make the process as transparent as possible, particularly around pricing. One of the things we’ve added is a pricing estimator, where you can select the type of work you’re looking for and build up an estimate based on the scope and requirements of your project. So rather than having to contact us just to ask how much a trailer or social edit would be, you can get an estimate yourself before even reaching out!

We’re currently taking on a limited number of projects over the next month or so. We’re deliberately keeping the number limited because we’re still a small team, and we’d rather work with a handful of developers and give their projects the attention they deserve than take on everything that comes our way.

If you’re working on an indie game and need a trailer, gameplay video, devlog, social content, motion graphics or something more custom, please check us out!

And if you’re not looking for anything right now that’s completely fine too, we’re always happy to meet other developers and see what people are working on!

Thanks for reading if you’ve gotten this far :)

- Brad

bycherrymedia.com
u/BradCherryEU — 1 day ago
▲ 362 r/Unity3D

How I rebuilt my river tool: 24x faster mesh generation, VFX and Audio Streaming

I developed the River Modeler asset back in 2024 as a means to create decked out rivers using Unity Splines and MicroVerse. Figuring out the Spline API and mesh generation, VFX and all inherent challenges was top priority. Which left little room to first explore and learn designing around Burst and the Job System.

This meant that mesh generation was not nearly fast enough for long splines. Unity’s Mesh class has a lot of internal safeguards and memory copies, so just assigning a set of vertices incurs processing overhead.

Jobs + MeshData

Version 2 sees a full conversion to Jobs/Burst with rivers being split up into segments for parallel processing. That alone yielded up to a x24 performance increase.

A great companion to the Job System is the MeshData API, it provides the means to set a mesh’s vertex data directly in memory. The tradeoff is that you need to provide correct data. There are far fewer safeguards, which makes it about x17 faster!

> All in all, the performance improvements are significant and make the tool smooth in use, even for rivers spanning several kilometers.

Branching rivers

Spline knot can be linked together, and the spline API provides information about this. I've used this to contruct a virtual plane that sits perpendicular to the in/out going spline. Vertices on the other side of that plane get a Vertex Color painted on, which the shader then uses to add transparency.

> This makes the two river surfaces blend quite well, without leaning on flowmaps.

VFX Graph

Version 1 neatly stored particle positions into a Nx1 resolution `Texture2D` (n=number of particles), which could then be used in a `VFX Graph` to set the spawn positions for each particle.

Though setting pixel values on a `Texture2D` is relatively slow, which contributed to the tool getting sluggish when rivers got long and foamy with many cascades.

Version 2 uses a `GraphicsBuffer` which stores an array of `ParticleEmitter` structs (position/velocity/scale). If you add the `[VFXType(VFXTypeAttribute.Usage.GraphicsBuffer)]` attribute to any struct, it can be used in this way.

> This was a great win: More data per particle and direct data assignment!

Audio

Version 1 spawned Audio Sources along the Spline, giving the river surface a livelike character. Though this resulted in potentially hundreds of individuals GameObjects, negatively affecting scene size and loading times.

A common method for creating river audio is to use the “cart” method. That being a single `Audio Source` following the camera whilst being restricted to the spline. This often works but fails completely if the spline has large/strong turns, causing the Audio Source to jump to the other side of the spline curve. It also doesn’t work for branching rivers, at all...

Version 2 instead distributes audio spawn points along the spline. Each one defines a position, radius and type (stream/rapids/cascade). A dedicated Audio Manager then checks which river segments fall in- or out of the audible range and sets up Audio Sources on each spawn point from a pool. Instead of hundreds, only a dozen GameObjects are used at runtime.

> The result? A highly optimized audio streaming solution that scales for huge worlds!

Integration with other assets

I’m further fleshing this tool out as dedicated river tool extension for Stylized Water 3, which already supports river-type shading and animations. It just needs a proper river mesh to work with, which this can provide entirely.

Terrain carving and painting is wholly delegated to MicroVerse, since this needs to be a non-destructive process. The tool manipulates a Spline Path component to create a river- bank and bed.

u/Jonny10 — 2 days ago
▲ 1.1k r/Unity3D+3 crossposts

Before and after Lighting/Post Processing

u/ancht — 2 days ago

Rayfire still the gold standard for destruction in unity?

Making a game where theres a lot of unity who get destoryed progressively, destruction is the centrepiece but its been a while since ive been in unity.

Rayfire still the go to ?

reddit.com
u/Faang4lyfe — 1 day ago
▲ 29 r/Unity3D+1 crossposts

Are you accessing and changing variables too much from outside a class? The dangers of getters/setters

Note: This is aimed more at beginners. Experienced programmers will likely know this stuff. But even the veterans among us might find something useful here.

The nature of Unity's component-based design can make it very easy for objects/classes to modify each other's variables (fields). For example, say we're making a dungeon crawler, and we're using some good design principles like having our Health in one component, our Equipment in another component, and our BattleStats in a third component.

This kind of code is very common:

private void AttackEnemy(Fighter target)
{
    int baseDamage = CalculateMyDamage();
    baseDamage -= target.CalculateMyDefense();
    target.myHealth.current -= baseDamage;
    if (target.myHealth.current < 0)
    {
      target.PlayOnDeathAnimation();
      int xp = target.CalculateEarnedExperience();
      myXPComponent.xp += xp;
    }
}

It's not terrible. We are intelligently using functions like CalculateMyDamage, CalculateMyDefense, and CalculateEarnedExperience rather than writing that stuff in our AttackEnemy function.

However, we're still tightly coupling the attacker and defender. The attacker shouldn't be responsible for checking to see if the defender is dead or not. It shouldn't be responsible for 'knowing' when to play the death animation. In fact, it shouldn't even be responsible for changing the defender's HP at all.

Because imagine if we now introduce damage from terrain. We make a new object called a Hazard, and it deals damage every second. If we keep writing code the same way, we might end up with:

private void CauseHazardDamage(Fighter target)
{
  int baseDamage = CalculateMyHazardDamage();
  baseDamage -= target.CalculateMyDefense();
  target.myHealth.current -= baseDamage;
    if (target.myHealth.current < 0)
    {
      target.PlayOnDeathAnimation();
      int xp = target.CalculateEarnedExperience();
      myXPComponent.xp += xp;
    }
}

You can already see that this is essentially duplicated from AttackEnemy, which is a red flag. For example, what if we want the roll for treasure when an enemy dies? Well, now we have to add code like this to both functions:

if (UnityEngine.Random.Range(0,1f) <= target.GetTreasureChance())
{
  Treasure reward = target.GenerateTreasure();
  // do spawn logic here
}

Then what if we want to add an effect to some Fighters where they have a chance to avoid a fatal blow? We might need to amend the code again for both functions:

  target.myHealth.current -= baseDamage;
  if (target.myHealth.current < 0)
  {
    if (target.HasStatus("avoid_fatal_blow") && UnityEngine.Random.Range(0,1f) <= AVOID_FATAL_BLOW_CHANCE)
    {
      target.myHealth.current = 1;
    }
    else
    {
      // regular 'on death' code
    }
  }

Or what if Fighters can have other status effects or items that react when they take damage? Suddenly, we have code that could look like this:

private void CauseHazardDamage(Fighter target)
{
  int baseDamage = CalculateMyHazardDamage();
  baseDamage -= target.CalculateMyDefense();
  target.myHealth.current -= baseDamage;
  
  if (target.HasStatus("reactive_damage_ability"))
  {
    // do some cool stuff here
  }

  if (target.myHealth.current < 0)
  {
    if (target.HasStatus("avoid_fatal_blow") && UnityEngine.Random.Range(0,1f) <= AVOID_FATAL_BLOW_CHANCE)
    {
      target.myHealth.current = 1;
    }
    else 
    {
      target.PlayOnDeathAnimation();
      int xp = target.CalculateEarnedExperience();
      myXPComponent.xp += xp;
      if (UnityEngine.Random.Range(0,1f) <= target.GetTreasureChance())
      {
        Treasure reward = target.GenerateTreasure();
        // do spawn logic here
      }
    }
  }
}

It just turns into a nightmare. Now there are a lot of ways to architect your code so that you don't mire yourself in scenarios like this. But for the purposes of this post, I want to focus on this idea:

If you find yourself directly getting, modifying, and setting variables that belong to other objects, this should tell you that you may be writing difficult-to-maintain code.

We could have realized this as soon as we wrote this line:

target.myHealth.current -= baseDamage;

Without going into excessive detail, a far more maintainable approach would be something like this.

private void AttackEnemy(Fighter target)
{
  // We can play VFX/SFX here...
  int baseDamage = CalculateMyDamage();

  // But we trust the TARGET to figure out what to do with the damage we calculated
  target.OnAttacked(this, baseDamage);  
}

private void OnAttacked(Fighter attacker, int baseDamage)
{
  int defense = CalculateMyDefense();
  baseDamage -= defense;
  OnDamageReceived(attacker, baseDamage);
}

// This logic is split out from OnAttacked, because we could certainly take damage from things
// OTHER than an 'attack'. For example, if we are poisoned, that might ignore defense completely.
// In that case we would just run OnDamageReceived(poisonDamage).
private void OnDamageReceived(Fighter attacker, int damageAmount)
{
  // This function SHOULD NOT know or care what each StatusEffect we have does.
  // We will trust the StatusEffects themselves to take this and modify it how they see fit.
  foreach(StatusEffect se in myStatusEffects)
  {
    damageAmount = se.OnDamageReceived(damageAmount);
  }

  // Our status effects may have reduced our damage to zero!
  if (damageAmount == 0)
  {
    // Play some kind of 'DEFLECT!' vfx and sfx.
    return;
  }

  myHealth.ReduceHealthFromDamage(attacker, damageAmount)
}
 
 // ---- now we are in the HealthComponent class -----

private void ReduceHealthFromDamage(Fighter attacker, int damageAmount)
{
  current -= damageAmount;
  OnHealthChanged();
  if (current > 0) return;
  OnTookLethalDamage(attacker);
}

private void OnTookLethalDamage(Fighter whoKilledMe)
{  
  // Like with OnDamageReceived, perhaps we have status effects that do crazy stuff IF we were to take lethal damage
  // We might run through them and exit if any of them bring us >0 again.
  foreach(StatusEffect se in myStatusEffects)
  {
    current = se.OnHealthReducedToZero();
    if (current > 0)
    {
      // Hooray, we survived somehow!
      OnHealthChanged();
      return;
    }
  } 

  OnDeath(whoKilledMe);
}

private void OnDeath(Fighter whoKilledMe)
{
  // ... give whoKilledMe rewards or something!
}

This isn't perfect, and there are many things we could do to improve it further, but nonetheless it separates our 'concerns' far better.

* If we want to add some kind of new block/parry mechanic, we just have to do it in one place: OnAttacked
* If we make new StatusEffects, we don't have to write any new code whatsoever in these functions
* If we want to change what happens on Fighter death, there's just one function that handles it
* If we add new sources of damage - traps, hazards, poison, cursed gear, etc - our existing functions handle it all seamlessly

... and so forth and so on! I hope you find this helpful. My goal isn't to prescribe a specific solution to code architecture as every game is different, but just to recognize overuse of getting/setting variables from outside the object or class as a potentially bad 'code smell'.

reddit.com
u/zirconst — 1 day ago
▲ 1.1k r/Unity3D+3 crossposts

After two years, I'm finally showing off a procedural dungeon generator I built in Unity

I'm releasing a demo for a procedural dungeon generator I've been working on for over two years. I was inspired by the level layouts of games like The Binding of Isaac and Enter the Gungeon, and the interconnected worlds of Zelda and Dark Souls. This is only the beginning, I have several more features planned for this project, including turning it into a downloadable Unity package for others to use.

The goal is to create an algorithm that generates dungeons that feel linear like an RPG but still random and replayable like a roguelike.

Original Video: https://youtu.be/Adakgpoy0p0?si=R2qYbshEb11xuKFM

Blog: https://ryancarpenterpf.dev/labyrinth_demo.html

Demo: https://dev-rygy.itch.io/labyrinth-procedural-generator

u/dev-rygy — 2 days ago
▲ 690 r/Unity3D+9 crossposts

Feel like I am starting to get that old school dungeon crawler feel

u/destinedd — 2 days ago