r_unity3d | Unsorted

Telegram-канал r_unity3d - r/Unity3D

156

News about the Unity engine and project showcases from Reddit. Made possible with @reddit2telegram (@r_channels).

Subscribe to a channel

r/Unity3D

Good Unity tutorial reccomendations

I'm starting on a project and would like to discuss here recommendations for good tutorials for specific topics. For example, what led me to create this post, was to learn how to create a drag and drop inventory management systems like RE4. There are no good quality ones in YT ND the ones in coursera and such discuss the broader topics and not sure what inventory systems some of them use.

https://redd.it/1j50yaj
@r_Unity3D

Читать полностью…

r/Unity3D

Prototyped an AR Display Interaction for a Phone Joystick (AR app: XRI, Phone app: SwiftUI)

https://redd.it/1j4x6og
@r_Unity3D

Читать полностью…

r/Unity3D

I am losing all my Bought Asset Store Packages! WTF!

This is just an example... i have plenty more!

more and more assets are disappearing from my BOUGHT library...
I, like most Asset Store users, fall into the trap of an exiting discount and loads of assets that hopefully will be used one day. But Then BAM ITS gone for ever...

Any idea how to recover them?

This GRID my Gears...
Don't we own those assets?? Wasn't this the Core Ideas of the Asset store?
Even if they are not fully compatible with latest versions of Unity you should still have access to those files!
Even in a deprecated asset there are still useful things in them, a texture, a clever particle system, models sounds and the list goes on...

This feels like scam some times by sellers packages get deprecated and re Uploaded...

:( meh....

https://redd.it/1j4vpq9
@r_Unity3D

Читать полностью…

r/Unity3D

Working on my first game ever, all self-taught, and finally after about 10 months I'm close to a somewhat decent demo... how bad is it?

https://redd.it/1j4sxup
@r_Unity3D

Читать полностью…

r/Unity3D

After over a year of development, the Medieval Legacy Demo is here - featuring dynamic rulers, rivaling families, and limitless paths to power (or ruin)!

https://redd.it/1j4rr6v
@r_Unity3D

Читать полностью…

r/Unity3D

Glow effect where player contacts

I’m making my first game in Unity and it is a simple platformer with the player character being a square. I plan on making it look more minimalist with glow effect happening on the solid color ground where the player contacts with. I have very little experience with c# so I was hoping to get some ideas of how to do it. I’ve tried ChatGPT but the solution it gave me didn’t seem to work (whether it’s my implementation or the setup itself I am unsure).

https://redd.it/1j4nnxq
@r_Unity3D

Читать полностью…

r/Unity3D

Is it possible to 9-slice a sprite but in only 3 slices?

This might be a silly question, but I'm fairly new to Unity UI and am slowly but surely learning as I go. I'm currently trying to set up an object with a top, middle, and bottom that can scale vertically (anchored at the bottom; it's a text box background on a card). I tried to use the sprite editor to slice the sprite such that I have that top piece, middle piece, and bottom piece (leaving the L and R border values at 0). This is not behaving as I intend, and I'm curious if this is possible. The shape has a gradual curve across the top that is at a fixed width, so 9-slicing the sprite isn't really possible. Am I going about this the wrong way?

https://preview.redd.it/mjkblrqtdzme1.png?width=2438&format=png&auto=webp&s=121ae1aa0a5979b6bb9689f4f92bd14d4530af49



https://redd.it/1j4k6u0
@r_Unity3D

Читать полностью…

r/Unity3D

My first indie dev post – looking for advice on where to share my dev journey

I've always dreamed of making games and becoming an indie developer. This is my first post, so please don’t be too critical about the structure and flow.

To give you an idea of my current level, I’ve worked with C++, Python, C#, and Unity, but only at a surface level and at different times, without a clear goal. Now, I’ve finally decided to commit to making something complete and structured.

As a result, I chose to develop a game about a QA tester. It will feature mini-games that will not only serve as gameplay elements but also help me refresh my coding knowledge and solidify my Unity skills along the way.

Here are some screenshots to give an idea of my first project. As for the story and other details, I won’t go into them just yet since I’m still figuring out how much of my initial concept I’ll actually be able to implement.

https://preview.redd.it/3uttkltrsyme1.png?width=1927&format=png&auto=webp&s=d627cda4b4e47e5366d0a2b7a4aa4d1b0cf3387e

https://preview.redd.it/0mymuh9tsyme1.png?width=1913&format=png&auto=webp&s=8a187f057e039856bd0a13fe0f1bd161cd76773b

Aside from making the game itself, I’d love to document the journey, share ideas, and discuss interesting moments in development.

At first, I chose Reddit because I wanted to improve my English. Reading articles and interacting with devs helps a lot.

But I ran into a problem. My first three accounts got instantly autobanned, possibly due to VPN or something else—I still don’t know for sure. I learned that Reddit is really strict on new accounts, so now I’m letting my account sit for a while to avoid another autoban.

ChatGPT suggested using multiple platforms: Pikabu for a Russian-language devlog, discussions, and feedback, Reddit for the international game dev community and networking, and Twitter for quick updates, GIFs, and screenshots.

What do you think? Should I try using both Pikabu and Reddit, or is it better to focus on just one platform? Are there any alternative platforms that would work well for a devlog, getting feedback, and discussing development challenges?

Would love to hear your thoughts.

https://redd.it/1j4isuw
@r_Unity3D

Читать полностью…

r/Unity3D

Google maps integration

Hi ! I want to make game where i need google maps. Its simple game where player makes something on 2d map in lets say his hometown or smth. How do i take info of roads so i can make vehicles move only on roads and not on fields ?

https://redd.it/1j4dao2
@r_Unity3D

Читать полностью…

r/Unity3D

Unity 6 high performance dynamic foliage and seasons. It's simply a single scrolling texture that morphs based on impact direction and magnitude. No real-time calculations required. Grass bending pretty much

https://redd.it/1j4amo5
@r_Unity3D

Читать полностью…

r/Unity3D

What (technically) makes Guns of Fury so buttery smooth?
https://youtu.be/0PVHGIuv4Sk?si=CjdSoDM_rO97kwRi&t=2857

https://redd.it/1j455xc
@r_Unity3D

Читать полностью…

r/Unity3D

Project DRAG - (Customize) - Open Beta

https://redd.it/1j445zt
@r_Unity3D

Читать полностью…

r/Unity3D

Help me understand why my first game is repulsive || Scary 10min median time played

My artist partner and I have been working for 10 months on our first game. And we saw the SNF as a perfect opportunity to release a Demo and see what the world could think about it.

It's been a great first experience for us. We gathered 1000 wishlist, which is always a pleasant milestone, but in the same time, clearly not enough to do anything.
What is the scariest is the average playtime stat... 10min ONLY !


Unfortunately, the one-to-one testing and our friends are probably to kind to tell us what is wrong with it, so I thought about sending this question to "The Internet", where people are more straight forward.

Here is our free demo link : https://store.steampowered.com/app/3403090/Fire\_Hero\_\_Pixel\_Rescue/
If some of you would be interested to test it out and tell us what is wrong, and why 70% of people stop after 10min, that would help us tremendously !

If my post is not appropriate to this subreddit, feel free to close it and tell me where I could ask this question.


Thanks a lot for your time <3

https://redd.it/1j42rfn
@r_Unity3D

Читать полностью…

r/Unity3D

GetTile is returning null
https://redd.it/1j3z3br
@r_Unity3D

Читать полностью…

r/Unity3D

coroutine-like function meant to be asynchronous. And my "CharacterController2D" is just a script for handling physics since I like to separate controls from physics. I can call it's functions to move my body accordingly, with the benefit being a reusable script that can be slapped on enemy AI. Here is what the jumping controls look like:

    // Gets called when you press the Jump Button.
OnJump(InputAction.CallbackContext context)
{
// If I am not touching the ground or walls (game has wall sliding/jumping)
if(!characterController2D.isGrounded && !characterController2D.isTouchingWalls)
{
// The faster I fall, the more buffer I give my players for more responsiveness
float bufferDistance = Mathf.Lerp(minBufferLength, maxBufferLength, characterController2D.VerticalVelocity / maxBufferFallingVelocity);

// If I have not just jumped, and the raycast is within my buffering distance
if(!notJumpingUp && jumpBufferRaycast.collider != null && jumpBufferRaycast.distance <= bufferDistance)
{
// If there is already a buffer, I don't do anything. Leave.
if(!isJumpBufferActive)
JumpBuffer(context);
return;
}

// Similar buffer logic would go here for my wall jump buffer, with its own ray
// Main difference is it looks for player's moving horizontally into a wall
}

// This is my where jump/double jump/wall jump logic goes.
// if(on the wall) {do wall jump}
// else if( double jump logic check) {do double jump}
// else {do a normal jump}
}

// Gets called when you release the Jump Button
CancelJump(InputAction.CallbackContext context)
{ // I have buffered a jump, but not a jump cancel yet.
if(isJumpBufferActive && !isJumpCancelBufferActive)
JumpCancelBuffer(context);

if(characterController2D.isJumpingUp && !characterController2D.isWallSliding)
characterController2D.JumpCut();
}

private async void JumpBuffer(InputAction.CallbackContext context)
    {   isJumpBufferActive = true;
        await UniTask.WaitUntil(() => characterController2D.isGrounded);
        isJumpBufferActive = false;
        OnJump(context);
    }
    private async void JumpCancelBuffer(InputAction.CallbackContext context)
    {
        isJumpCancelBufferActive = true;
        await UniTask.WaitUntil(() => characterController2D.isJumpingUp);
        await UniTask.Delay(100); // Wait 100 milliseconds before cutting the jump.
        isJumpCancelBufferActive = false;
CancelJump(context);
    }

Some parts of this might seem a bit round-about or excessive, but that's just what was necessary to handle edge cases for maximum consistency. Nothing is worse than when controls betray expectations/desires in the heat of the moment.

Without a proper jump cut buffer alongside my jump buffer, I would do a buggy looking double jump. Without filtering a raycast, it would be blocked by undesired objects. Without dynamically adjusting the buffer's detection length based on falling speed, it always felt like I either buffered jumps way too high or way too low depending on how slow/fast I was going.

It was imperative I got it right, since my double jump is also an attack that would be used frequently as player's are incentivized to use it as close to enemy's heads as possible without touching. Sorta reminiscent of how you jump on enemies in Mario but without the safety. Miss timing will cause you to be hurt by contact damage.

It took me quite some attempts/hours to get to the bottom of having a consistent and responsive feeling jump. But not many people talk about handling jump buffers when it comes to having a double

Читать полностью…

r/Unity3D

New sparrows and crows make noises and fly away when approached

https://redd.it/1j4v8k5
@r_Unity3D

Читать полностью…

r/Unity3D

Putting final touches on our new game and wanted to show you how we managed to solve the dilemma: what if not everyone wants to experiment in alchemic card game?

https://redd.it/1j4vzdy
@r_Unity3D

Читать полностью…

r/Unity3D

I created a crude simulation of atoms/molecules using a compute shader to simulate millions of entities. Basic attractive and repulsive forces can be tweaked to simulate different behaviours similar to solids, liquids or gases.

One of the nicer results I was able to achieve was this liquid behaviour. I added fluctuations to the gravity field to generate waves and wrote a shader to highlight less dense or fast moving regions to simulate seafoam.

Each entity is only affected by gravity, and by one attractive and one repulsive force between itself and all other entities. The attractive and repulsive forces are inverse square forces and are parameterised in a scriptable object so that they can be fully configured to achieve different behaviours. From these simple forces many different behaviours can emerge just from changing constants. For instance, we can set the parameters so that the attractive force is dominant until the particles get close together and start to repel each other.

A close up of the wave formation. The shape of the curling wave is purely emergent behaviour as a result of the electromagnetic forces between entities.

There are no colliders on the entities and no gameobjects associated with them. The particles collide with each other because the parameters are set so that the repulsive force is dominant at close range. Each particle exists only on the GPU and the forces, velocities and positions are calculated in a compute shader. That same memory is then accessed in a separate shader which renders the particles to the screen.

Tweaking the parameters to generate more attraction creates stronger bonds between particles so that they can form solids. I can only apologise for the questionable shader design. Each particle is rendered using a single triangle and I wanted to shade them to make them look 3D and round.

Particles forming a crystalline solid. Different crystal grains form in the structure and we can see crystal defects.

I played around with the parameters for a long time and found other interesting states such as this foamy structure.

The particles are spawned in a regular formation but floating point discrepancies cause them to group into filaments which resemble a foam. Surface tension affects the structure's shape.

Reducing the attractive forces causes the particles to act more like a gas (or maybe this is more like a liquid).

The particles fill the volume like a gas. There is a hard limit to the bounds of the particles so a layer forms at the bottom where the particles have no forces pushing them upwards because all particles at the ground level have the exact same height coordinate. Gravity keeps them pressed down and there is no floating point discrepancy to create a Y-component in the force vector from neighbouring particles.

https://redd.it/1j4uimp
@r_Unity3D

Читать полностью…

r/Unity3D

Searched everywhere for a good pirate horror game... ended up making my own! Steam page now live! 🏴‍☠️

https://redd.it/1j4qkie
@r_Unity3D

Читать полностью…

r/Unity3D

What should I use when I need a big table of different scores?

So I wanted to make the dice game farkle in unity and I've gotten to the point where I have to actually implement the scoring. I did looooong if statements and it does work but they are incredibly tedious. Then I was going to use dictionaries to try and make it more readable and efficient. but as i was looking up information for this, scriptable objects kept on popping up. I am very new to all of this and would like some advice on how to properly implement a scoring system and if scriptable objects are the way to go, dictionaries, or something completely different.

For those unfamiliar farkle scoring:

https://preview.redd.it/lwnt8281i0ne1.png?width=377&amp;format=png&amp;auto=webp&amp;s=69eee0a8abbcf41e46889ee07cb0193974224744

Ty for any advice

https://redd.it/1j4p66h
@r_Unity3D

Читать полностью…

r/Unity3D

Super Hero Pixel Art
https://redd.it/1j4nu8n
@r_Unity3D

Читать полностью…

r/Unity3D

Project cant decompress

So for some reason i cant seem to be able to open projects. Even making news ones or using the hub as administrator wont work. Is this a glitch or is my laptop not able to use unity?

https://redd.it/1j4k8o1
@r_Unity3D

Читать полностью…

r/Unity3D

I've made a trailer for my game The Green Light - dose it look interesting or just another generic trailer ?

https://redd.it/1j4a4l8
@r_Unity3D

Читать полностью…

r/Unity3D

Spent a week redrawing tilemaps from 16x16 to 14x14. Was it worth it?
https://www.youtube.com/watch?v=BPuvp8HY7QM

https://redd.it/1j4cjww
@r_Unity3D

Читать полностью…

r/Unity3D

After a long time on and off learning Unity I finally finished a silly little game

I started to learn a little bit of Unity years ago. I always had these little burst of motivation for about a week, gave up again until I started again months later and gave up again.

I want to finally really start learning development and I just finished my first project and uploaded it to Itch.

https://dv-rain.itch.io/snakepong

I actually just took Snake and Pong and put it together, so not really an original game (although I think this twist is quite fun and challenging)

But it feels good to finally make it a "complete game" that is playable with a menu, options, a bug-free experience (?) and I also think the visuals and sounds are kinda nice.

If a single person will ever have fun with it for just a few minutes I'm happy.

Now on to my next project, can't wait to learn more.

https://redd.it/1j48w0t
@r_Unity3D

Читать полностью…

r/Unity3D

I tried making a cozy game. I was terrible at it, so I made this 😇

https://redd.it/1j45mgh
@r_Unity3D

Читать полностью…

r/Unity3D

Nintendo 64 Style Lighting - Update
https://redd.it/1j41f29
@r_Unity3D

Читать полностью…

r/Unity3D

How can I create this weird style?

https://redd.it/1j3zk58
@r_Unity3D

Читать полностью…

r/Unity3D

jump.

https://redd.it/1j3xbyw
@r_Unity3D

Читать полностью…

r/Unity3D

My approach to Jump Buffers for the perfect feeling jump / double jump

When it comes to a fantastic feeling jump and responsive controls, input buffers and jump buffering is a no brainer. This is when you detect the player has pressed a button too early (sometimes by only a frame) and decide it was close enough. Without this, your controls can feel like your button presses did literally nothing if you aren't perfect.

On my quest to create a down right sexy feeling jump/movement, I encountered some things I just wanted to vent out for others to see. Mini dev log I guess of what I did today. This will be geared towards Unity's Input System, but the logic is easy enough to follow and recreate in other engines/systems.

________________________________________________________________________________________

There are a few ways to do a Jump Buffer, and a common one is a counter that resets itself every time you repress the jump button but can't yet jump. While the counter is active it checks each update for when the conditions for jumping are met, and jumps automatically for you. Very simple, works for most cases.

However, let's say your game has double jumping. Now this counter method no longer works as smooth as you intended since often players may jump early before touching the ground meaning to do a normal jump, but end up wasting their double jump. This leads to frustration, especially hard tight/hard platforming levels. This is easily remedied by using a ray cast instead to detect ground early. If you are too close, do not double jump but buffer a normal jump.

My own Player has children gameobjects that would block this ray cast so I make sure to filter the contact points first. A simple function I use to grab a viable raycast that detected the closest point to the ground:

private RaycastHit2D FindClosestGroundRaycast()
{       
List<RaycastHit2D> hitResults = new();   
    RaycastHit2D closestHittingRay = default;
    Physics2D.Raycast(transform.position + offset, Vector2.down, contactFilter, hitResults, Mathf.Infinity);
           
    float shortestDistance = Mathf.Infinity; // Start with the maximum possible distance

    foreach(RaycastHit2D hitResult in hitResults)
    {
    if(hitResult.collider.tag != "Player") // Ignore attached child colliders
        {
        if (hitResult.distance < shortestDistance)
            {
              closestHittingRay = hitResult;
            shortestDistance = hitResult.distance;
        }
        }
    }

    return closestHittingRay;
}

RaycastHit2D myJumpBufferRaycast;
FixedUpdate()
{
myJumpBufferRaycast = FindClosestGroundRaycast();
}

But let's say you happen to have a Jump Cut where you look for when you release a button. A common feature in platforming games to have full control over jumps.

There is an edge case with jump cuts + buffering where your jumps can now be buffered and released early before even landing if players quickly tap the jump button shortly after jumping already (players try to bunny hop or something). You released the jump before landing, so you can no longer cut your jump that was just buffered without repressing and activating your double jump! OH NO :L

Luckily, this is easily solved by buffering your cancel as well just like you did the jump. You have an detect an active jump buffer. This tends to feel a little off if you just add the jump cancel buffer by itself, so it's best to wait another few frames/\~0.1 seconds before the Jump Cancel Buffer activates a jump cut. If you don't wait that tiny amount, your jump will be cut/canceled it the literal frame you start to jump, once again reintroducing the feeling of your jump button not registering your press.

I use a library called UniTask by Cysharp for this part of my code alongside Unity's Input System, but don't be confused. It's just a fancy

Читать полностью…
Subscribe to a channel